From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: ken Newsgroups: gmane.emacs.help Subject: Re: any Emacs features to help keep code/comments under 80 columns width? Date: Tue, 3 Dec 2002 16:09:13 -0500 (EST) Sender: help-gnu-emacs-admin@gnu.org Message-ID: References: <20021202173058.A3985@spawar.navy.mil> Reply-To: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: main.gmane.org 1038949770 30597 80.91.224.249 (3 Dec 2002 21:09:30 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 3 Dec 2002 21:09:30 +0000 (UTC) Cc: 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 18JKIG-0007wL-00 for ; Tue, 03 Dec 2002 22:09:24 +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 18JKIv-0004PS-00; Tue, 03 Dec 2002 16:10:05 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18JKIn-0004OB-00 for help-gnu-emacs@gnu.org; Tue, 03 Dec 2002 16:09:57 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18JKIl-0004Ni-00 for help-gnu-emacs@gnu.org; Tue, 03 Dec 2002 16:09:56 -0500 Original-Received: from adsl-65-43-214-101.dsl.bcvloh.ameritech.net ([65.43.214.101] helo=heidegger.mousecar.net) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18JKIA-0004IJ-00 for help-gnu-emacs@gnu.org; Tue, 03 Dec 2002 16:09:18 -0500 Original-Received: from localhost (ken@localhost) by heidegger.mousecar.net (8.11.6/8.11.6) with ESMTP id gB3L9DY08025; Tue, 3 Dec 2002 16:09:14 -0500 X-Authentication-Warning: heidegger.mousecar.net: ken owned process doing -bs X-X-Sender: Original-To: In-Reply-To: <20021202173058.A3985@spawar.navy.mil> Errors-To: help-gnu-emacs-admin@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.help:4257 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:4257 seberino@spawar.navy.mil at 17:30 (UTC-0800) on Mon, 2 Dec 2002 said: = Ken = = Thanks for the help. = = Do you know why I would be able to turn on auto-fill-mode = interactively with "M-x auto-fill-mode" but *not* = by putting = = (setq-default fill-column 80) = (setq text-mode-hook 'turn-on-auto-fill) = = in .emacs? First, follow Kai's advice and use: (add-hook 'text-mode-hook 'turn-on-auto-fill) I haven't tested it yet, but I'm taking his word for it. The .emacs file is read when emacs is started. You would need to restart emacs-- i.e., close it and then open it up again-- for it to take effect. Note that you can set the fill-column number a couple other ways: - e.g., if you want wrapping at column 45, do C-4 C-5 C-x f - Put the cursor where you want wrapping to happen and do C-u C-x f = = BTW, will this turn on auto-fill-mode for *all* modes = like c-mode? (programming) No, it would be just for text mode. hth, ken = = Chris = = On Fri, Nov 29, 2002 at 08:40:18PM -0500, ken wrote: = > = > Chris, = > = > To get this when emacs loads, put the following in your .emacs: = > = > (setq text-mode-hook 'turn-on-auto-fill) = > = > As can be seen, that just sets it for text mode. Do another for, say, = > html-helper-mode: = > = > (setq html-helper-mode-hook 'turn-on-auto-fill) = > = > Personally, I turnaround at 78: = > = > (setq-default fill-column 78) = > = > Since versions seem to be more than normally critical, mine's 20.7.1. = > = > = > hth, = > ken = > = > -- = > AMD crashes? See http://cleveland.lug.net/~ken/amd-problem/. = > = > seberino@spawar.navy.mil at 15:22 (UTC-0800) on Thu, 28 Nov 2002 said: = > = > = I often write comments and code and look at modeline's Column# display = > = to verify I did not go beyond the 80th column when I type. = > = = > = Are there any goodies in Emacs to help me accomplish this??? = > = = > = = > = Maybe.... = > = = > = 1. Emacs flashes the screen when I reach column 80 = > = = > = 2. Emacs automatically adds a hard return and moves me to next line = > = when I reach column 80. = > = = > = 3. Emacs just doesn't let me type beyond column 80. = > = = > = Chris = > = = > = > = > = > _______________________________________________ = > Help-gnu-emacs mailing list = > Help-gnu-emacs@gnu.org = > http://mail.gnu.org/mailman/listinfo/help-gnu-emacs = = -- AMD crashes? See http://cleveland.lug.net/~ken/amd-problem/.