help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: line wrap problem


From: Eric Pement
Subject: Re: line wrap problem
Date: 19 Mar 2003 10:11:32 -0800

ngse@yahoo.com (S. Eng) wrote in message 
news:<fb376a9e.0303180909.12d4daf7@posting.google.com>...
> Hi
> 
> I want to line wrap at column 72.
> I have the following lines in my .emacs
> 
> (setq default-major-mode 'text-mode)
> (setq text-mode-hook 'turn-on-auto-fill)
> (setq current-fill-column 72)
> 
> It does not work on NTEmacs 21.1.1 running under Win2K

I'm using GNU Emacs 21.2.1 running under Win2K, same as you.
Here's what I have in my .emacs init file:

   (setq default-major-mode 'text-mode)
   (add-hook 'text-mode-hook 'turn-on-auto-fill)
   (setq fill-column 71)

It works for me. Note especially that I use "fill-column" instead
of "current-fill-column" and also the "add-hook" command. Also,
note that when you first run Emacs, you are automatically in the
*Scratch* buffer, which is not a text-mode buffer. To run in text
mode, open or create a new file and you should see the string
"(Text Fill)--L1----ALL----" in the gray status bar.

If you can see that, then you should be able to type new content,
and see the line wrap automatically after it reaches 75 characters
or so. If you add new content to existing paragraphs, Emacs will
push the new content to the right, but will not automatically
"reflow" or reformat the paragraph.

To reformat an edited paragraph to your preset margins, you must
type ESC-q (2 successive keystrokes) or ALT-Q (simultaneously) to
reformat the paragraph. Hope this helps.

--
Eric Pement


reply via email to

[Prev in Thread] Current Thread [Next in Thread]