unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Mark Walters <markwalters1009@gmail.com>
To: notmuch@notmuchmail.org
Subject: [PATCH 2/2] Emacs changes for reply to sender
Date: Thu, 26 May 2011 17:06:52 +0100	[thread overview]
Message-ID: <1306426012-8176-3-git-send-email-markwalters1009@gmail.com> (raw)
In-Reply-To: <1306426012-8176-1-git-send-email-markwalters1009@gmail.com>

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

  parent reply	other threads:[~2011-05-26 16:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-26 16:06 [PATCH 0/2] Implement reply to sender Mark Walters
2011-05-26 16:06 ` [PATCH 1/2] Command line changes for reply-to-sender Mark Walters
2011-05-26 16:06 ` Mark Walters [this message]
2011-05-26 21:21 ` [PATCH 0/2] Implement reply to sender Carl Worth
2011-05-26 23:31   ` [PATCH v2 0/3] " Mark Walters
2011-05-26 23:31   ` [PATCH v2 1/3] Adds the option "--reply-to=" to notmuch reply Mark Walters
2011-05-26 23:31   ` [PATCH v2 2/3] Documentation changes for --reply-to= option " Mark Walters
2011-05-26 23:31   ` [PATCH v2 3/3] Emacs changes for reply to sender Mark Walters

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1306426012-8176-3-git-send-email-markwalters1009@gmail.com \
    --to=markwalters1009@gmail.com \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).