aboutsummaryrefslogtreecommitdiffhomepage
path: root/devel
diff options
context:
space:
mode:
authorGravatar Mark Walters <markwalters1009@gmail.com>2014-05-09 01:20:08 +0100
committerGravatar David Bremner <david@tethera.net>2014-07-13 12:34:02 -0300
commit2e1eee3a77114465a3ad4872067a41caa2c1221d (patch)
tree72d63d1e1ba666fb5a484b00ba92dcd2b0d34ebe /devel
parenteed6c75556e18d943ac690598edceef0c4ee59d5 (diff)
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.
Diffstat (limited to 'devel')
0 files changed, 0 insertions, 0 deletions