From: David Edmondson <dme@dme.org>
To: notmuch@notmuchmail.org
Cc: David Edmondson <dme@dme.org>
Subject: [PATCH 1/2] emacs: with-current-notmuch-show-message should return the result of body
Date: Fri, 8 Jan 2021 18:40:03 +0000 [thread overview]
Message-ID: <20210108184004.781702-2-dme@dme.org> (raw)
In-Reply-To: <20210108184004.781702-1-dme@dme.org>
Rather than returning the result of kill-buffer,
with-current-notmuch-show-message should return the result of calling
the passed body.
---
emacs/notmuch-show.el | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index b08ceb97..222c9dae 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -272,11 +272,12 @@ position of the message in the thread."
`(save-excursion
(let ((id (notmuch-show-get-message-id)))
(let ((buf (generate-new-buffer (concat "*notmuch-msg-" id "*"))))
- (with-current-buffer buf
- (let ((coding-system-for-read 'no-conversion))
- (call-process notmuch-command nil t nil "show" "--format=raw" id))
- ,@body)
- (kill-buffer buf)))))
+ (prog1
+ (with-current-buffer buf
+ (let ((coding-system-for-read 'no-conversion))
+ (call-process notmuch-command nil t nil "show" "--format=raw" id))
+ ,@body)
+ (kill-buffer buf))))))
(defun notmuch-show-turn-on-visual-line-mode ()
"Enable Visual Line mode."
--
2.29.2
next prev parent reply other threads:[~2021-01-08 18:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-08 18:40 [PATCH 0/2] scaffolding for autocrypt support David Edmondson
2021-01-08 18:40 ` David Edmondson [this message]
2021-01-08 18:40 ` [PATCH 2/2] emacs: Add notmuch-show-insert-msg-hook David Edmondson
2021-02-15 21:24 ` David Bremner
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=20210108184004.781702-2-dme@dme.org \
--to=dme@dme.org \
--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).