1 Return-Path: <dme@dme.org>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id 93FBC4196F0
\r
6 for <notmuch@notmuchmail.org>; Tue, 4 May 2010 06:44:38 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5
\r
12 tests=[BAYES_00=-1.9] autolearn=ham
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id Fk+NaJWd0E4i for <notmuch@notmuchmail.org>;
\r
16 Tue, 4 May 2010 06:44:37 -0700 (PDT)
\r
17 Received: from mail-wy0-f181.google.com (mail-wy0-f181.google.com
\r
19 by olra.theworths.org (Postfix) with ESMTP id B5922431FC1
\r
20 for <notmuch@notmuchmail.org>; Tue, 4 May 2010 06:44:37 -0700 (PDT)
\r
21 Received: by wyf28 with SMTP id 28so2319220wyf.26
\r
22 for <notmuch@notmuchmail.org>; Tue, 04 May 2010 06:44:36 -0700 (PDT)
\r
23 Received: by 10.227.129.139 with SMTP id o11mr1180680wbs.113.1272980676736;
\r
24 Tue, 04 May 2010 06:44:36 -0700 (PDT)
\r
25 Received: from ut.hh.sledj.net (gmp-ea-fw-1.sun.com [192.18.1.36])
\r
26 by mx.google.com with ESMTPS id u8sm49866826wbc.5.2010.05.04.06.44.35
\r
27 (version=TLSv1/SSLv3 cipher=RC4-MD5);
\r
28 Tue, 04 May 2010 06:44:35 -0700 (PDT)
\r
29 Received: by ut.hh.sledj.net (Postfix, from userid 1000)
\r
30 id 4056D594121; Tue, 4 May 2010 14:45:15 +0100 (BST)
\r
31 From: David Edmondson <dme@dme.org>
\r
32 To: notmuch@notmuchmail.org
\r
33 Subject: [PATCH] emacs: More functionality for `notmuch-wash-tidy-citations'.
\r
34 Date: Tue, 4 May 2010 14:45:14 +0100
\r
35 Message-Id: <1272980714-11315-1-git-send-email-dme@dme.org>
\r
36 X-Mailer: git-send-email 1.7.0
\r
37 X-BeenThere: notmuch@notmuchmail.org
\r
38 X-Mailman-Version: 2.1.13
\r
40 List-Id: "Use and development of the notmuch mail system."
\r
41 <notmuch.notmuchmail.org>
\r
42 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
43 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
44 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
45 List-Post: <mailto:notmuch@notmuchmail.org>
\r
46 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
47 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
48 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
49 X-List-Received-Date: Tue, 04 May 2010 13:44:38 -0000
\r
52 - Insert a blank line before a citation if there isn't one,
\r
53 - Insert a blank line after a citation if there isn't one.
\r
55 emacs/notmuch-wash.el | 12 +++++++++++-
\r
56 1 files changed, 11 insertions(+), 1 deletions(-)
\r
58 diff --git a/emacs/notmuch-wash.el b/emacs/notmuch-wash.el
\r
59 index 46e1824..5347ddc 100644
\r
60 --- a/emacs/notmuch-wash.el
\r
61 +++ b/emacs/notmuch-wash.el
\r
62 @@ -214,7 +214,17 @@ Perform four transformations on the message body:
\r
64 (goto-char (point-min))
\r
65 (while (re-search-forward "\\(^>[> ]*\n\\)\\(^$\\|^[^>].*\\)" nil t)
\r
66 - (replace-match "\\2")))
\r
67 + (replace-match "\\2"))
\r
69 + ;; Insert a blank line before a citation if there isn't one.
\r
70 + (goto-char (point-min))
\r
71 + (while (re-search-forward "\\(^[^>].+\\)\n>" nil t)
\r
72 + (replace-match "\\1\n\n>"))
\r
74 + ;; Insert a blank line after a citation if there isn't one.
\r
75 + (goto-char (point-min))
\r
76 + (while (re-search-forward "\\(^>.+\\)\n\\([^>]\\)" nil t)
\r
77 + (replace-match "\\1\n\n\\2")))
\r