Skip to content

Commit

Permalink
notmuch: Kill temporary buffers
Browse files Browse the repository at this point in the history
Signed-off-by: Jeremy Compostella <[email protected]>
Signed-off-by: David <[email protected]>
  • Loading branch information
jeremy-compostella committed May 11, 2021
1 parent 68dae74 commit 2bfdbff
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions org-msg.el
Original file line number Diff line number Diff line change
Expand Up @@ -422,13 +422,15 @@ file."
"Execute the forms in BODY with the replied notmuch message
buffer temporarily current."
(declare (indent 0))
(let ((id (make-symbol "id")))
(let ((id (make-symbol "id"))
(buf (make-symbol "buf")))
`(let ((,id (org-msg-message-fetch-field "in-reply-to")))
(save-window-excursion
(let ((notmuch-show-only-matching-messages t))
(notmuch-show (format "id:%s" (substring ,id 1 -1))))
(with-current-notmuch-show-message
(progn ,@body))))))
(let* ((notmuch-show-only-matching-messages t)
(,buf (notmuch-show (format "id:%s" (substring ,id 1 -1)))))
(with-current-notmuch-show-message
(prog1 (progn ,@body)
(kill-buffer ,buf))))))))

(defun org-msg-save-article-for-reply-notmuch ()
"Export the currently visited notmuch article as HTML."
Expand Down

0 comments on commit 2bfdbff

Please sign in to comment.