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