[PATCH WIP v2 0/5] emacs: show: redesign unread/read logic

Subject: [PATCH WIP v2 0/5] emacs: show: redesign unread/read logic

Date: Sun, 1 Dec 2013 10:02:21 +0000

To: notmuch@notmuchmail.org

Cc:

From: Mark Walters


This is further wip of the message at
id:1385285551-5158-1-git-send-email-markwalters1009@gmail.com
see there for some discussion of the design.

This series is still definitely wip: one reason for posting is so
people can play with different strategies for marking read
easily. (As WIP tree's unread handling is broken and the tests need updating.)

The series consists of three parts: the first 4 patches add the notion
of seen: this means the user has seen the message but the message has
typically not been marked read yet. The seen messages are marked read
when the user quits the show buffer unless the user quits with
prefix-arg quit. In all cases an informative message is shown.

The fifth patch adds a psot-command-hook stub for updating the seen
status. This seems a natural place to do the update as it means
however the user navugates around the buffer (eg next-message or
page-down etc) the update gets done.

This is intended to be an easy place for other people to try out their
own mark read strategies.

The final patch implements something pretty close to what I would like
for marking seen/read. A message is deemed seen provided the user has
seen the top of the message, and has seen either the bottom of the
message or a point at least some customisable number of lines into the
message. The customisable number of lines can either be a fixed number
e.g. 20, or a number depending on the height of the current window
e.g. the default is 3/4 of the window height.

The idea is a message seen if the user has seen the entire message, or
enough of it they have to have noticed it. The figure of 3/4 also
means that the notmuch commands like next-message which place the top
of the message at the top of the window automatically mark the message
seen as either the whole message or at least one window full must be
visible.

I would be very grateful for any comments on whether this behaves as
people would expect, what they would want instead etc

Best wishes

Mark





Mark Walters (6):
  emacs: show: add a function to test for unread
  emacs: show: add some seen helpers
  emacs: show: sync seen to read on quit and refresh
  emacs: show: use the `seen' interface
  emacs: show: add an update seen function to post-command-hook
  emacs: show: make `seen' mean user viewed whole message

 emacs/notmuch-show.el |  163 ++++++++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 148 insertions(+), 15 deletions(-)

-- 
1.7.9.1


Thread: