Re: [PATCH 0/4] Allow specifying alternate names for addresses in other_email
[notmuch-archives.git] / e5 / 99c60f385bb15f92b65ad85506db10418ae739
1 Return-Path: <markwalters1009@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 9F506429E45\r
6         for <notmuch@notmuchmail.org>; Fri,  5 Jul 2013 11:13:04 -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: 0.201\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0.201 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13         FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001,\r
14         RCVD_IN_DNSWL_LOW=-0.7] 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 EokVyktAayNw for <notmuch@notmuchmail.org>;\r
18         Fri,  5 Jul 2013 11:12:58 -0700 (PDT)\r
19 Received: from mail-ea0-f171.google.com (mail-ea0-f171.google.com\r
20         [209.85.215.171]) (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 13C09431FC4\r
23         for <notmuch@notmuchmail.org>; Fri,  5 Jul 2013 11:11:53 -0700 (PDT)\r
24 Received: by mail-ea0-f171.google.com with SMTP id m14so1644272eaj.30\r
25         for <notmuch@notmuchmail.org>; Fri, 05 Jul 2013 11:11:52 -0700 (PDT)\r
26 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
27         h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references;\r
28         bh=Wnc0CMw22ZX1K84TiUD7Qom991BIBFdpC3W6s8EjsJ8=;\r
29         b=adUdcgwj+3Egm7BSOljOjkgHD1oeYvWkR83S7YuS+9FTBvn0LEsuAFsKVsZXnY3f4a\r
30         0P9Aqb2kRWzt2q7GwhDOVDlyrNt0NrIIdeq/XgoztB7f7XnpdLyzGpvBRpyOLg7CIUXR\r
31         D27v6dC/fLJ6ux6X3WNkwmft0kDzGc5Rd3ZVGOnQv9CyswWIK1CYq2sZ67TVnRpQJIMP\r
32         5xyBtocUCgRHWWxGoveY6BP+Wy6wqeruKRKdi/YKH9EIv8+s6HWPU6lDZ9d5VdRWclBK\r
33         8/F3GzSHa8jIhv5yF6itkLDGEQrghn2ywLaCJ5ehmE/VMMRBKA8AM/4eBWnxLCh82phy\r
34         ezHA==\r
35 X-Received: by 10.14.115.9 with SMTP id d9mr13274564eeh.87.1373047912940;\r
36         Fri, 05 Jul 2013 11:11:52 -0700 (PDT)\r
37 Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31])\r
38         by mx.google.com with ESMTPSA id\r
39         ci50sm15891053eeb.12.2013.07.05.11.11.52 for <multiple recipients>\r
40         (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
41         Fri, 05 Jul 2013 11:11:52 -0700 (PDT)\r
42 From: Mark Walters <markwalters1009@gmail.com>\r
43 To: notmuch@notmuchmail.org\r
44 Subject: [PATCH 11/11] contrib: pick: use close-message-pane for reply etc\r
45 Date: Fri,  5 Jul 2013 19:11:18 +0100\r
46 Message-Id: <1373047878-20822-12-git-send-email-markwalters1009@gmail.com>\r
47 X-Mailer: git-send-email 1.7.9.1\r
48 In-Reply-To: <1373047878-20822-1-git-send-email-markwalters1009@gmail.com>\r
49 References: <1373047878-20822-1-git-send-email-markwalters1009@gmail.com>\r
50 X-BeenThere: notmuch@notmuchmail.org\r
51 X-Mailman-Version: 2.1.13\r
52 Precedence: list\r
53 List-Id: "Use and development of the notmuch mail system."\r
54         <notmuch.notmuchmail.org>\r
55 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
56         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
57 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
58 List-Post: <mailto:notmuch@notmuchmail.org>\r
59 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
60 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
61         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
62 X-List-Received-Date: Fri, 05 Jul 2013 18:13:05 -0000\r
63 \r
64 We can save some code duplication by using the new close-message-pane\r
65 functionality for reply, forward, and new mail.\r
66 ---\r
67  contrib/notmuch-pick/notmuch-pick.el |   43 +++------------------------------\r
68  1 files changed, 4 insertions(+), 39 deletions(-)\r
69 \r
70 diff --git a/contrib/notmuch-pick/notmuch-pick.el b/contrib/notmuch-pick/notmuch-pick.el\r
71 index 15c7e74..9587dda 100644\r
72 --- a/contrib/notmuch-pick/notmuch-pick.el\r
73 +++ b/contrib/notmuch-pick/notmuch-pick.el\r
74 @@ -236,6 +236,10 @@ FUNC."\r
75      (define-key map "/" (notmuch-pick-to-message-pane #'notmuch-pick-button-activate))\r
76  \r
77      ;; bindings from show (or elsewhere) but we close the message pane first.\r
78 +    (define-key map "m" (notmuch-pick-close-message-pane-and #'notmuch-mua-new-mail))\r
79 +    (define-key map "f" (notmuch-pick-close-message-pane-and #'notmuch-show-forward-message))\r
80 +    (define-key map "r" (notmuch-pick-close-message-pane-and #'notmuch-show-reply-sender))\r
81 +    (define-key map "R" (notmuch-pick-close-message-pane-and #'notmuch-show-reply))\r
82      (define-key map "V" (notmuch-pick-close-message-pane-and #'notmuch-show-view-raw-message))\r
83      (define-key map "?" (notmuch-pick-close-message-pane-and #'notmuch-help))\r
84  \r
85 @@ -246,10 +250,6 @@ FUNC."\r
86      (define-key map "=" 'notmuch-pick-refresh-view)\r
87      (define-key map "s" 'notmuch-pick-to-search)\r
88      (define-key map "z" 'notmuch-pick-to-pick)\r
89 -    (define-key map "m" 'notmuch-pick-new-mail)\r
90 -    (define-key map "f" 'notmuch-pick-forward-message)\r
91 -    (define-key map "r" 'notmuch-pick-reply-sender)\r
92 -    (define-key map "R" 'notmuch-pick-reply)\r
93      (define-key map "n" 'notmuch-pick-next-matching-message)\r
94      (define-key map "p" 'notmuch-pick-prev-matching-message)\r
95      (define-key map "N" 'notmuch-pick-next-message)\r
96 @@ -599,41 +599,6 @@ message will be \"unarchived\", i.e. the tag changes in\r
97                          target\r
98                          (get-buffer buffer-name))))\r
99  \r
100 -(defmacro with-current-notmuch-pick-message (&rest body)\r
101 -  "Evaluate body with current buffer set to the text of current message"\r
102 -  `(save-excursion\r
103 -     (let ((id (notmuch-pick-get-message-id)))\r
104 -       (let ((buf (generate-new-buffer (concat "*notmuch-msg-" id "*"))))\r
105 -         (with-current-buffer buf\r
106 -           (call-process notmuch-command nil t nil "show" "--format=raw" id)\r
107 -           ,@body)\r
108 -        (kill-buffer buf)))))\r
109 -\r
110 -(defun notmuch-pick-new-mail (&optional prompt-for-sender)\r
111 -  "Compose new mail."\r
112 -  (interactive "P")\r
113 -  (notmuch-pick-close-message-window)\r
114 -  (notmuch-mua-new-mail prompt-for-sender ))\r
115 -\r
116 -(defun notmuch-pick-forward-message (&optional prompt-for-sender)\r
117 -  "Forward the current message."\r
118 -  (interactive "P")\r
119 -  (notmuch-pick-close-message-window)\r
120 -  (with-current-notmuch-pick-message\r
121 -   (notmuch-mua-new-forward-message prompt-for-sender)))\r
122 -\r
123 -(defun notmuch-pick-reply (&optional prompt-for-sender)\r
124 -  "Reply to the sender and all recipients of the current message."\r
125 -  (interactive "P")\r
126 -  (notmuch-pick-close-message-window)\r
127 -  (notmuch-mua-new-reply (notmuch-pick-get-message-id) prompt-for-sender t))\r
128 -\r
129 -(defun notmuch-pick-reply-sender (&optional prompt-for-sender)\r
130 -  "Reply to the sender of the current message."\r
131 -  (interactive "P")\r
132 -  (notmuch-pick-close-message-window)\r
133 -  (notmuch-mua-new-reply (notmuch-pick-get-message-id) prompt-for-sender nil))\r
134 -\r
135  (defun notmuch-pick-clean-address (address)\r
136    "Try to clean a single email ADDRESS for display. Return\r
137  AUTHOR_NAME if present, otherwise return AUTHOR_EMAIL. Return\r
138 -- \r
139 1.7.9.1\r
140 \r