[Patch v3 0/3] emacs: show: redesign unread/read logic

Mark Walters markwalters1009 at gmail.com
Wed May 7 23:41:19 PDT 2014


On Thu, 08 May 2014, David Edmondson <dme at dme.org> wrote:
> On Wed, May 07 2014, Mark Walters wrote:
>> A message is marked read if:
>>
>> 1) if you navigate to a message using n/p (next/prev open message) 
>>
>> 2) if you navigate to it using N/P (next/prev message) regardless of
>> whether the message is open or closed.
>>
>> 3) if you go to it using n.s.next-matching-message (not bound by
>> default) whether message is open or closed.
>>
>> 4) when you enter a buffer and notmuch goes to the first open message.
>>
>> but not marked read in cases like:
>>
>> 1) opening a message
>>
>> 2) viewing or entering a message using other notmuch navigation such as
>> notmuch-show-advance and friends (bound to space)
>
> My experience is that this removes the 'unread' tag.

Sorry I was wrong here. This one does mark it read.

>> 3) viewing or entering a message using arrow keys, page-up page-down,
>> ctrl-v mouse clicks etc

This is perhaps a key one: should the above mark it read.

>> Personally, I think marking a closed message read is a bug,
>
> Agreed.
>
>> and not marking it read when opening it is too
>
> Agreed.
>
>> (at least in many cases).
>
> I would be happy with just these fixed (i.e. the current behaviour with
> those two bug fixes). My typical use is to move around a thread using
> Space, Backspace, n, p, N and P with RET, M-RET and C-u M-RET to
> manipulate open/closed state (i.e. not the normal emacs movement
> commands to move).
>
>> The other problem with the current approach (in my view) is that if
>> you try to use the navigation commands non-interactively then messages
>> end up being marked read, even if they are never displayed to the
>> user.
>
> In what cases does this happen? (Not arguing, just not fully
> understanding.)

I had a series for implementing filtering (ie limiting the open
messages) in show where it was the main cause of my stopping. See
id:20120429005736.GK2704 at mit.edu for details of the problems.

>> Linking into the post-command-hook means that this should "just work".
>>
>> Questions:  What does it mean for a message to be the current message?
>> Is it just point being in the message?
>
> This makes sense to me, other than perhaps "point being in an _open_
> message". I don't want moving point through a closed message with C-n to
> remove the 'unread' tag.

Oh yes I completely agree with that.

Best wishes

Mark


More information about the notmuch mailing list