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