[PATCH v3 2/2] emacs: `notmuch-show-forward-message' can use `notmuch-mua-new-forward...
authorDavid Edmondson <dme@dme.org>
Mon, 8 Feb 2016 11:34:22 +0000 (11:34 +0000)
committerW. Trevor King <wking@tremily.us>
Sat, 20 Aug 2016 23:21:01 +0000 (16:21 -0700)
9f/4e30778d6578145f6f67387288b8ba88750fd1 [new file with mode: 0644]

diff --git a/9f/4e30778d6578145f6f67387288b8ba88750fd1 b/9f/4e30778d6578145f6f67387288b8ba88750fd1
new file mode 100644 (file)
index 0000000..ade2023
--- /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 9D0796DE137E\r
+ for <notmuch@notmuchmail.org>; Mon,  8 Feb 2016 03:34:31 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.035\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.035 tagged_above=-999 required=5 tests=[AWL=0.102, \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 r4opUNC-EmvJ for <notmuch@notmuchmail.org>;\r
+ Mon,  8 Feb 2016 03:34:30 -0800 (PST)\r
+Received: from mail-wm0-f42.google.com (mail-wm0-f42.google.com\r
+ [74.125.82.42]) by arlo.cworth.org (Postfix) with ESMTPS id ABBAE6DE0A7F for\r
+ <notmuch@notmuchmail.org>; Mon,  8 Feb 2016 03:34:29 -0800 (PST)\r
+Received: by mail-wm0-f42.google.com with SMTP id c200so11060533wme.0\r
+ for <notmuch@notmuchmail.org>; Mon, 08 Feb 2016 03:34:29 -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=77/1s1Fetr+nPRWwnXDGg0T1VccWJGgwNE9BAlcWlq4=;\r
+ b=ld+eNrs/kAm4GKBOlC4K8q8ucnYJfXrBvh9lseOMccRTAaznnbDG+SIMlU/qdxdAg/\r
+ erd1OZ7SzvLmCErm/eejkhSqGTpPkntEtJEpkuWczVUC18J8xq2E6HuZ/VB6REPqOwaI\r
+ e+Dfia+1iOGB06yEsv6clwnx5HX8WUqgCFj+YMUF+Ub/6ejZKmuRCqHp/ORUnwNpT5Np\r
+ aIq8zZm0jcUJhpLAKvB9HIK6qHh2mfrDtR+SjwKlBdizFHi2h6RH7+cnwQXRTZQfPjHr\r
+ Z6RptMnT4OrQJa/+y3V75cAyoktkOv583EgL0kkD/mXWkVFcS98CblmdTy47uVcGz7Th\r
+ ETzQ==\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=77/1s1Fetr+nPRWwnXDGg0T1VccWJGgwNE9BAlcWlq4=;\r
+ b=FKDfsgWeES2PfOFDFDM7DaG2+2FLXcd8cyE//WQj4WygqrERERYi0t+pnm7ZWX5KBj\r
+ VGNHUMd+/6zDgoF+57jXudFQ/hHaz49F+YVPbAJy0f+LkDU7jtRLa1KJ3gbNqLABkls4\r
+ 99hfgy8XO0HWAEgpKeqWzAOVCKgx9GwUjMX2cN7P5Mh3aHWo4Ad3BQlkbsBVovjuTvRe\r
+ /qVQiDAztEwdyQ94Wd55ps2EUpicT99Gd7ej0psUF3NecSWpcVGcOPgcTRpsETxiOzD8\r
+ pmaw+upvrq97B9C5sGaxqK2DUQK8HnqmO86aLeQznbca9GnpR//3OIDKAmxyJU+nFNUS\r
+ ZfGA==\r
+X-Gm-Message-State:\r
+ AG10YOTRRE2BkTP6xOEGXKtrmoh13pCeoUZTorhnM5/5H2KfB153tu/RvFO/lTPP0CPzQw==\r
+X-Received: by 10.28.21.14 with SMTP id 14mr12842158wmv.39.1454931268398;\r
+ Mon, 08 Feb 2016 03:34:28 -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 t3sm29304781wjz.11.2016.02.08.03.34.26\r
+ for <notmuch@notmuchmail.org>\r
+ (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\r
+ Mon, 08 Feb 2016 03:34:27 -0800 (PST)\r
+Received: from localhost (disaster-area.hh.sledj.net [local])\r
+ by disaster-area.hh.sledj.net (OpenSMTPD) with ESMTPA id d90fac54\r
+ for <notmuch@notmuchmail.org>; Mon, 8 Feb 2016 11:34:22 +0000 (UTC)\r
+From: David Edmondson <dme@dme.org>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v3 2/2] emacs: `notmuch-show-forward-message' can use\r
+ `notmuch-mua-new-forward-messages'\r
+Date: Mon,  8 Feb 2016 11:34:22 +0000\r
+Message-Id: <1454931262-21362-3-git-send-email-dme@dme.org>\r
+X-Mailer: git-send-email 2.1.4\r
+In-Reply-To: <1454931262-21362-1-git-send-email-dme@dme.org>\r
+References: <1454931262-21362-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: Mon, 08 Feb 2016 11:34:31 -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 4d50d25..99e23d8 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