X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=emacs%2Fnotmuch-show.el;h=82b5399c499fac18e444e45a279756288717e004;hb=2bd02b68a5e1302736949d950790c99ddf6c9067;hp=6335d45f79b7e5d4cd364a712377fd6a5ac33a98;hpb=e12645c869a1c34aa28239465e1fe8321d182709;p=notmuch diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index 6335d45f..82b5399c 100644 --- a/emacs/notmuch-show.el +++ b/emacs/notmuch-show.el @@ -1525,9 +1525,11 @@ thread, navigate to the next thread in the parent search buffer." (goto-char (point-max))))) (defun notmuch-show-previous-message () - "Show the previous message." + "Show the previous message or the start of the current message." (interactive) - (notmuch-show-goto-message-previous) + (if (= (point) (notmuch-show-message-top)) + (notmuch-show-goto-message-previous) + (notmuch-show-move-to-message-top)) (notmuch-show-mark-read) (notmuch-show-message-adjust)) @@ -1587,7 +1589,9 @@ to show, nil otherwise." (defun notmuch-show-previous-open-message () "Show the previous open message." (interactive) - (while (and (notmuch-show-goto-message-previous) + (while (and (if (= (point) (notmuch-show-message-top)) + (notmuch-show-goto-message-previous) + (notmuch-show-move-to-message-top)) (not (notmuch-show-message-visible-p)))) (notmuch-show-mark-read) (notmuch-show-message-adjust)) @@ -1617,7 +1621,7 @@ than only the current message." (let (shell-command) (if entire-thread (setq shell-command - (concat notmuch-command " show --format=mbox " + (concat notmuch-command " show --format=mbox --exclude=false " (shell-quote-argument (mapconcat 'identity (notmuch-show-get-message-ids-for-open-messages) " OR ")) " | " command))