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