--- /dev/null
+Return-Path: <too@guru-group.fi>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by arlo.cworth.org (Postfix) with ESMTP id 15D266DE0B38\r
+ for <notmuch@notmuchmail.org>; Wed, 2 Sep 2015 07:36:20 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.232\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.232 tagged_above=-999 required=5 tests=[AWL=0.772, \r
+ RP_MATCHES_RCVD=-0.55, T_HEADER_FROM_DIFFERENT_DOMAINS=0.01]\r
+ autolearn=disabled\r
+Received: from arlo.cworth.org ([127.0.0.1])\r
+ by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id tfFZ3ZQxj0SL for <notmuch@notmuchmail.org>;\r
+ Wed, 2 Sep 2015 07:36:17 -0700 (PDT)\r
+Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
+ by arlo.cworth.org (Postfix) with ESMTP id 1DC916DE0C3A\r
+ for <notmuch@notmuchmail.org>; Wed, 2 Sep 2015 07:36:16 -0700 (PDT)\r
+Received: by guru.guru-group.fi (Postfix, from userid 501)\r
+ id 4511D10034D; Wed, 2 Sep 2015 17:34:47 +0300 (EEST)\r
+From: Tomi Ollila <tomi.ollila@iki.fi>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 3/4] emacs: add function to resend message to new recipients\r
+Date: Wed, 2 Sep 2015 17:34:41 +0300\r
+Message-Id: <1441204482-26509-3-git-send-email-tomi.ollila@iki.fi>\r
+X-Mailer: git-send-email 2.0.0\r
+In-Reply-To: <1441204482-26509-1-git-send-email-tomi.ollila@iki.fi>\r
+References: <1441204482-26509-1-git-send-email-tomi.ollila@iki.fi>\r
+Cc: tomi.ollila@iki.fi\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.18\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch/>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Wed, 02 Sep 2015 14:36:20 -0000\r
+\r
+The new function notmuch-show-message-resend re-sends\r
+message to new recipients using #'message-resend.\r
+\r
+Recipients are read from minibuffer as a comma-separated\r
+string (with some keyboard support including tab completion).\r
+\r
+Final confirmation before sending is asked.\r
+---\r
+\r
+Since id:1440619626-18768-2-git-send-email-tomi.ollila@iki.fi\r
+ - changed (bury-buffer) to (notmuch-bury-or-kill-this-buffer)\r
+ - it is hard to have the buffer been kept around but it is posiible\r
+\r
+ emacs/notmuch-address.el | 19 +++++++++++++++++++\r
+ emacs/notmuch-show.el | 8 ++++++++\r
+ 2 files changed, 27 insertions(+)\r
+\r
+diff --git a/emacs/notmuch-address.el b/emacs/notmuch-address.el\r
+index 8982a415ce11..83788efd3c1b 100644\r
+--- a/emacs/notmuch-address.el\r
++++ b/emacs/notmuch-address.el\r
+@@ -119,4 +119,23 @@ (defun notmuch-address-locate-command (command)\r
+ \r
+ ;;\r
+ \r
++(defun notmuch-address-from-minibuffer (prompt)\r
++ (if (not (notmuch-address--message-insinuated))\r
++ (read-string prompt)\r
++ (let ((rmap (copy-keymap minibuffer-local-map))\r
++ (omap minibuffer-local-map))\r
++ ;; Configure TAB to start completion when executing read-string.\r
++ ;; "Original" minibuffer keymap is restored just before calling\r
++ ;; notmuch-address-expand-name as it may also use minibuffer-local-map\r
++ ;; (completing-read probably does not but if something else is used there).\r
++ (define-key rmap "\C-i" (lambda () ;; TAB\r
++ (interactive)\r
++ (let ((enable-recursive-minibuffers t)\r
++ (minibuffer-local-map omap))\r
++ (notmuch-address-expand-name))))\r
++ (let ((minibuffer-local-map rmap))\r
++ (read-string prompt)))))\r
++\r
++;;\r
++\r
+ (provide 'notmuch-address)\r
+diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
+index 0565ab0725b2..046cb0e41f0b 100644\r
+--- a/emacs/notmuch-show.el\r
++++ b/emacs/notmuch-show.el\r
+@@ -1806,6 +1806,14 @@ (defun notmuch-show-forward-message (&optional prompt-for-sender)\r
+ (with-current-notmuch-show-message\r
+ (notmuch-mua-new-forward-message prompt-for-sender)))\r
+ \r
++(defun notmuch-show-resend-message (addresses)\r
++ "Resend the current message."\r
++ (interactive (list (notmuch-address-from-minibuffer "Resend to: ")))\r
++ (when (yes-or-no-p (concat "Confirm resend to " addresses " "))\r
++ (notmuch-show-view-raw-message)\r
++ (message-resend addresses)\r
++ (notmuch-bury-or-kill-this-buffer)))\r
++\r
+ (defun notmuch-show-next-message (&optional pop-at-end)\r
+ "Show the next message.\r
+ \r
+-- \r
+2.0.0\r
+\r