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 302104044F1 for ; Fri, 6 Jan 2012 05:34:23 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0.201 X-Spam-Level: X-Spam-Status: No, score=0.201 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] 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 1FeRkS4HYkwR for ; Fri, 6 Jan 2012 05:34:22 -0800 (PST) Received: from mail-we0-f181.google.com (mail-we0-f181.google.com [74.125.82.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 7C7A34044F0 for ; Fri, 6 Jan 2012 05:34:22 -0800 (PST) Received: by mail-we0-f181.google.com with SMTP id m12so1311441wer.26 for ; Fri, 06 Jan 2012 05:34:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=bp5UHF2KjE5sWFpqYHWk7RVVq9vJJEel2Xfu3BvMDy4=; b=Lvd2xIio9YAFO6xjkoed49Yu8YlXN9+7nWaLNbnb2cAZ6vz59Ut/QqExX0OzOozc5+ xITXXp64Ryk+3QoW87rgO2yAjmVdyrOvMaiaqSC6XHrmXEaoI6Aaxg5Jqv3B6cWkWMNP zmu/xvoPqjbzhpy4nOMNR6j54AFcjCqspUz1c= Received: by 10.216.139.77 with SMTP id b55mr2881838wej.12.1325856862175; Fri, 06 Jan 2012 05:34:22 -0800 (PST) Received: from localhost (94-192-233-223.zone6.bethere.co.uk. [94.192.233.223]) by mx.google.com with ESMTPS id h3sm11200132wia.8.2012.01.06.05.34.20 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 06 Jan 2012 05:34:20 -0800 (PST) From: Mark Walters To: Jani Nikula , notmuch@notmuchmail.org, david@tethera.net Subject: [PATCH 3/4] Emacs changes for reply-to-sender Date: Fri, 6 Jan 2012 13:34:16 +0000 Message-Id: <1325856857-15969-3-git-send-email-markwalters1009@gmail.com> X-Mailer: git-send-email 1.7.2.3 In-Reply-To: <8739btdkir.fsf@qmul.ac.uk> References: <8739btdkir.fsf@qmul.ac.uk> 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: Fri, 06 Jan 2012 13:34:23 -0000 Reply to sender is currently bound to R --- emacs/notmuch-mua.el | 8 +++++--- emacs/notmuch-show.el | 8 +++++++- emacs/notmuch.el | 2 +- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el index 7114e48..7171210 100644 --- a/emacs/notmuch-mua.el +++ b/emacs/notmuch-mua.el @@ -71,12 +71,14 @@ list." (push header message-hidden-headers))) notmuch-mua-hidden-headers)) -(defun notmuch-mua-reply (query-string &optional sender) +(defun notmuch-mua-reply (query-string option-string &optional sender) (let (headers body (args '("reply"))) (if notmuch-show-process-crypto (setq args (append args '("--decrypt")))) + (if option-string + (setq args (append args (list option-string)))) (setq args (append args (list query-string))) ;; This make assumptions about the output of `notmuch reply', but ;; really only that the headers come first followed by a blank @@ -217,13 +219,13 @@ the From: address first." (notmuch-mua-forward-message)) (notmuch-mua-forward-message))) -(defun notmuch-mua-new-reply (query-string &optional prompt-for-sender) +(defun notmuch-mua-new-reply (query-string option-string &optional prompt-for-sender) "Invoke the notmuch reply window." (interactive "P") (let ((sender (when prompt-for-sender (notmuch-mua-prompt-for-sender)))) - (notmuch-mua-reply query-string sender))) + (notmuch-mua-reply query-string option-string sender))) (defun notmuch-mua-send-and-exit (&optional arg) (interactive "P") diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index 5502efd..40bea0c 100644 --- a/emacs/notmuch-show.el +++ b/emacs/notmuch-show.el @@ -933,6 +933,7 @@ thread id. If a prefix is given, crypto processing is toggled." (define-key map "m" 'notmuch-mua-new-mail) (define-key map "f" 'notmuch-show-forward-message) (define-key map "r" 'notmuch-show-reply) + (define-key map "R" 'notmuch-show-reply-sender) (define-key map "|" 'notmuch-show-pipe-message) (define-key map "w" 'notmuch-show-save-attachments) (define-key map "V" 'notmuch-show-view-raw-message) @@ -1239,7 +1240,12 @@ any effects from previous calls to (defun notmuch-show-reply (&optional prompt-for-sender) "Reply to the current message." (interactive "P") - (notmuch-mua-new-reply (notmuch-show-get-message-id) prompt-for-sender)) + (notmuch-mua-new-reply (notmuch-show-get-message-id) nil prompt-for-sender)) + +(defun notmuch-show-reply-sender (&optional prompt-for-sender) + "Reply to the current message but only to sender." + (interactive "P") + (notmuch-mua-new-reply (notmuch-show-get-message-id) "--reply-to=sender" prompt-for-sender)) (defun notmuch-show-forward-message (&optional prompt-for-sender) "Forward the current message." diff --git a/emacs/notmuch.el b/emacs/notmuch.el index fde2377..022b867 100644 --- a/emacs/notmuch.el +++ b/emacs/notmuch.el @@ -444,7 +444,7 @@ Complete list of currently available key bindings: "Begin composing a reply to the entire current thread in a new buffer." (interactive "P") (let ((message-id (notmuch-search-find-thread-id))) - (notmuch-mua-new-reply message-id prompt-for-sender))) + (notmuch-mua-new-reply message-id nil prompt-for-sender))) (defun notmuch-call-notmuch-process (&rest args) "Synchronously invoke \"notmuch\" with the given list of arguments. -- 1.7.2.3