[PATCH v2 2/2] emacs: `notmuch-show-forward-message' can use `notmuch-mua-new-forward...
authorDavid Edmondson <dme@dme.org>
Sat, 6 Feb 2016 21:07:57 +0000 (21:07 +0000)
committerW. Trevor King <wking@tremily.us>
Sat, 20 Aug 2016 23:21:00 +0000 (16:21 -0700)
59/1d5f9b8d252b67b15273bce18ba24c33b9b4c7 [new file with mode: 0644]

diff --git a/59/1d5f9b8d252b67b15273bce18ba24c33b9b4c7 b/59/1d5f9b8d252b67b15273bce18ba24c33b9b4c7
new file mode 100644 (file)
index 0000000..7405528
--- /dev/null
@@ -0,0 +1,135 @@
+Return-Path: <dme@dme.org>\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 549946DE0B25\r
+ for <notmuch@notmuchmail.org>; Sat,  6 Feb 2016 13:08:07 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.12\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.12 tagged_above=-999 required=5 tests=[AWL=0.187,\r
+ DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_LOW=-0.7,\r
+ RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_NEUTRAL=0.652,\r
+ UNPARSEABLE_RELAY=0.001] 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 HsVbt2lXjP7R for <notmuch@notmuchmail.org>;\r
+ Sat,  6 Feb 2016 13:08:05 -0800 (PST)\r
+Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com\r
+ [74.125.82.66]) by arlo.cworth.org (Postfix) with ESMTPS id F14AB6DE0261 for\r
+ <notmuch@notmuchmail.org>; Sat,  6 Feb 2016 13:08:04 -0800 (PST)\r
+Received: by mail-wm0-f66.google.com with SMTP id 128so8799667wmz.3\r
+ for <notmuch@notmuchmail.org>; Sat, 06 Feb 2016 13:08:04 -0800 (PST)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+ d=dme-org.20150623.gappssmtp.com; s=20150623;\r
+ h=from:to:subject:date:message-id:in-reply-to:references;\r
+ bh=+bVMveN0uHbVUlKBW6yUocx7HIHw386dnWTW9kK8gWs=;\r
+ b=xFNHSFbGcqVJhHGERkliLQ4yjQ1p6O9GpQaawDSbun9Sx6VjXG9obtYPJ3TBU3BwzF\r
+ xwU/WV5lUapH1yVG1bINwy2Geod/nxxk89pH5PSes1wrHwRhRpmoqfy46RNFv3FGo66n\r
+ nTfHD66c7p+3jMRrUe7BZGxyIp7kmmBqRI0QPFEm8oBCiDqxXBq/vOZlZ902qPjth9Zn\r
+ SRjle8ZVoH4DYZb1d4sWme+qXBSNUZdCDAzBQDn+Z1eyHJpff1Bh1qFhfSULgZ+mWtRM\r
+ aoKV7fttFTsFNDgC0Ady3rRPp2lWni3geDuE5d0lP1n81bmeDd9lC5iArGOpumuxvArN\r
+ 067g==\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+ d=1e100.net; s=20130820;\r
+ h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to\r
+ :references;\r
+ bh=+bVMveN0uHbVUlKBW6yUocx7HIHw386dnWTW9kK8gWs=;\r
+ b=JtmhTJyw3gicDy8WeKIW0SbuEIs51YApo214KtTqjCLr1/+51mDDmWENP1SpB236ug\r
+ 8GJ8hEwRCr2kbm1vHqU8mvEeCas0clveTXGt7BqeAl3HawcGtNN02VmCcDipr3XOsAhG\r
+ N9yoFK4CwrOZPyS47ZPeXnflMdnq3UvWN/m8qhVGLrRomGXqD6quJxxkJVS29aGxBsFy\r
+ rrVUay6j9nAYL91jSeDqAUk23M/+TURo9YmajBKrX7JDwfr3nQNI+AfpH2A5oqilbbND\r
+ q9R1gCFTV0vraqiP2L17DNZhEQHwYqsCfPGXJevFDLOvPol/+R/hn3UQ8m5Q+zHHXBam\r
+ o2Dg==\r
+X-Gm-Message-State:\r
+ AG10YOQynWAewArWMFW4a0amXrqhjjQ4INwowEDOd/nVWvc2IcFGdrWi0qLfF1iRGHOWYQ==\r
+X-Received: by 10.28.104.87 with SMTP id d84mr23998016wmc.56.1454792883599;\r
+ Sat, 06 Feb 2016 13:08:03 -0800 (PST)\r
+Received: from disaster-area.hh.sledj.net\r
+ ([2a01:348:1a2:1:ea39:35ff:fe2c:a227])\r
+ by smtp.gmail.com with ESMTPSA id e198sm4868888wmd.0.2016.02.06.13.08.01\r
+ for <notmuch@notmuchmail.org>\r
+ (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\r
+ Sat, 06 Feb 2016 13:08:01 -0800 (PST)\r
+Received: from localhost (disaster-area.hh.sledj.net [local])\r
+ by disaster-area.hh.sledj.net (OpenSMTPD) with ESMTPA id 25dcc508\r
+ for <notmuch@notmuchmail.org>; Sat, 6 Feb 2016 21:07:57 +0000 (UTC)\r
+From: David Edmondson <dme@dme.org>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v2 2/2] emacs: `notmuch-show-forward-message' can use\r
+ `notmuch-mua-new-forward-messages'\r
+Date: Sat,  6 Feb 2016 21:07:57 +0000\r
+Message-Id: <1454792877-7180-3-git-send-email-dme@dme.org>\r
+X-Mailer: git-send-email 2.1.4\r
+In-Reply-To: <1454792877-7180-1-git-send-email-dme@dme.org>\r
+References: <1454792877-7180-1-git-send-email-dme@dme.org>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.20\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <https://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: <https://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sat, 06 Feb 2016 21:08:07 -0000\r
+\r
+Which allows `notmuch-mua-new-forward-message' to be removed.\r
+---\r
+ emacs/notmuch-mua.el  | 20 --------------------\r
+ emacs/notmuch-show.el |  4 ++--\r
+ 2 files changed, 2 insertions(+), 22 deletions(-)\r
+\r
+diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el\r
+index be2967f..bf23dab 100644\r
+--- a/emacs/notmuch-mua.el\r
++++ b/emacs/notmuch-mua.el\r
+@@ -405,26 +405,6 @@ the From: address first."\r
+          (list (cons 'From (notmuch-mua-prompt-for-sender))))))\r
+     (notmuch-mua-mail nil nil other-headers nil (notmuch-mua-get-switch-function))))\r
\r
+-(defun notmuch-mua-new-forward-message (&optional prompt-for-sender)\r
+-  "Invoke the notmuch message forwarding window.\r
+-\r
+-The current buffer must contain an RFC2822 message to forward.\r
+-\r
+-If PROMPT-FOR-SENDER is non-nil, the user will be prompted for\r
+-the From: address first."\r
+-  (let* ((cur (current-buffer))\r
+-       (message-forward-decoded-p nil)\r
+-       (subject (message-make-forward-subject))\r
+-       (other-headers\r
+-        (when (or prompt-for-sender notmuch-always-prompt-for-sender)\r
+-          (list (cons 'From (notmuch-mua-prompt-for-sender))))))\r
+-    (notmuch-mua-mail nil subject other-headers nil (notmuch-mua-get-switch-function))\r
+-    (message-forward-make-body cur)\r
+-    ;; `message-forward-make-body' shows the User-agent header.  Hide\r
+-    ;; it again.\r
+-    (message-hide-headers)\r
+-    (set-buffer-modified-p nil)))\r
+-\r
+ (defun notmuch-mua-new-forward-messages (messages &optional prompt-for-sender)\r
+   "Compose a new message forwarding MESSAGES.\r
\r
+diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
+index a8c6f1e..d40cb09 100644\r
+--- a/emacs/notmuch-show.el\r
++++ b/emacs/notmuch-show.el\r
+@@ -1796,8 +1796,8 @@ any effects from previous calls to\r
+ (defun notmuch-show-forward-message (&optional prompt-for-sender)\r
+   "Forward the current message."\r
+   (interactive "P")\r
+-  (with-current-notmuch-show-message\r
+-   (notmuch-mua-new-forward-message prompt-for-sender)))\r
++  (notmuch-mua-new-forward-messages (list (notmuch-show-get-message-id))\r
++                                  prompt-for-sender))\r
\r
+ (put 'notmuch-show-forward-open-messages 'notmuch-prefix-doc\r
+      "... and prompt for sender")\r
+-- \r
+2.1.4\r
+\r