X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=emacs%2Fnotmuch-show.el;h=6d3149bf45a99d594833e62719fb19eac43fb9d4;hp=fea39fafaa2fd8d010433b95955adc1677cd0d53;hb=07dff496304d6dc2e8033a18691b095ed9cd212f;hpb=6a833a6e83865f6999707cc30768d07e1351c2cb 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.