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 77CB7429E29 for ; Thu, 26 May 2011 09:07:31 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 1.424 X-Spam-Level: * X-Spam-Status: No, score=1.424 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=2.223, 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 TLnxrG83CmhU for ; Thu, 26 May 2011 09:07:30 -0700 (PDT) Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com [74.125.82.45]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 4D302429E27 for ; Thu, 26 May 2011 09:07:29 -0700 (PDT) Received: by mail-ww0-f45.google.com with SMTP id 36so763098wwi.2 for ; Thu, 26 May 2011 09:07:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references; bh=7hBWceQmfSLFV9lQaRL5P4zA23Z7TlH9Met++zI8KSk=; b=bS40aRSCi68nbXXf8Q0lSuhqwNC8c8VGb0ntuhDLUaOcBpLXOgeCSbfBNoANAtu9gu Y2PFuYlYCYkQkS6RPqKrDlTspTPMfV2nD8VUxmEEW2vfFHkcpUIFxwDH2gcJVvmzDF2n NkSFRu564tX9mvCEjSyVaBLF0hYHHknI4DJao= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=otIOBY8Qr92uq6+P0SMEZFdXyPsK0h9J4wwCUZPqiErxRJTa9hjZ/3Rff5iL8SXhbv x44l9wWWcuNofuXw1jNr2o9DcDAb4zj0KBE26Az6oYAmIU0jLT6KtfqXCcG5iKhdMp88 s3JVPNFPamJgM77bbtw798GqdLVNbQnBZ2zw0= Received: by 10.216.59.81 with SMTP id r59mr1015999wec.40.1306426048957; Thu, 26 May 2011 09:07:28 -0700 (PDT) Received: from localhost.localdomain (93-97-25-209.zone5.bethere.co.uk [93.97.25.209]) by mx.google.com with ESMTPS id k70sm457497weq.6.2011.05.26.09.07.27 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 26 May 2011 09:07:28 -0700 (PDT) From: Mark Walters To: notmuch@notmuchmail.org Subject: [PATCH 2/2] Emacs changes for reply to sender Date: Thu, 26 May 2011 17:06:52 +0100 Message-Id: <1306426012-8176-3-git-send-email-markwalters1009@gmail.com> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1306426012-8176-1-git-send-email-markwalters1009@gmail.com> References: <1306426012-8176-1-git-send-email-markwalters1009@gmail.com> 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: Thu, 26 May 2011 16:07:31 -0000 Reply to sender is currently bound to R --- emacs/notmuch-mua.el | 6 ++++-- emacs/notmuch-show.el | 6 ++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el index dc7b386..4b8590f 100644 --- a/emacs/notmuch-mua.el +++ b/emacs/notmuch-mua.el @@ -69,13 +69,15 @@ list." (push header message-hidden-headers))) notmuch-mua-hidden-headers)) -(defun notmuch-mua-reply (query-string) +(defun notmuch-mua-reply (query-string &optional option-string) (let (headers body) ;; This make assumptions about the output of `notmuch reply', but ;; really only that the headers come first followed by a blank ;; line and then the body. (with-temp-buffer - (call-process notmuch-command nil t nil "reply" query-string) + (if option-string + (call-process notmuch-command nil t nil "reply" option-string query-string) + (call-process notmuch-command nil t nil "reply" query-string)) (goto-char (point-min)) (if (re-search-forward "^$" nil t) (save-excursion diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index 9a38d9c..5dbc103 100644 --- a/emacs/notmuch-show.el +++ b/emacs/notmuch-show.el @@ -795,6 +795,7 @@ function is used. " (define-key map "m" 'notmuch-mua-mail) (define-key map "f" 'notmuch-show-forward-message) (define-key map "r" 'notmuch-show-reply) + (define-key map "R" 'notmuch-show-reply-one) (define-key map "|" 'notmuch-show-pipe-message) (define-key map "w" 'notmuch-show-save-attachments) (define-key map "V" 'notmuch-show-view-raw-message) @@ -1103,6 +1104,11 @@ any effects from previous calls to (interactive) (notmuch-mua-reply (notmuch-show-get-message-id))) +(defun notmuch-show-reply-one () + "Reply to the current message." + (interactive) + (notmuch-mua-reply (notmuch-show-get-message-id) "--format=one")) + (defun notmuch-show-forward-message () "Forward the current message." (interactive) -- 1.7.2.5