help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

fill-paragraph in USENET messages (was: Quotelength with slrn and vim)


From: Adam Funk
Subject: fill-paragraph in USENET messages (was: Quotelength with slrn and vim)
Date: Wed, 08 Dec 2010 15:23:53 -0000
User-agent: slrn/pre1.0.0-16/mm/ao (Ubuntu Intrepid)

[I'm adding gnu.emacs.help in case this is useful to someone outside
of NSR --- please feel free to prune FUs.]

On 2010-08-08, Adam Funk wrote:

> If I put the cursor in a section of text with a blank line before and
> after it, and press M-q, emacs will reformat ("fill") it and preserve
> the number of ">" at the beginning of each line --- which I've just
> done to your lines above.  Unfortunately, it doesn't correctly
> identify the "paragraph" to reformat if there are non-blank lines
> containing only ">" and spaces that make it contiguous with other
> paragraphs with different levels of quoting.


Well, I just found the following in my ~/.emacs file 

#v+
;; Message-ID: <mailman.1142.1174348863.7795.help-gnu-emacs@gnu.org>
;; From: Matthew Flaschen <matthew.flaschen@gatech.edu>
;; gnu.emacs.help  2007-03-19
;; Subject: Re: Configuring fill-paragraph not to mash the subversion delimiter?
(setq paragraph-start (concat paragraph-start "\\|--This line, and those below, 
will be ignored--"))
(setq paragraph-separate (concat paragraph-separate "\\|--This line, and those 
below, will be ignored--"))
#v-

and thought I might be able to string something together to deal with
adjacent quoted text in news posts.

#v+
(setq paragraph-start (concat paragraph-start "\\|[> \t]*\\(-- *\\)?$"))
(setq paragraph-separate (concat paragraph-start "\\|[> \t]*\\(-- *\\)?$"))
#v-

That seems to do what I want, but I welcome improvements.


-- 
The three-martini lunch is the epitome of American efficiency.
Where else can you get an earful, a bellyful and a snootful at
the same time?                             [Gerald Ford, 1978]


reply via email to

[Prev in Thread] Current Thread [Next in Thread]