[PATCH 3/4] emacs: Allow the user to choose the "From" address when forwarding a...
authorThomas Jost <schnouki@schnouki.net>
Wed, 25 May 2011 13:22:39 +0000 (15:22 +0200)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:38:20 +0000 (09:38 -0800)
cd/3dd65589b2455d7431269a7750b80b590ebea1 [new file with mode: 0644]

diff --git a/cd/3dd65589b2455d7431269a7750b80b590ebea1 b/cd/3dd65589b2455d7431269a7750b80b590ebea1
new file mode 100644 (file)
index 0000000..c4d8d26
--- /dev/null
@@ -0,0 +1,106 @@
+Return-Path: <schnouki@schnouki.net>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 15975429E2A\r
+       for <notmuch@notmuchmail.org>; Wed, 25 May 2011 06:23:05 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.1\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.1 tagged_above=-999 required=5\r
+       tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1]\r
+       autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id kCMkAWgA6HG9 for <notmuch@notmuchmail.org>;\r
+       Wed, 25 May 2011 06:23:03 -0700 (PDT)\r
+Received: from ks3536.kimsufi.com (schnouki.net [87.98.217.222])\r
+       by olra.theworths.org (Postfix) with ESMTP id 30E3D429E28\r
+       for <notmuch@notmuchmail.org>; Wed, 25 May 2011 06:23:03 -0700 (PDT)\r
+Received: from localhost.localdomain (thor.loria.fr [152.81.12.250])\r
+       by ks3536.kimsufi.com (Postfix) with ESMTPSA id 8C7366A06AE;\r
+       Wed, 25 May 2011 15:23:02 +0200 (CEST)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=schnouki.net;\r
+       s=key-schnouki; t=1306329782;\r
+       bh=km6loWdPP0dBJtCwXMoRxFBBmd0rIh5s7tiyhgW2SyE=;\r
+       h=From:To:Subject:Date:Message-Id:In-Reply-To:References;\r
+       b=CHrUAQSw9C07Q/bnrcBDuNyD9Bj9o+6kn47604jP6Jxg/ZFVimBLOZCXTyjW5OQtC\r
+       o8BFaui0+SEVpewcQP5ZlrGd+2A/36MyuEsGxQ8d7LxGKHiw1hAZV7lrdI26bD2i2d\r
+       obRZQd8DSrnAXAKwbUhYsri/+W81K0ApryRjif3s=\r
+From: Thomas Jost <schnouki@schnouki.net>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 3/4] emacs: Allow the user to choose the "From" address when\r
+       forwarding a message.\r
+Date: Wed, 25 May 2011 15:22:39 +0200\r
+Message-Id: <1306329760-16665-3-git-send-email-schnouki@schnouki.net>\r
+X-Mailer: git-send-email 1.7.5.1\r
+In-Reply-To: <1306329760-16665-1-git-send-email-schnouki@schnouki.net>\r
+References: <87lixu7w71.fsf@thor.loria.fr>\r
+       <1306329760-16665-1-git-send-email-schnouki@schnouki.net>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\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, 25 May 2011 13:23:05 -0000\r
+\r
+---\r
+ emacs/notmuch-mua.el  |    8 ++++++++\r
+ emacs/notmuch-show.el |    7 +++++++\r
+ 2 files changed, 15 insertions(+), 0 deletions(-)\r
+\r
+diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el\r
+index 0bde02c..7c08a6e 100644\r
+--- a/emacs/notmuch-mua.el\r
++++ b/emacs/notmuch-mua.el\r
+@@ -182,6 +182,14 @@ name and addresses configured in the notmuch configuration file."\r
+   (interactive)\r
+   (notmuch-mua-new-mail t))\r
\r
++(defun notmuch-mua-forward-message-prompt-for-sender ()\r
++  (interactive)\r
++  (let* ((sender (notmuch-mua-prompt-for-sender))\r
++       (address-components (mail-extract-address-components sender))\r
++       (user-full-name (car address-components))\r
++       (user-mail-address (cadr address-components)))\r
++    (notmuch-mua-forward-message)))\r
++\r
+ (defun notmuch-mua-send-and-exit (&optional arg)\r
+   (interactive "P")\r
+   (message-send-and-exit arg))\r
+diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
+index 93f46ac..50b20b2 100644\r
+--- a/emacs/notmuch-show.el\r
++++ b/emacs/notmuch-show.el\r
+@@ -850,6 +850,7 @@ function is used. "\r
+       (define-key map "m" 'notmuch-mua-new-mail)\r
+       (define-key map "M" 'notmuch-mua-new-mail-prompt-for-sender)\r
+       (define-key map "f" 'notmuch-show-forward-message)\r
++      (define-key map "F" 'notmuch-show-forward-message-prompt-for-sender)\r
+       (define-key map "r" 'notmuch-show-reply)\r
+       (define-key map "|" 'notmuch-show-pipe-message)\r
+       (define-key map "w" 'notmuch-show-save-attachments)\r
+@@ -1165,6 +1166,12 @@ any effects from previous calls to\r
+   (with-current-notmuch-show-message\r
+    (notmuch-mua-forward-message)))\r
\r
++(defun notmuch-show-forward-message-prompt-for-sender ()\r
++  "Forward the current message, prompting for the From: address first."\r
++  (interactive)\r
++  (with-current-notmuch-show-message\r
++   (notmuch-mua-forward-message-prompt-for-sender)))\r
++\r
+ (defun notmuch-show-next-message ()\r
+   "Show the next message."\r
+   (interactive)\r
+-- \r
+1.7.5.1\r
+\r