Re: [PATCH v4 01/16] add util/search-path.{c, h} to test for executables in $PATH
[notmuch-archives.git] / f4 / e18cbe35d2ff70aab4a16f4d085c526a936482
1 Return-Path: <schnouki@schnouki.net>\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 23495431FD0\r
6         for <notmuch@notmuchmail.org>; Thu, 26 May 2011 01:41:55 -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.1\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.1 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1]\r
13         autolearn=disabled\r
14 Received: from olra.theworths.org ([127.0.0.1])\r
15         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
16         with ESMTP id A7icfLCdxj5D for <notmuch@notmuchmail.org>;\r
17         Thu, 26 May 2011 01:41:54 -0700 (PDT)\r
18 Received: from ks3536.kimsufi.com (schnouki.net [87.98.217.222])\r
19         by olra.theworths.org (Postfix) with ESMTP id D79AD429E2A\r
20         for <notmuch@notmuchmail.org>; Thu, 26 May 2011 01:41:52 -0700 (PDT)\r
21 Received: from localhost.localdomain (thor.loria.fr [152.81.12.250])\r
22         by ks3536.kimsufi.com (Postfix) with ESMTPSA id 2BF566A06AE;\r
23         Thu, 26 May 2011 10:41:52 +0200 (CEST)\r
24 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=schnouki.net;\r
25         s=key-schnouki; t=1306399312;\r
26         bh=+2CzJhgxw0A4gsYD0gsa7WXaz25Oxn6fCO/8XjTOF2s=;\r
27         h=From:To:Subject:Date:Message-Id:In-Reply-To:References;\r
28         b=ODzmGnSviUV0BCLjaBvdo688lXnVYHut131iNW6P3vH39D/M6Q+1DM8NKgVDfGewd\r
29         pM/J0/WdsxwkE1+LlGYip9nC9TDycS2Ac0CtIxu0XO+0g4YCy37YweE6C9Yyl5EG8b\r
30         MGz64+mKbd6fgfSx/rcxPoMQ7o/QNpsFKUMb7K6I=\r
31 From: Thomas Jost <schnouki@schnouki.net>\r
32 To: Carl Worth <cworth@cworth.org>, Stewart Smith <stewart@flamingspork.com>,\r
33         notmuch <notmuch@notmuchmail.org>\r
34 Subject: [PATCH v2 3/4] emacs: Allow the user to choose the "From" address\r
35         when forwarding a message\r
36 Date: Thu, 26 May 2011 10:41:32 +0200\r
37 Message-Id: <1306399293-22215-3-git-send-email-schnouki@schnouki.net>\r
38 X-Mailer: git-send-email 1.7.5.1\r
39 In-Reply-To: <1306399293-22215-1-git-send-email-schnouki@schnouki.net>\r
40 References: <87hb8hlush.fsf@thor.loria.fr>\r
41         <1306399293-22215-1-git-send-email-schnouki@schnouki.net>\r
42 X-BeenThere: notmuch@notmuchmail.org\r
43 X-Mailman-Version: 2.1.13\r
44 Precedence: list\r
45 List-Id: "Use and development of the notmuch mail system."\r
46         <notmuch.notmuchmail.org>\r
47 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
48         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
49 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
50 List-Post: <mailto:notmuch@notmuchmail.org>\r
51 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
52 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
53         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
54 X-List-Received-Date: Thu, 26 May 2011 08:41:55 -0000\r
55 \r
56 When pressing C-u f, the user will be prompted for the identity to use.\r
57 ---\r
58  emacs/notmuch-mua.el  |   14 ++++++++++++++\r
59  emacs/notmuch-show.el |    6 +++---\r
60  2 files changed, 17 insertions(+), 3 deletions(-)\r
61 \r
62 diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el\r
63 index 74c9fc1..1b777d9 100644\r
64 --- a/emacs/notmuch-mua.el\r
65 +++ b/emacs/notmuch-mua.el\r
66 @@ -177,6 +177,20 @@ the From: address first."\r
67            (list (cons 'from (notmuch-mua-prompt-for-sender))))))\r
68      (notmuch-mua-mail nil nil other-headers)))\r
69  \r
70 +(defun notmuch-mua-new-forward-message (&optional prompt-for-sender)\r
71 +  "Invoke the notmuch message forwarding window.\r
72 +\r
73 +If PROMPT-FOR-SENDER is non-nil, the user will be prompted for\r
74 +the From: address first."\r
75 +  (interactive "P")\r
76 +  (if prompt-for-sender\r
77 +      (let* ((sender (notmuch-mua-prompt-for-sender))\r
78 +            (address-components (mail-extract-address-components sender))\r
79 +            (user-full-name (car address-components))\r
80 +            (user-mail-address (cadr address-components)))\r
81 +       (notmuch-mua-forward-message))\r
82 +    (notmuch-mua-forward-message)))\r
83 +\r
84  (defun notmuch-mua-send-and-exit (&optional arg)\r
85    (interactive "P")\r
86    (message-send-and-exit arg))\r
87 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
88 index 48d2926..7e493e9 100644\r
89 --- a/emacs/notmuch-show.el\r
90 +++ b/emacs/notmuch-show.el\r
91 @@ -1158,11 +1158,11 @@ any effects from previous calls to\r
92    (interactive)\r
93    (notmuch-mua-reply (notmuch-show-get-message-id)))\r
94  \r
95 -(defun notmuch-show-forward-message ()\r
96 +(defun notmuch-show-forward-message (&optional prompt-for-sender)\r
97    "Forward the current message."\r
98 -  (interactive)\r
99 +  (interactive "P")\r
100    (with-current-notmuch-show-message\r
101 -   (notmuch-mua-forward-message)))\r
102 +   (notmuch-mua-new-forward-message prompt-for-sender)))\r
103  \r
104  (defun notmuch-show-next-message ()\r
105    "Show the next message."\r
106 -- \r
107 1.7.5.1\r
108 \r