unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Justus Winter <justus@sequoia-pgp.org>
To: David Bremner <david@tethera.net>, notmuch@notmuchmail.org
Subject: Re: Selection bug
Date: Wed, 12 Oct 2022 14:19:23 +0200	[thread overview]
Message-ID: <874jw9utdg.fsf@thinkbox> (raw)
In-Reply-To: <87edveqpj6.fsf@tethera.net>


[-- Attachment #1.1.1: Type: text/plain, Size: 2142 bytes --]

Hi David :)

David Bremner <david@tethera.net> writes:

> Justus Winter <justus@sequoia-pgp.org> writes:
>
>> there is a bug in notmuch emacs that is mildly annoying.  Sometimes when
>> I refresh my search buffer, and there are new mails, the topmost
>> (i.e. newest) message seems to be selected (i.e. with green background),
>> but in fact if i hit enter (or do any other state changing action like
>> tagging), notmuch emacs acts on the previously selected message.  There
>> is a visual clue to that, the block cursor is still on that previously
>> selected message.
>>
>> Still, I think it is a bug, and because the green background dominates
>> the block cursor, I run into this all the time.
>
> That should be hl-line-mode, not sure why it's not tracking your
> cursor. Can you duplicate the issue in emacs -q? Also, what version of
> emacs is this?

This is emacs 27.1 from bookworm:

ii  emacs          1:27.1+1-3.1 all          GNU Emacs editor (metapackage)

emacs --version
GNU Emacs 27.1
Copyright (C) 2020 Free Software Foundation, Inc.
GNU Emacs comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of GNU Emacs
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.

I think I found a reproducer:

mkdir -p /tmp/selection-bug/{tmp,new,cur}
echo "[database]
path=/tmp/selection-bug" > /tmp/selection-bug/notmuch-config
NOTMUCH_CONFIG=/tmp/selection-bug/notmuch-config notmuch new
NOTMUCH_CONFIG=/tmp/selection-bug/notmuch-config emacs -q --eval "(require 'notmuch)"
# M-x notmuch-hello, search for '*'
notmuch show --format=raw id:87edvlanuh.fsf@tethera.net | NOTMUCH_CONFIG=/tmp/selection-bug/notmuch-config notmuch insert
# refresh search buffer, press down once, i.e. navigate to "End of search results".
notmuch show --format=raw id:87fsfuuxwn.fsf@thinkbox | NOTMUCH_CONFIG=/tmp/selection-bug/notmuch-config notmuch insert
notmuch show --format=raw id:8735buw7gf.fsf@ngraves.fr | NOTMUCH_CONFIG=/tmp/selection-bug/notmuch-config notmuch insert
# refresh search buffer, bug: Nicolas' mail is green, mine is opened on pressing enter.

Best,
Justus

[-- Attachment #1.1.2: selection-bug-reproducer.png --]
[-- Type: image/png, Size: 23996 bytes --]

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 519 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



  reply	other threads:[~2022-10-12 12:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-11 16:29 Selection bug Justus Winter
2022-10-11 16:43 ` David Bremner
2022-10-12 12:19   ` Justus Winter [this message]
2022-10-14  9:45     ` David Bremner
2022-10-18 10:13       ` Justus Winter
2023-04-04  9:41         ` Justus Winter
2023-04-04 16:21           ` Carl Worth

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=874jw9utdg.fsf@thinkbox \
    --to=justus@sequoia-pgp.org \
    --cc=david@tethera.net \
    --cc=notmuch@notmuchmail.org \
    /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).