Re: [PATCH 0/4] Allow specifying alternate names for addresses in other_email
[notmuch-archives.git] / 4e / 55fb699dd0db7785dce5edcbc131304c366055
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 48FA74196F2\r
6         for <notmuch@notmuchmail.org>; Wed, 19 May 2010 01:54:59 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -1.9\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5\r
12         tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001] 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 2M7kFKf4Zr80 for <notmuch@notmuchmail.org>;\r
16         Wed, 19 May 2010 01:54:47 -0700 (PDT)\r
17 Received: from mail-ew0-f213.google.com (mail-ew0-f213.google.com\r
18         [209.85.219.213])\r
19         by olra.theworths.org (Postfix) with ESMTP id 6B8DC41733F\r
20         for <notmuch@notmuchmail.org>; Wed, 19 May 2010 01:53:47 -0700 (PDT)\r
21 Received: by mail-ew0-f213.google.com with SMTP id 5so1814153ewy.0\r
22         for <notmuch@notmuchmail.org>; Wed, 19 May 2010 01:53:47 -0700 (PDT)\r
23 Received: by 10.213.52.139 with SMTP id i11mr3289701ebg.26.1274259226874;\r
24         Wed, 19 May 2010 01:53:46 -0700 (PDT)\r
25 Received: from ut.hh.sledj.net (host83-217-165-81.dsl.vispa.com\r
26         [83.217.165.81])\r
27         by mx.google.com with ESMTPS id 15sm3510933ewy.0.2010.05.19.01.53.43\r
28         (version=TLSv1/SSLv3 cipher=RC4-MD5);\r
29         Wed, 19 May 2010 01:53:45 -0700 (PDT)\r
30 Received: by ut.hh.sledj.net (Postfix, from userid 1000)\r
31         id D77AC5940AF; Wed, 19 May 2010 08:03:45 +0100 (BST)\r
32 From: David Edmondson <dme@dme.org>\r
33 To: notmuch@notmuchmail.org\r
34 Subject: [PATCH 08/13] emacs: Reuse rather than reinvent message header\r
35         filtering\r
36 Date: Wed, 19 May 2010 08:03:35 +0100\r
37 Message-Id: <1274252620-1249-9-git-send-email-dme@dme.org>\r
38 X-Mailer: git-send-email 1.7.1\r
39 In-Reply-To: <1274252620-1249-1-git-send-email-dme@dme.org>\r
40 References: <1274252620-1249-1-git-send-email-dme@dme.org>\r
41 X-BeenThere: notmuch@notmuchmail.org\r
42 X-Mailman-Version: 2.1.13\r
43 Precedence: list\r
44 List-Id: "Use and development of the notmuch mail system."\r
45         <notmuch.notmuchmail.org>\r
46 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
47         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
48 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
49 List-Post: <mailto:notmuch@notmuchmail.org>\r
50 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
51 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
52         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
53 X-List-Received-Date: Wed, 19 May 2010 08:54:59 -0000\r
54 \r
55 From: Sebastian Spaeth <Sebastian@SSpaeth.de>\r
56 \r
57 In notmuch-mua-reply we were filtering out the Subject and To headers\r
58 manually in a loop, but message mode offers a nice function for\r
59 exactly that. Simplify the code by using that. Also, as\r
60 notmuch-mua-mail already sorts and hides headers that we want sorted\r
61 and hidden, we can safely remove those 2 functions from here as well.\r
62 \r
63 Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>\r
64 ---\r
65  emacs/notmuch-mua.el |    7 +------\r
66  1 files changed, 1 insertions(+), 6 deletions(-)\r
67 \r
68 diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el\r
69 index bd06e3c..6318c15 100644\r
70 --- a/emacs/notmuch-mua.el\r
71 +++ b/emacs/notmuch-mua.el\r
72 @@ -92,12 +92,7 @@ list."\r
73         ((same-window-regexps '("\\*mail .*")))\r
74        (notmuch-mua-mail (mail-header 'to headers)\r
75                         (mail-header 'subject headers)\r
76 -                       (loop for header in headers\r
77 -                             if (not (or (eq 'to (car header))\r
78 -                                         (eq 'subject (car header))))\r
79 -                             collect header)))\r
80 -    (message-sort-headers)\r
81 -    (message-hide-headers)\r
82 +                       (message-headers-to-generate headers t '(to subject))))\r
83      ;; insert the message body - but put it in front of the signature\r
84      ;; if one is present\r
85      (goto-char (point-max))\r
86 -- \r
87 1.7.1\r
88 \r