unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Fabio Natali <me@fabionatali.com>
To: notmuch@notmuchmail.org
Subject: Minor UX issue with hl-line-mode and notmuch-search
Date: Sun, 12 Sep 2021 13:11:38 +0100	[thread overview]
Message-ID: <YT3ueuZHKW931NW3@localhost> (raw)

Hi All,

This is to describe a minor UX inconsistency with hl-line-mode in the
Notmuch search page.

How to reproduce: Enter the Notmuch search page, search results are
shown, no message is highlighted. Scroll down the list with your arrow
keys to trigger the highlighting.

What (I think?) should happen instead: Upon entering the search page,
the first search result should be highlighted
straightaway. Nice-to-have: see at the bottom.

By looking at the code, I think the issue may be in the way Notmuch
search hooks are called here [0].

Adding a short delay, e.g. `(sit-for 1)', before `(run-hooks
'notmuch-search-hook)' solves the issue - at the cost of having a fixed
delay though, which is unacceptable of course. An actual solution might
involve to make sure these hooks are only launched synchronously once
the buffer has been displayed?

This is a minor UX glitch but could the effects of this be more serious
should the user user redefine `notmuch-search-hook'?

Nice to have: No highlighting should happen on empty search buffers;
what we now have instead is that "End of search results" gets
highlighted when moving on top of it with your cursor. This clashes with
the idea that if it's highlighted then it's something I can select and
interact with. This is probably a wont-fix though, too hard to achieve
with the hl-line-mode machinery?

I'd be glad to hear your thoughts on this, I'm not particularly familiar
with Emacs Lisp but happy to try and contribute if I can.

Thanks and best,

Fabio.


- [0] https://git.notmuchmail.org/git?p=notmuch;a=blob;f=emacs/notmuch.el;h=2ef67c0e798dbc65c144cef77cd8642c506f98c0;hb=21e365f51a7ff17e5154cf06396aeafe3f7d9bd7#l1040

             reply	other threads:[~2021-09-12 12:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-12 12:11 Fabio Natali [this message]
2021-09-13  1:03 ` [PATCH] emacs: run notmuch-search-hook lazily David Bremner
2021-12-04 16:14   ` 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=YT3ueuZHKW931NW3@localhost \
    --to=me@fabionatali.com \
    --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).