From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Markus Triska Newsgroups: gmane.emacs.help Subject: Re: Macro to fold References header in news or mail onto multiple lines? Date: Wed, 25 Oct 2006 14:22:09 +0200 Message-ID: <87y7r437ri.fsf@gmx.at> References: <9qn314-18p.ln1@news.ducksburg.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-Trace: sea.gmane.org 1161780209 7509 80.91.229.2 (25 Oct 2006 12:43:29 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 25 Oct 2006 12:43:29 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Oct 25 14:43:24 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Gci5m-0005Ww-Q0 for geh-help-gnu-emacs@m.gmane.org; Wed, 25 Oct 2006 14:42:47 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Gci5m-0002jZ-8t for geh-help-gnu-emacs@m.gmane.org; Wed, 25 Oct 2006 08:42:46 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!news1.google.com!news.germany.com!newsfeed.utanet.at!newsfeed.wu-wien.ac.at!aconews-feed.univie.ac.at!aconews.univie.ac.at!not-for-mail Original-Newsgroups: gnu.emacs.help,comp.emacs User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:Y5AwoBp3sxpiKAJHrd8wk1Mjzsc= Original-Lines: 19 Original-NNTP-Posting-Host: v223.demo.tuwien.ac.at Original-X-Trace: 1161778470 tunews.univie.ac.at 11094 128.131.204.223 Original-X-Complaints-To: abuse@tuwien.ac.at Original-Xref: shelby.stanford.edu gnu.emacs.help:142651 comp.emacs:93179 Original-To: help-gnu-emacs@gnu.org 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: news.gmane.org gmane.emacs.help:38271 Archived-At: Adam Funk writes: > > References: <37029@invalid> <3203A@example.com> ... > > into this sequence of lines > > References: <37029@invalid> > <3203A@example.com> > > <5DFF1@example.org> (defun fold-references () (interactive) (save-excursion (goto-char (point-min)) (search-forward "References: ") (while (looking-at "<.*?>") (goto-char (match-end 0)) (insert "\n") (delete-horizontal-space) (insert "\t")) (delete-char -2))) ; remove tab & newline Best wishes! -- Markus Triska