From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: August Newsgroups: gmane.emacs.help Subject: Re: enabling auto fill mode for XML documents Date: Mon, 31 Jan 2005 14:05:19 +0100 Message-ID: <1107176719.5316.7.camel@c83-250-201-122.bredband.comhem.se> References: <200501302028.32047.wolfgang@jeltsch.net> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1107177129 23605 80.91.229.6 (31 Jan 2005 13:12:09 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 31 Jan 2005 13:12:09 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jan 31 14:12:02 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CvbLV-00056C-00 for ; Mon, 31 Jan 2005 14:12:02 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CvbYC-0005WI-Vc for geh-help-gnu-emacs@m.gmane.org; Mon, 31 Jan 2005 08:25:09 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1CvbXP-0005Og-H6 for help-gnu-emacs@gnu.org; Mon, 31 Jan 2005 08:24:22 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1CvbXJ-0005NA-Vy for help-gnu-emacs@gnu.org; Mon, 31 Jan 2005 08:24:14 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CvbXJ-0005N7-Of for help-gnu-emacs@gnu.org; Mon, 31 Jan 2005 08:24:13 -0500 Original-Received: from [81.228.10.114] (helo=av3-1-sn4.m-sp.skanova.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CvbEX-0001lc-CA for help-gnu-emacs@gnu.org; Mon, 31 Jan 2005 08:04:49 -0500 Original-Received: by av3-1-sn4.m-sp.skanova.net (Postfix, from userid 502) id A930337E77; Mon, 31 Jan 2005 14:04:47 +0100 (CET) Original-Received: from smtp4-1-sn4.m-sp.skanova.net (smtp4-1-sn4.m-sp.skanova.net [81.228.10.181]) by av3-1-sn4.m-sp.skanova.net (Postfix) with ESMTP id 9BAE037E46 for ; Mon, 31 Jan 2005 14:04:47 +0100 (CET) Original-Received: from c83-250-201-122.bredband.comhem.se (c83-250-201-122.bredband.comhem.se [83.250.201.122]) by smtp4-1-sn4.m-sp.skanova.net (Postfix) with ESMTP id 8722E37E42 for ; Mon, 31 Jan 2005 14:04:47 +0100 (CET) Original-To: help-gnu-emacs@gnu.org In-Reply-To: <200501302028.32047.wolfgang@jeltsch.net> X-Mailer: Evolution 2.0.2 (2.0.2-3) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:23773 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:23773 On s=C3=B6n, 2005-01-30 at 20:28 +0100, Wolfgang Jeltsch wrote: > Hello, >=20 > I want the auto fill minor mode to be automatically enabled for all buf= fers=20 > using the nXML major mode. Alas, all previous attempts and tipps to re= alize=20 > this (like putting turn-on-auto-fill-mode in an nXML hook) didn't work.= What=20 > is a good way to achieve what I want? >=20 > Best wishes, > Wolfgang >=20 >=20 > _______________________________________________ > Help-gnu-emacs mailing list > Help-gnu-emacs@gnu.org > http://lists.gnu.org/mailman/listinfo/help-gnu-emacs Just tried out the nXML major mode and for me it works fine with=20 `(auto-fill-mode 1)' in the mode hook. I have the following lines in my .emacs init file: (add-to-list 'load-path "/usr/local/share/emacs/site-lisp/nxml- mode-20041004") (load "rng-auto.el") (defun my-nxml-mode-hook () (auto-fill-mode 1)) (add-hook 'nxml-mode-hook 'my-nxml-mode-hook) Also consider refill-mode as it refills the paragraph even when you insert/delete words in the middle of it. If you want to use it, change the mode hook to: (defun my-nxml-mode-hook () (refill-mode 1)) --=20 August