unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Jonas Bernoulli <jonas@bernoul.li>
To: David Bremner <david@tethera.net>,
	Tomi Ollila <tomi.ollila@iki.fi>,
	notmuch@notmuchmail.org
Subject: Re: [PATCH] emacs: notmuch-tree: mark the initial message at point as read
Date: Fri, 23 Jul 2021 16:01:04 +0200	[thread overview]
Message-ID: <87fsw5i0yn.fsf@bernoul.li> (raw)
In-Reply-To: <87r1ft27ur.fsf@tethera.net>

David Bremner <david@tethera.net> writes:

> Jonas Bernoulli <jonas@bernoul.li> writes:
>
>>
>> Please merge the proposed fix; IMO it is sound.  My follow-up, the reply
>> to Tomi, seems quite confused though.  But just because we are uncertain
>> whether there is further room for improvement, that shouldn't keep us
>> from fixing the bug.  Maybe in the future we can improve upon this fix
>> but I probably won't investigate any time soon.
>>
>>      Jonas
>
> Apologies, I should have experimented / asked before. I can't seem to
> duplicate the problem being fixed here. Is it non-deterministic, or
> should I expect it to always happen? If the latter, can you give me a
> further hint / instructions how to reproduce? For me, whether in
> tree-mode or search-mode, if I hit return the message at point is marked
> unread.
>
> d

I can always reproduce it:

1. Perform a search.

2. Visit the tree for a thread that you have previously not
   seen using notmuch-tree-from-search-thread. The default
   binding for that command is M-RET.  You mentioned that you
   pressed RET so maybe that's why you couldn't reproduce
   (i.e. you invoked notmuch-search-show-thread, which
   doesn't have this issue).

3. Press n (notmuch-tree-next-message) a few times until
   you reach the last message in the tree.  Do NOT press
   p (notmuch-tree-prev-message) to move back to the first
   message.

4. All messages should now be shown as "going to be marked
   as read".  In my case that is visualized by the word
   "unread" being striked out.  This DOES include the first
   message, but in this case it's not true.

5. Press q (notmuch-tree-quit) twice to return to the
   search view.

6. Press g (notmuch-refresh-this-buffer).  You would expect
   that to cause the thread at point to be marked read, but
   it is not.

7. Visit the tree for the same thread again using
   notmuch-tree-from-search-thread.  The second and subsequent
   messages are in the read state, the word "unread" is completely
   absent.  The first message however is shown as being in the
   "going to be marked as read", i.e. the word "unread" is shown
   and struck out.

The work around for this is to press RET (notmuch-tree-show-message)
at this point.  The word "unread" is still struck out, but if you
exit now (using q twice), then this change is actually applied.

Note that notmuch-search-show-thread does NOT behave as described
for notmuch-tree-from-search-thread above.  Applying my patch causes
the former to behave like the latter.

     Jonas

  reply	other threads:[~2021-07-23 14:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-16  0:01 [PATCH] emacs: notmuch-tree: mark the initial message at point as read Jonas Bernoulli
2021-02-25 20:52 ` Tomi Ollila
2021-02-27  0:18   ` Jonas Bernoulli
2021-02-27  0:28     ` Jonas Bernoulli
2021-06-05 11:23       ` David Bremner
2021-07-19 11:12         ` Jonas Bernoulli
2021-07-19 23:37           ` David Bremner
2021-07-23 14:01             ` Jonas Bernoulli [this message]
2021-07-25 18:30 ` David Bremner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fsw5i0yn.fsf@bernoul.li \
    --to=jonas@bernoul.li \
    --cc=david@tethera.net \
    --cc=notmuch@notmuchmail.org \
    --cc=tomi.ollila@iki.fi \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).