[PATCH 2/2] Emacs changes for reply to sender
authorMark Walters <markwalters1009@gmail.com>
Thu, 26 May 2011 16:06:52 +0000 (17:06 +0100)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:38:23 +0000 (09:38 -0800)
20/c47557b7f7b051d5a229b4db9bc368c9a78857 [new file with mode: 0644]

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