notmuch/emacs
Mark Walters 2e1eee3a77 emacs: show: add an update seen function to post-command-hook
Add a function for updating seen messages to the
post-command-hook. This function calls a customizable (by eg
defcustom) function with parameters the start and end of the current
window and that function can decide what to mark read based on that
and the current point.

Since this is in the post-command-hook it should get called after most
user actions (exceptions include user resizing the window) so it
should be possible to make sure the seen status gets updated whether
the user uses notmuch commands like next-message or normal emacs
commands like scroll-up.

It removes all of the old mark read/seen points but introduces a
simple example function that just marks the current message read if it
is open. This function has one small subtlety: it makes sure it
doesn't mark the same message read twice (in the same instance of the
same buffer); otherwise the post-command-hook makes it impossible for
a user to manually mark a message unread.

This fixes the current bugs (imo) that closed messages can be marked
read, and that opening a closed message does not mark it read.

Another advantage of using the post-command-hook any programmatic use
with point passing through a message will not mark it read.
2014-07-13 12:34:02 -03:00
..
.gitignore emacs: add notmuch-version.el.tmpl and create notmuch-version.el from it 2014-04-10 23:25:36 -03:00
coolj.el emacs: Add more functions to clean up text/plain parts 2010-04-26 10:05:46 -07:00
make-deps.el emacs: Compute build dependencies to fix byte compile issues 2013-05-23 08:06:12 -03:00
Makefile fix sum moar typos [build scripts, Makefiles] 2011-06-23 15:44:59 -07:00
Makefile.local emacs install: make sure all components to be installed are there 2014-06-15 15:40:51 -03:00
notmuch-address.el emacs/notmuch-address.el: add notmuch-address-selection-function 2013-05-13 21:05:29 -03:00
notmuch-crypto.el emacs: show: make buttons select window 2013-02-18 20:13:19 -04:00
notmuch-hello.el emacs: hello: bugfix for saved searches defcustom 2014-04-21 21:48:41 +09:00
notmuch-lib.el emacs: hello: bugfix for saved searches defcustom 2014-04-21 21:48:41 +09:00
notmuch-logo.png emacs: Add notmuch-hello.el, a friendly frontend to notmuch 2010-04-23 12:50:18 -07:00
notmuch-maildir-fcc.el emacs: derive correct timestamp in FCC unique name 2012-06-22 07:39:21 -03:00
notmuch-message.el emacs: replace (funcall 'foo ...) with (foo ...) 2013-06-02 11:37:22 -03:00
notmuch-mua.el emacs: Forwarded messages should not have modified buffers 2014-06-22 07:41:49 -03:00
notmuch-parser.el emacs: Streaming S-expression parser 2013-06-01 08:56:25 -03:00
notmuch-print.el emacs: Put notmuch-print-mechanism in custom group notmuch-show 2012-04-24 23:25:51 -03:00
notmuch-query.el emacs: dropped rest of now-unused JSON functionality 2013-07-20 09:13:48 -03:00
notmuch-show.el emacs: show: add an update seen function to post-command-hook 2014-07-13 12:34:02 -03:00
notmuch-tag.el emacs: make sure tagging on an empty query is harmless 2014-05-27 20:40:04 -03:00
notmuch-tree.el emacs: tree: use orig-tags in search 2014-03-24 19:48:55 -03:00
notmuch-version.el.tmpl emacs: add notmuch-version.el.tmpl and create notmuch-version.el from it 2014-04-10 23:25:36 -03:00
notmuch-wash.el emacs: Retain text properties when toggling buttons 2013-05-31 22:00:44 -03:00
notmuch.el Merge branch 'release' 2014-05-28 09:50:32 -03:00