From: Adam Funk <a24061@ducksburg.com>
To: help-gnu-emacs@gnu.org
Subject: fill-paragraph in USENET messages (was: Quotelength with slrn and vim)
Date: Mon, 09 Aug 2010 20:21:47 +0100 [thread overview]
Message-ID: <b316j7x3a5.ln2@news.ducksburg.com> (raw)
In-Reply-To: 1mg3j7xuou.ln2@news.ducksburg.com
[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]
parent reply other threads:[~2010-08-09 19:21 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <1mg3j7xuou.ln2@news.ducksburg.com>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b316j7x3a5.ln2@news.ducksburg.com \
--to=a24061@ducksburg.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.