X-Git-Url: http://rtime.felk.cvut.cz/gitweb/notmuch.git/blobdiff_plain/cc1a6d2a947ef8c2577a77027d69fce012ae91fd..dd5cd6964fe074c79c1850abb82d805bca35a5c5:/emacs/notmuch-show.el 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.