From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: pemente@northpark.edu (Eric Pement) Newsgroups: gmane.emacs.help Subject: Re: line wrap problem Date: 19 Mar 2003 10:11:32 -0800 Organization: http://groups.google.com/ Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <227a55e9.0303191011.35f66887@posting.google.com> References: NNTP-Posting-Host: main.gmane.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1048097787 15406 80.91.224.249 (19 Mar 2003 18:16:27 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 19 Mar 2003 18:16:27 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Wed Mar 19 19:16:26 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18vi70-00040J-00 for ; Wed, 19 Mar 2003 19:16:26 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18vi69-0005ft-00 for gnu-help-gnu-emacs@m.gmane.org; Wed, 19 Mar 2003 13:15:33 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews1.google.com!not-for-mail Original-Newsgroups: comp.emacs,gnu.emacs.help Original-Lines: 38 Original-NNTP-Posting-Host: 66.185.249.144 Original-X-Trace: posting.google.com 1048097493 16291 127.0.0.1 (19 Mar 2003 18:11:33 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: 19 Mar 2003 18:11:33 GMT Original-Xref: shelby.stanford.edu comp.emacs:78279 gnu.emacs.help:111223 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:7723 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:7723 ngse@yahoo.com (S. Eng) wrote in message news:... > 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