From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Oliver Scholz Newsgroups: gmane.emacs.help Subject: Re: mode-aware fill-column? Date: Tue, 17 Sep 2002 01:47:21 +0200 Organization: Olymp Sender: help-gnu-emacs-admin@gnu.org Message-ID: References: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1032214567 25857 127.0.0.1 (16 Sep 2002 22:16:07 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 16 Sep 2002 22:16:07 +0000 (UTC) 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 17r4A2-0006iv-00 for ; Tue, 17 Sep 2002 00:16:06 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17r4AH-0003iX-00; Mon, 16 Sep 2002 18:16:21 -0400 Original-Path: shelby.stanford.edu!nntp.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!fu-berlin.de!uni-berlin.de!dialin-145-254-202-058.arcor-ip.NET!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 27 Original-NNTP-Posting-Host: dialin-145-254-202-058.arcor-ip.net (145.254.202.58) Original-X-Trace: fu-berlin.de 1032214055 2788994 145.254.202.58 (16 [87814]) X-Orig-Path: hermes!nobody X-Operating-System: Linux from Scratch X-Attribution: os X-Face: "HgH2sgK|bfH$;PiOJI6|qUCf.ve<51_Od(%ynHr?=>znn#~#oS>",F%B8&\vus),2AsPYb -n>PgddtGEn}s7kH?7kH{P_~vu?]OvVN^qD(L)>G^gDCl(U9n{:d>'DkilN!_K"eNzjrtI4Ya6;Td% IZGMbJ{lawG+'J>QXPZD&TwWU@^~A}f^zAb[Ru;CT(UA]c& User-Agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i686-pc-linux-gnu) Cancel-Lock: sha1:QXs/b7m1G5tr3qLyJYzHcjYlp/A= Original-Xref: nntp.stanford.edu gnu.emacs.help:104963 Original-To: help-gnu-emacs@gnu.org 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:1518 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:1518 mike hardy writes: [...] > Using Emacs for personal editing I like text columns to wrap around 84 > chars. But (some) ppl prefer to see 72-ish for posting to Usenet. I'd > like to accomodate them if there is some automatic way of changing > fill-column's value between the two. Say somehow using ~/.gnus.el to > change it to 72 but all other times use 84 (and when exiting Gnus it > reverts to 84 automatically)? The usual way for a task like this in Emacs is to use a hook (See in the manual: ==> Customization ==> Variables ==> Hooks). Almost every major mode is supposed to provide at least one hook: the -mode-hook. Since you use Gnus, you write messages in `message-mode', so this would be `message-mode-hook'. The variable `fill-column' becomes automatically a local variable if you set it to a different value in a buffer. So all you have to do is to put a `(setq fill-column 72)' in the `message-mode-hook'. But you have to wrap this into an anonymous function via `lambda': (add-hook 'message-mode-hook (lambda () (setq fill-column 72))) -- Oliver -- Jour de la Vertu de l'Année 210 de la Révolution Liberté, Egalité, Fraternité!