X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=emacs%2Fnotmuch-show.el;h=79fa5c523b06ec4dd6694404c3d2f41364679f7a;hb=eb8feb16664fd0296ea0e07f4924c2a87a5b3bc3;hp=2c0b767f6964f39d93f04006126ba07823a16fca;hpb=94250ac2c59c899812ebc64a6c437c74ff08af30;p=notmuch diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index 2c0b767f..79fa5c52 100644 --- a/emacs/notmuch-show.el +++ b/emacs/notmuch-show.el @@ -30,6 +30,7 @@ (require 'goto-addr) (require 'notmuch-lib) +(require 'notmuch-tag) (require 'notmuch-query) (require 'notmuch-wash) (require 'notmuch-mua) @@ -38,10 +39,8 @@ (declare-function notmuch-call-notmuch-process "notmuch" (&rest args)) (declare-function notmuch-fontify-headers "notmuch" nil) -(declare-function notmuch-read-tag-changes "notmuch" (&optional initial-input &rest search-terms)) (declare-function notmuch-search-next-thread "notmuch" nil) (declare-function notmuch-search-show-thread "notmuch" nil) -(declare-function notmuch-update-tags "notmuch" (current-tags tag-changes)) (defcustom notmuch-message-headers '("Subject" "To" "Cc" "Date") "Headers that should be shown in a message, in this order. @@ -1444,6 +1443,11 @@ current window), advance to the next open message." ;; This is not the last message - move to the next visible one. (notmuch-show-next-open-message)) + ((not (= (point) (point-max))) + ;; This is the last message, but the cursor is not at the end of + ;; the buffer. Move it there. + (goto-char (point-max))) + (t ;; This is the last message - change the return value (setq ret t))) @@ -1736,13 +1740,10 @@ argument, hide all of the messages." (defun notmuch-show-archive-thread (&optional unarchive) "Archive each message in thread. -If a prefix argument is given, the messages will be -\"unarchived\" (ie. the \"inbox\" tag will be added instead of -removed). - Archive each message currently shown by removing the \"inbox\" -tag from each. Then kill this buffer and show the next thread -from the search from which this thread was originally shown. +tag from each. If a prefix argument is given, the messages will +be \"unarchived\" (ie. the \"inbox\" tag will be added instead of +removed). Note: This command is safe from any race condition of new messages being delivered to the same thread. It does not archive the @@ -1765,7 +1766,7 @@ buffer." (notmuch-show-next-thread)) (defun notmuch-show-archive-message (&optional unarchive) - "Archive the current message. + "Archive the current message (remove \"inbox\" tag). If a prefix argument is given, the message will be \"unarchived\" (ie. the \"inbox\" tag will be added instead of