[comp.emacs] Line-wrapping as opposed to line-truncating

ugnick@sunybcs.uucp (Nick Triantos) (03/06/89)

I'm rather used to using (please, no flames) EVE on VMS.

I've finally started using Emacs (GNU Version 18.53 on an Encore Multimax
running Umax), but I greatly miss one of the features of EVE.  Is there a way
to force Emacs to truncate a line when it approaches the right column instead
of just letting it continue on and put a "\" on the screen.  In EVE, when the
right margin is hit while typing, EVE backtraces the line for a word break and
inserts a <Ret> before the word which wraps past the right margin.

Any help is, of course, greatly appreciated...
   ___    ___    _________
  /_ /|  /_ /|  /_______ /|   Nick B Triantos
 |##| | |##| | |########| |
 |##| | |##| | |##| L|##| |   The University of Buffalo
 |##| | |##| | |##|/_|##| /|  Department of Computer Science
 |##| | |##| | |#########| |  
 |##| |_|##| | |##| L_|##| |  internet: ugnick@cs.buffalo.edu
 |##|/__|##| | |##|/__|##| |  bitnet: ugnick@sunybcs.BITNET
 |#########|/  |#########|/   uucp: ..!{boulder,decvax,rutgers}!sunybcs!ugnick

ken@gatech.edu (Ken Seefried iii) (03/06/89)

In most modes do:

		M-x auto-fill-mode

Works just the way you want (default breaks lines at 70 chars).  You
can change this value with the 'C-x f' command.  For example, to set
the width to 40 chars, you would say:

		C-u 40 C-x f

(I assume that you already know that C-u is the way to give a
numerical argument to a GNUEmacs command).

	...ken seefried iii
	   ken@gatech.edu

mesard@bbn.com (Wayne Mesard) (03/07/89)

Emacs: GNU >18.50

In article <18082@gatech.edu> ken@gatech.UUCP (Ken Seefried iii) writes:
>
>In most modes do:
>
>		M-x auto-fill-mode
[...]
> For example, to set
>the width to 40 chars, you would say:
>
>		C-u 40 C-x f

And to enable auto-fill-mode permanently, create a file named ".emacs"
in your home directory if you don't already have one, and put the
following kinds of things in it:

To make GNU Emacs use text-mode instead of fundamental mode, as its default:

       (setq default-major-mode 'text-mode)

To automagically turn on auto-fill-mode, whenever text-mode is entered:

       (setq text-mode-hook 'turn-on-auto-fill)

To change fill-mode's line width to something other than the default:

       (setq-default fill-column 72)

For more info, see the section on Init Files in the GNU manual.

-- 
unsigned *Wayne_Mesard();  "I feel like an alien.  It's a problem."  -DB
MESARD@BBN.COM
BBN, Cambridge, MA       

brister@td2cad.intel.com (James Brister) (03/07/89)

Can it be arranged to have GNU-EMACS truncate the line (with possibly a
trailing character to indicate this), but not wrap it when auto-fill is
off? (i.e. you type the characters and the cursor stays glued to the right
margin). Actually I wouldn't want to enter text this way, but it would be
nice sometimes to have the lines truncated when pulling in an existing
file, especially where every line is >80 characters.  

James
--
---------------------------------------------------------------------------
James Brister                                brister@td2cad.intel.com
(408) 765-9713                               ...!decwrl!td2cad!brister
"Is the set of all respectable sets respectable?"

ugwiles@cs.buffalo.edu (Dale Wiles) (03/08/89)

In article <BRISTER.89Mar6203142@andrea.td2cad.intel.com>, brister@td2cad (James Brister) writes:
>
>Can it be arranged to have GNU-EMACS truncate the line (with possibly a
>trailing character to indicate this), but not wrap it when auto-fill is
>off?
>

Yup. Just M-x set-variable
	  truncate-lines t

Set it back to nill to turn it off. For more help do C-h v truncate-lines.

*Emacs came, Dale, lad, Emacs came.               *(c) Marty Storer, Goog Inc.
*Disclaimer: I disclaim nothing! I am THE official*Looks more (bonk)
*opinion of my college, state, country and of all *like a sick-e-more (bonk)
*carbon based life forms in the universe.         *to me. Yogi the Space Bear.

pinkas@hobbit.intel.com (Israel Pinkas ~) (03/08/89)

In article <BRISTER.89Mar6203142@andrea.td2cad.intel.com> brister@td2cad.intel.com (James Brister) writes:

> Can it be arranged to have GNU-EMACS truncate the line (with possibly a
> trailing character to indicate this), but not wrap it when auto-fill is
> off? (i.e. you type the characters and the cursor stays glued to the right
> margin). Actually I wouldn't want to enter text this way, but it would be
> nice sometimes to have the lines truncated when pulling in an existing
> file, especially where every line is >80 characters.  

M-x apropos truncate gives me:

    default-truncate-lines	      
      Variable: Default truncate-lines for buffers that do not override it.
    truncate-lines		      
      Variable: *Non-nil means do not display continuation lines;
    truncate-partial-width-windows
      Variable: *Non-nil means truncate lines in all windows less than full screen wide.

-Israel Pinkas
--
--------------------------------------
Disclaimer: The above are my personal opinions, and in no way represent
the opinions of Intel Corporation.  In no way should the above be taken
to be a statement of Intel.

UUCP:	{amdcad,decwrl,hplabs,oliveb,pur-ee,qantel}!intelca!mipos3!cadev4!pinkas
ARPA:	pinkas%cadev4.intel.com@relay.cs.net
CSNET:	pinkas@cadev4.intel.com