unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* Minor UX issue with hl-line-mode and notmuch-search
@ 2021-09-12 12:11 Fabio Natali
  2021-09-13  1:03 ` [PATCH] emacs: run notmuch-search-hook lazily David Bremner
  0 siblings, 1 reply; 3+ messages in thread
From: Fabio Natali @ 2021-09-12 12:11 UTC (permalink / raw)
  To: notmuch

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-12-04 16:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-12 12:11 Minor UX issue with hl-line-mode and notmuch-search Fabio Natali
2021-09-13  1:03 ` [PATCH] emacs: run notmuch-search-hook lazily David Bremner
2021-12-04 16:14   ` David Bremner

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).