* fill-paragraph in USENET messages (was: Quotelength with slrn and vim)
[not found] ` <1mg3j7xuou.ln2@news.ducksburg.com>
@ 2010-08-09 19:21 ` Adam Funk
0 siblings, 0 replies; only message in thread
From: Adam Funk @ 2010-08-09 19:21 UTC (permalink / raw
To: help-gnu-emacs
[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]
^ permalink raw reply [flat|nested] only message in thread