mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-21 18:38:08 +01:00
notmuch.el: Add a reply binding ('r') to search mode to reply to a whole thread.
This is basically right, (I get a message buffer with all the mails quoted), but somehow notmuch reply is reversing the messages. That's a nuisance.
This commit is contained in:
parent
f52528a344
commit
83a2ed3c2f
1 changed files with 18 additions and 8 deletions
26
notmuch.el
26
notmuch.el
|
@ -249,18 +249,21 @@ buffer."
|
|||
(mm-display-parts (mm-dissect-buffer))
|
||||
(kill-this-buffer))))
|
||||
|
||||
(defun notmuch-reply (query-string)
|
||||
(switch-to-buffer (generate-new-buffer "notmuch-draft"))
|
||||
(call-process "notmuch" nil t nil "reply" query-string)
|
||||
(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)))
|
||||
(switch-to-buffer (generate-new-buffer "notmuch-draft"))
|
||||
(call-process "notmuch" nil t nil "reply" message-id)
|
||||
(goto-char (point-min))
|
||||
(if (re-search-forward "^$" nil t)
|
||||
(progn
|
||||
(insert "--text follows this line--")
|
||||
(forward-line)))
|
||||
(message-mode)))
|
||||
(notmuch-reply message-id)))
|
||||
|
||||
(defun notmuch-show-pipe-message (command)
|
||||
"Pipe the contents of the current message to the given command.
|
||||
|
@ -708,6 +711,7 @@ thread from that buffer can be show when done with this one)."
|
|||
(define-key map "o" 'notmuch-search-toggle-order)
|
||||
(define-key map "p" 'previous-line)
|
||||
(define-key map "q" 'kill-this-buffer)
|
||||
(define-key map "r" 'notmuch-search-reply-to-thread)
|
||||
(define-key map "s" 'notmuch-search)
|
||||
(define-key map "t" 'notmuch-search-filter-by-tag)
|
||||
(define-key map "x" 'kill-this-buffer)
|
||||
|
@ -824,6 +828,12 @@ global search.
|
|||
(notmuch-show thread-id (current-buffer))
|
||||
(error "End of search results"))))
|
||||
|
||||
(defun notmuch-search-reply-to-thread ()
|
||||
"Begin composing a reply to the entire current thread in a new buffer."
|
||||
(interactive)
|
||||
(let ((message-id (notmuch-search-find-thread-id)))
|
||||
(notmuch-reply message-id)))
|
||||
|
||||
(defun notmuch-call-notmuch-process (&rest args)
|
||||
"Synchronously invoke \"notmuch\" with the given list of arguments.
|
||||
|
||||
|
|
Loading…
Reference in a new issue