Re: [PATCH 0/4] Allow specifying alternate names for addresses in other_email
[notmuch-archives.git] / 6c / 7441ab075b9a4298e403e545637cf2346fdd36
1 Return-Path: <aaronecay@gmail.com>\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 A7E49431FD0\r
6         for <notmuch@notmuchmail.org>; Sat, 17 Dec 2011 07:25:00 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 1.7\r
10 X-Spam-Level: *\r
11 X-Spam-Status: No, score=1.7 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13         FREEMAIL_FROM=0.001, FREEMAIL_REPLY=2.499, RCVD_IN_DNSWL_LOW=-0.7]\r
14         autolearn=disabled\r
15 Received: from olra.theworths.org ([127.0.0.1])\r
16         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
17         with ESMTP id Iatxo83ak405 for <notmuch@notmuchmail.org>;\r
18         Sat, 17 Dec 2011 07:24:59 -0800 (PST)\r
19 Received: from mail-qy0-f181.google.com (mail-qy0-f181.google.com\r
20         [209.85.216.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
21         (No client certificate requested)\r
22         by olra.theworths.org (Postfix) with ESMTPS id 200CF431FB6\r
23         for <notmuch@notmuchmail.org>; Sat, 17 Dec 2011 07:24:59 -0800 (PST)\r
24 Received: by qcha6 with SMTP id a6so2940758qch.26\r
25         for <notmuch@notmuchmail.org>; Sat, 17 Dec 2011 07:24:57 -0800 (PST)\r
26 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
27         h=from:to:subject:date:message-id:x-mailer:in-reply-to:references;\r
28         bh=xBRstSCdj83T18rEYyNDka7Mf2x+S+75vqj0taTviV4=;\r
29         b=S5PAbtKglmvp5UGmw75h+HaspUKUVNMSVs3+tSTsq6RBBs6jv9MR8MM5TBOGYsmJTo\r
30         h4DLJlNSx4l34BGCyizcSW0ZufAaSX0fW3ijVkkVai3xGB4b+2xTih0m7v5vgl0N02yZ\r
31         yEVFgcGLW5WsSjDzvZgW7vqQ8doFwypFok1i8=\r
32 Received: by 10.229.137.83 with SMTP id v19mr3199246qct.82.1324135497349;\r
33         Sat, 17 Dec 2011 07:24:57 -0800 (PST)\r
34 Received: from localhost.localdomain (c-68-80-94-73.hsd1.pa.comcast.net.\r
35         [68.80.94.73])\r
36         by mx.google.com with ESMTPS id ha3sm26915169qab.2.2011.12.17.07.24.56\r
37         (version=TLSv1/SSLv3 cipher=OTHER);\r
38         Sat, 17 Dec 2011 07:24:56 -0800 (PST)\r
39 From: Aaron Ecay <aaronecay@gmail.com>\r
40 To: notmuch@notmuchmail.org\r
41 Subject: [PATCH] [emacs] Add an argument to notmuch-mua-mail\r
42 Date: Sat, 17 Dec 2011 10:24:47 -0500\r
43 Message-Id: <1324135487-4130-1-git-send-email-aaronecay@gmail.com>\r
44 X-Mailer: git-send-email 1.7.8\r
45 In-Reply-To: <87ty4zw9b5.fsf@gmail.com>\r
46 References: <87ty4zw9b5.fsf@gmail.com>\r
47 X-BeenThere: notmuch@notmuchmail.org\r
48 X-Mailman-Version: 2.1.13\r
49 Precedence: list\r
50 List-Id: "Use and development of the notmuch mail system."\r
51         <notmuch.notmuchmail.org>\r
52 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
53         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
54 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
55 List-Post: <mailto:notmuch@notmuchmail.org>\r
56 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
57 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
58         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
59 X-List-Received-Date: Sat, 17 Dec 2011 15:25:00 -0000\r
60 \r
61 >From the emacs changelog:\r
62 \r
63   ** `compose-mail' now accepts an optional 8th arg, RETURN-ACTION, and\r
64   passes it to the mail user agent function.  This argument specifies an\r
65   action for returning to the caller after finishing with the mail.\r
66   This is currently used by Rmail to delete a mail window.\r
67 \r
68 Under Emacs 24, notmuch breaks when this argument is passed to it by a\r
69 function in another part of Emacs.  One example of a functon that does\r
70 this is report-emacs-bug -- so notmuch users cannot file emacs bug\r
71 reports!\r
72 \r
73 This patch also adds a &rest argument to the arg-list of this function,\r
74 to future-proof against such changes.  This is adapted from the approach\r
75 taken by message-mail, a similar function built into emacs.\r
76 \r
77 This patch was originally submitted by richardmurri@gmail.com on Aug. 1:\r
78 id:"877h6x6oor.fsf@veracitynetworks.com"\r
79 ---\r
80  emacs/notmuch-mua.el |   10 +++++-----\r
81  1 files changed, 5 insertions(+), 5 deletions(-)\r
82 \r
83 diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el\r
84 index 8824b08..b525762 100644\r
85 --- a/emacs/notmuch-mua.el\r
86 +++ b/emacs/notmuch-mua.el\r
87 @@ -124,9 +124,10 @@ list."\r
88  \r
89    (message-goto-to))\r
90  \r
91 -(defun notmuch-mua-mail (&optional to subject other-headers continue\r
92 -                                  switch-function yank-action send-actions)\r
93 -  "Invoke the notmuch mail composition window."\r
94 +(defun notmuch-mua-mail (&optional to subject other-headers &rest other-args)\r
95 +  "Invoke the notmuch mail composition window.\r
96 +\r
97 +OTHER-ARGS are passed through to `message-mail'."\r
98    (interactive)\r
99  \r
100    (when notmuch-mua-user-agent-function\r
101 @@ -138,8 +139,7 @@ list."\r
102      (push (cons "From" (concat\r
103                         (notmuch-user-name) " <" (notmuch-user-primary-email) ">")) other-headers))\r
104  \r
105 -  (message-mail to subject other-headers continue\r
106 -               switch-function yank-action send-actions)\r
107 +  (apply #'message-mail to subject other-headers other-args)\r
108    (message-sort-headers)\r
109    (message-hide-headers)\r
110    (set-buffer-modified-p nil)\r
111 -- \r
112 1.7.8\r
113 \r