X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=emacs%2Fnotmuch-show.el;h=6d3149bf45a99d594833e62719fb19eac43fb9d4;hb=dd5cd6964fe074c79c1850abb82d805bca35a5c5;hp=fea39fafaa2fd8d010433b95955adc1677cd0d53;hpb=cc1a6d2a947ef8c2577a77027d69fce012ae91fd;p=notmuch diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index fea39faf..6d3149bf 100644 --- a/emacs/notmuch-show.el +++ b/emacs/notmuch-show.el @@ -1701,12 +1701,23 @@ user decision and we should not override it." (notmuch-show-mark-read) (notmuch-show-set-prop :seen t))) +(defvar notmuch-show--seen-has-errored nil) +(make-variable-buffer-local 'notmuch-show--seen-has-errored) + (defun notmuch-show-command-hook () (when (eq major-mode 'notmuch-show-mode) ;; We need to redisplay to get window-start and window-end correct. (redisplay) (save-excursion - (funcall notmuch-show-mark-read-function (window-start) (window-end))))) + (condition-case err + (funcall notmuch-show-mark-read-function (window-start) (window-end)) + ((debug error) + (unless notmuch-show--seen-has-errored + (setq notmuch-show--seen-has-errored 't) + (setq header-line-format + (concat header-line-format + (propertize " [some mark read tag changes may have failed]" + 'face font-lock-warning-face))))))))) (defun notmuch-show-filter-thread (query) "Filter or LIMIT the current thread based on a new query string.