🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.bug
Article #100025

auto-fill for outline-mode headers

#100025
From: Stavros Macrakis
Date: Fri, 09 Mar 1990 18:24
38 lines
1772 bytes
GNU Emacs 18.55.1 of Tue Oct 31 1989 on marat (hpux)

I suggest that header lines in outline mode not be auto-filled.  That
is, if the current line begins with outline-regexp, it should not be
wrapped.  This is so that headers remain headers, and don't get
"mixed" with the text.  Of course, I can imagine a style of use of
outline mode where this feature is not wanted (headers as first line
of paragraph rather than as titles), so I guess it needs to be
customizable.  What I've done for myself is add an extra condition in
do-auto-fill: 

(defun do-auto-fill ()
  (or (and (eq major-mode 'outline-mode)
	   (save-excursion
	     (beginning-of-line)
	     (looking-at outline-regexp)))
	...

but it could equally well be done by having a different do-auto-fill
for outline-mode or with (yet another) variable:

(defun do-auto-fill ()
  (or (and header-nofill
	   (save-excursion
	     (beginning-of-line)
	     (looking-at outline-regexp)))
	...

or

(defun do-auto-fill ()
  (or (and nofill-regexp
	   (save-excursion
	     (beginning-of-line)
	     (looking-at nofill-regexp)))
	...

Problem: synchronizing nofill-regexp and outline-regexp.
Technical Details
Message-ID: <9003091025.AA08421@mururoa.imag.fr>
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!seismo!ukma!tut.cis.ohio-state.edu!ri.osf.fr!macrakis

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fb2f1,69a9f724507a93db,start
X-Google-Attributes: gidfb2f1,public
X-Google-ArrivalTime: 1990-03-09 10:24:35 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!seismo!ukma!tut.cis.ohio-state.edu!ri.osf.fr!macrakis
From: macrakis@ri.osf.fr (Stavros Macrakis)
Newsgroups: gnu.emacs.bug
Subject: auto-fill for outline-mode headers
Message-ID: <9003091025.AA08421@mururoa.imag.fr>
Date: 9 Mar 90 18:24:35 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 38
Posted: Fri Mar  9 19:24:35 1990