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 15975429E2A
\r
6 for <notmuch@notmuchmail.org>; Wed, 25 May 2011 06:23:05 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\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
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 kCMkAWgA6HG9 for <notmuch@notmuchmail.org>;
\r
17 Wed, 25 May 2011 06:23:03 -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 30E3D429E28
\r
20 for <notmuch@notmuchmail.org>; Wed, 25 May 2011 06:23:03 -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 8C7366A06AE;
\r
23 Wed, 25 May 2011 15:23:02 +0200 (CEST)
\r
24 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=schnouki.net;
\r
25 s=key-schnouki; t=1306329782;
\r
26 bh=km6loWdPP0dBJtCwXMoRxFBBmd0rIh5s7tiyhgW2SyE=;
\r
27 h=From:To:Subject:Date:Message-Id:In-Reply-To:References;
\r
28 b=CHrUAQSw9C07Q/bnrcBDuNyD9Bj9o+6kn47604jP6Jxg/ZFVimBLOZCXTyjW5OQtC
\r
29 o8BFaui0+SEVpewcQP5ZlrGd+2A/36MyuEsGxQ8d7LxGKHiw1hAZV7lrdI26bD2i2d
\r
30 obRZQd8DSrnAXAKwbUhYsri/+W81K0ApryRjif3s=
\r
31 From: Thomas Jost <schnouki@schnouki.net>
\r
32 To: notmuch@notmuchmail.org
\r
33 Subject: [PATCH 3/4] emacs: Allow the user to choose the "From" address when
\r
34 forwarding a message.
\r
35 Date: Wed, 25 May 2011 15:22:39 +0200
\r
36 Message-Id: <1306329760-16665-3-git-send-email-schnouki@schnouki.net>
\r
37 X-Mailer: git-send-email 1.7.5.1
\r
38 In-Reply-To: <1306329760-16665-1-git-send-email-schnouki@schnouki.net>
\r
39 References: <87lixu7w71.fsf@thor.loria.fr>
\r
40 <1306329760-16665-1-git-send-email-schnouki@schnouki.net>
\r
41 X-BeenThere: notmuch@notmuchmail.org
\r
42 X-Mailman-Version: 2.1.13
\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, 25 May 2011 13:23:05 -0000
\r
56 emacs/notmuch-mua.el | 8 ++++++++
\r
57 emacs/notmuch-show.el | 7 +++++++
\r
58 2 files changed, 15 insertions(+), 0 deletions(-)
\r
60 diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el
\r
61 index 0bde02c..7c08a6e 100644
\r
62 --- a/emacs/notmuch-mua.el
\r
63 +++ b/emacs/notmuch-mua.el
\r
64 @@ -182,6 +182,14 @@ name and addresses configured in the notmuch configuration file."
\r
66 (notmuch-mua-new-mail t))
\r
68 +(defun notmuch-mua-forward-message-prompt-for-sender ()
\r
70 + (let* ((sender (notmuch-mua-prompt-for-sender))
\r
71 + (address-components (mail-extract-address-components sender))
\r
72 + (user-full-name (car address-components))
\r
73 + (user-mail-address (cadr address-components)))
\r
74 + (notmuch-mua-forward-message)))
\r
76 (defun notmuch-mua-send-and-exit (&optional arg)
\r
78 (message-send-and-exit arg))
\r
79 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
\r
80 index 93f46ac..50b20b2 100644
\r
81 --- a/emacs/notmuch-show.el
\r
82 +++ b/emacs/notmuch-show.el
\r
83 @@ -850,6 +850,7 @@ function is used. "
\r
84 (define-key map "m" 'notmuch-mua-new-mail)
\r
85 (define-key map "M" 'notmuch-mua-new-mail-prompt-for-sender)
\r
86 (define-key map "f" 'notmuch-show-forward-message)
\r
87 + (define-key map "F" 'notmuch-show-forward-message-prompt-for-sender)
\r
88 (define-key map "r" 'notmuch-show-reply)
\r
89 (define-key map "|" 'notmuch-show-pipe-message)
\r
90 (define-key map "w" 'notmuch-show-save-attachments)
\r
91 @@ -1165,6 +1166,12 @@ any effects from previous calls to
\r
92 (with-current-notmuch-show-message
\r
93 (notmuch-mua-forward-message)))
\r
95 +(defun notmuch-show-forward-message-prompt-for-sender ()
\r
96 + "Forward the current message, prompting for the From: address first."
\r
98 + (with-current-notmuch-show-message
\r
99 + (notmuch-mua-forward-message-prompt-for-sender)))
\r
101 (defun notmuch-show-next-message ()
\r
102 "Show the next message."
\r