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 86CCA4196F4 for ; Tue, 6 Apr 2010 00:12:56 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -1.9 X-Spam-Level: X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9] autolearn=ham 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 8LooBS3yXlrK for ; Tue, 6 Apr 2010 00:12:55 -0700 (PDT) Received: from homiemail-a19.g.dreamhost.com (caiajhbdcbef.dreamhost.com [208.97.132.145]) by olra.theworths.org (Postfix) with ESMTP id B16484196F5 for ; Tue, 6 Apr 2010 00:12:55 -0700 (PDT) Received: from localhost.localdomain (mtec-hg-docking-1-dhcp-204.ethz.ch [129.132.133.204]) by homiemail-a19.g.dreamhost.com (Postfix) with ESMTPA id 5746260406C; Tue, 6 Apr 2010 00:12:54 -0700 (PDT) From: Sebastian Spaeth To: notmuch@notmuchmail.org Subject: [PATCH 2/2] notmuch.el: Add support for reply-to sender Date: Tue, 6 Apr 2010 09:12:46 +0200 Message-Id: <1270537966-19324-2-git-send-email-Sebastian@SSpaeth.de> X-Mailer: git-send-email 1.6.3.3 In-Reply-To: <1270537966-19324-1-git-send-email-Sebastian@SSpaeth.de> References: <87mxxhgims.fsf@SSpaeth.de> <1270537966-19324-1-git-send-email-Sebastian@SSpaeth.de> Cc: "Aneesh Kumar K.V" 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: Tue, 06 Apr 2010 07:12:56 -0000 From: Aneesh Kumar K.V Add key binding to do a reply-to sender. This is mapped to 'R' Signed-off-by: Aneesh Kumar K.V Signed-off-by: Sebastian Spaeth --- emacs/notmuch-show.el | 21 ++++++++++++++++++++- 1 files changed, 20 insertions(+), 1 deletions(-) diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index cc1f905..3d89861 100644 --- a/emacs/notmuch-show.el +++ b/emacs/notmuch-show.el @@ -63,7 +63,8 @@ (define-key map "s" 'notmuch-search) (define-key map "m" 'message-mail) (define-key map "f" 'notmuch-show-forward-current) - (define-key map "r" 'notmuch-show-reply) + (define-key map "r" 'notmuch-show-reply-all) + (define-key map "R" 'notmuch-show-reply) (define-key map "|" 'notmuch-show-pipe-message) (define-key map "w" 'notmuch-show-save-attachments) (define-key map "V" 'notmuch-show-view-raw-message) @@ -360,10 +361,28 @@ buffer." mm-handle (> (notmuch-count-attachments mm-handle) 1)))) (message "Done")) +(defun notmuch-recipient-reply (recipient query-string) + (switch-to-buffer (generate-new-buffer "notmuch-draft")) + (call-process notmuch-command nil t nil "reply" + (concat "--recipient=" recipient) query-string) + (message-insert-signature) + (goto-char (point-min)) + (if (re-search-forward "^$" nil t) + (progn + (insert "--text follows this line--") + (forward-line))) + (message-mode)) + (defun notmuch-show-reply () "Begin composing a reply to the current message in a new buffer." (interactive) (let ((message-id (notmuch-show-get-message-id))) + (notmuch-recipient-reply "sender" message-id))) + +(defun notmuch-show-reply-all () + "Begin composing a reply to the current message in a new buffer." + (interactive) + (let ((message-id (notmuch-show-get-message-id))) (notmuch-reply message-id))) (defun notmuch-show-forward-current () -- 1.6.3.3