1 Return-Path: <too@guru-group.fi>
\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 arlo.cworth.org (Postfix) with ESMTP id 15D266DE0B38
\r
6 for <notmuch@notmuchmail.org>; Wed, 2 Sep 2015 07:36:20 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at cworth.org
\r
11 X-Spam-Status: No, score=0.232 tagged_above=-999 required=5 tests=[AWL=0.772,
\r
12 RP_MATCHES_RCVD=-0.55, T_HEADER_FROM_DIFFERENT_DOMAINS=0.01]
\r
14 Received: from arlo.cworth.org ([127.0.0.1])
\r
15 by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)
\r
16 with ESMTP id tfFZ3ZQxj0SL for <notmuch@notmuchmail.org>;
\r
17 Wed, 2 Sep 2015 07:36:17 -0700 (PDT)
\r
18 Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])
\r
19 by arlo.cworth.org (Postfix) with ESMTP id 1DC916DE0C3A
\r
20 for <notmuch@notmuchmail.org>; Wed, 2 Sep 2015 07:36:16 -0700 (PDT)
\r
21 Received: by guru.guru-group.fi (Postfix, from userid 501)
\r
22 id 4511D10034D; Wed, 2 Sep 2015 17:34:47 +0300 (EEST)
\r
23 From: Tomi Ollila <tomi.ollila@iki.fi>
\r
24 To: notmuch@notmuchmail.org
\r
25 Subject: [PATCH 3/4] emacs: add function to resend message to new recipients
\r
26 Date: Wed, 2 Sep 2015 17:34:41 +0300
\r
27 Message-Id: <1441204482-26509-3-git-send-email-tomi.ollila@iki.fi>
\r
28 X-Mailer: git-send-email 2.0.0
\r
29 In-Reply-To: <1441204482-26509-1-git-send-email-tomi.ollila@iki.fi>
\r
30 References: <1441204482-26509-1-git-send-email-tomi.ollila@iki.fi>
\r
31 Cc: tomi.ollila@iki.fi
\r
32 X-BeenThere: notmuch@notmuchmail.org
\r
33 X-Mailman-Version: 2.1.18
\r
35 List-Id: "Use and development of the notmuch mail system."
\r
36 <notmuch.notmuchmail.org>
\r
37 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
38 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
39 List-Archive: <http://notmuchmail.org/pipermail/notmuch/>
\r
40 List-Post: <mailto:notmuch@notmuchmail.org>
\r
41 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
42 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
43 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
44 X-List-Received-Date: Wed, 02 Sep 2015 14:36:20 -0000
\r
46 The new function notmuch-show-message-resend re-sends
\r
47 message to new recipients using #'message-resend.
\r
49 Recipients are read from minibuffer as a comma-separated
\r
50 string (with some keyboard support including tab completion).
\r
52 Final confirmation before sending is asked.
\r
55 Since id:1440619626-18768-2-git-send-email-tomi.ollila@iki.fi
\r
56 - changed (bury-buffer) to (notmuch-bury-or-kill-this-buffer)
\r
57 - it is hard to have the buffer been kept around but it is posiible
\r
59 emacs/notmuch-address.el | 19 +++++++++++++++++++
\r
60 emacs/notmuch-show.el | 8 ++++++++
\r
61 2 files changed, 27 insertions(+)
\r
63 diff --git a/emacs/notmuch-address.el b/emacs/notmuch-address.el
\r
64 index 8982a415ce11..83788efd3c1b 100644
\r
65 --- a/emacs/notmuch-address.el
\r
66 +++ b/emacs/notmuch-address.el
\r
67 @@ -119,4 +119,23 @@ (defun notmuch-address-locate-command (command)
\r
71 +(defun notmuch-address-from-minibuffer (prompt)
\r
72 + (if (not (notmuch-address--message-insinuated))
\r
73 + (read-string prompt)
\r
74 + (let ((rmap (copy-keymap minibuffer-local-map))
\r
75 + (omap minibuffer-local-map))
\r
76 + ;; Configure TAB to start completion when executing read-string.
\r
77 + ;; "Original" minibuffer keymap is restored just before calling
\r
78 + ;; notmuch-address-expand-name as it may also use minibuffer-local-map
\r
79 + ;; (completing-read probably does not but if something else is used there).
\r
80 + (define-key rmap "\C-i" (lambda () ;; TAB
\r
82 + (let ((enable-recursive-minibuffers t)
\r
83 + (minibuffer-local-map omap))
\r
84 + (notmuch-address-expand-name))))
\r
85 + (let ((minibuffer-local-map rmap))
\r
86 + (read-string prompt)))))
\r
90 (provide 'notmuch-address)
\r
91 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
\r
92 index 0565ab0725b2..046cb0e41f0b 100644
\r
93 --- a/emacs/notmuch-show.el
\r
94 +++ b/emacs/notmuch-show.el
\r
95 @@ -1806,6 +1806,14 @@ (defun notmuch-show-forward-message (&optional prompt-for-sender)
\r
96 (with-current-notmuch-show-message
\r
97 (notmuch-mua-new-forward-message prompt-for-sender)))
\r
99 +(defun notmuch-show-resend-message (addresses)
\r
100 + "Resend the current message."
\r
101 + (interactive (list (notmuch-address-from-minibuffer "Resend to: ")))
\r
102 + (when (yes-or-no-p (concat "Confirm resend to " addresses " "))
\r
103 + (notmuch-show-view-raw-message)
\r
104 + (message-resend addresses)
\r
105 + (notmuch-bury-or-kill-this-buffer)))
\r
107 (defun notmuch-show-next-message (&optional pop-at-end)
\r
108 "Show the next message.
\r