diff options
| author | Leo Okawa Ericson <git@relevant-information.com> | 2022-06-09 17:18:22 +0200 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2022-06-13 08:06:51 -0300 |
| commit | fb4a0967cab7df737d5d53199a48a0e79c429b61 (patch) | |
| tree | cbe1d47dc8b149cc359077f77df9706143291362 /emacs | |
| parent | a5504e8b1cfd8dddfe395ba4a46da3ea6008e714 (diff) | |
emacs: Make notmuch-show-next-thread return nil on failure
Having notmuch-show-next-thread return non-nil on success and nil on
failure makes it easier for users to interact with notmuch via elisp.
This commit changes notmuch-search-show-thread too since the return
value of notmuch-show-next-thread depends on notmuch-search-show-thread.
Amended by db: fix whitespace in T450-emacs-show
Diffstat (limited to 'emacs')
| -rw-r--r-- | emacs/notmuch-show.el | 4 | ||||
| -rw-r--r-- | emacs/notmuch.el | 7 |
2 files changed, 8 insertions, 3 deletions
diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index 203ca7f0..aded1ee7 100644 --- a/emacs/notmuch-show.el +++ b/emacs/notmuch-show.el @@ -2227,7 +2227,9 @@ argument, hide all of the messages." If SHOW is non-nil, open the next item in a show buffer. Otherwise just highlight the next item in the search buffer. If PREVIOUS is non-nil, move to the previous item in the -search results instead." +search results instead. + +Return non-nil on success." (interactive "P") (let ((parent-buffer notmuch-show-parent-buffer)) (notmuch-bury-or-kill-this-buffer) diff --git a/emacs/notmuch.el b/emacs/notmuch.el index c9cf80dc..01a92997 100644 --- a/emacs/notmuch.el +++ b/emacs/notmuch.el @@ -520,7 +520,9 @@ no messages in the region then return nil." With a prefix argument, invert the default value of `notmuch-show-only-matching-messages' when displaying the -thread." +thread. + +Return non-nil on success." (interactive "P") (let ((thread-id (notmuch-search-find-thread-id))) (if thread-id @@ -532,7 +534,8 @@ thread." (format "*%s*" (truncate-string-to-width (notmuch-search-find-subject) 30 nil nil t))) - (message "End of search results.")))) + (message "End of search results.") + nil))) (defun notmuch-tree-from-search-current-query () "Tree view of current query." |
