From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 4HaYOD71PWF0SgAAgWs5BA (envelope-from ) for ; Sun, 12 Sep 2021 14:40:30 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id EA5YND71PWH/bAAAB5/wlQ (envelope-from ) for ; Sun, 12 Sep 2021 12:40:30 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [IPv6:2607:5300:201:3100::1657]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 9B828763C for ; Sun, 12 Sep 2021 14:40:30 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id D7B921FB66; Sun, 12 Sep 2021 08:40:25 -0400 (EDT) X-Greylist: delayed 1330 seconds by postgrey-1.36 at nmbug; Sun, 12 Sep 2021 08:33:52 EDT Received: from mslow1.mail.gandi.net (mslow1.mail.gandi.net [217.70.178.240]) by mail.notmuchmail.org (Postfix) with ESMTPS id 037361F966 for ; Sun, 12 Sep 2021 08:33:52 -0400 (EDT) Received: from relay12.mail.gandi.net (unknown [217.70.178.232]) by mslow1.mail.gandi.net (Postfix) with ESMTP id 5F8D6CE108 for ; Sun, 12 Sep 2021 12:12:02 +0000 (UTC) Received: (Authenticated sender: me@fabionatali.com) by relay12.mail.gandi.net (Postfix) with ESMTPSA id 0853E200003 for ; Sun, 12 Sep 2021 12:11:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fabionatali.com; s=gm1; t=1631448700; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=xFNvfAhlhnGpU1Gitt+Hh46wls9bjMsub5UzETq9qfY=; b=fzZE5PxUoR1jnCc4T4/RWt3JFlnS2PBupmUQ6es5bucpIrWlCOsRVx9K5/ti0okA3FsJzb Ack+6CRKhe8LAxCsJmr9MriidXEgdwqnhMS7XGBQRg7Lf6K/d5xykdbakLp+dNApTJ2rX8 gyeZjS4uwJlmVGknQrSMrSON67BFM6j13Ki/0DTi9hD9tccueH9DRn9Nhc+P3Ui1f7kxWc /Rlv7g8lGpBFie4b4xL9nUjVkEOT6FXd1xuJ0hwTJaL3+S4C2KWhhN7hOswhsIhCVlmPmO ivb8S+9mXSfF7W3hOI8R1Od1PJUBdLRmnvJPoc8jU8U44gQTlp7CTpdRlsmXfg== Date: Sun, 12 Sep 2021 13:11:38 +0100 From: Fabio Natali To: notmuch@notmuchmail.org Subject: Minor UX issue with hl-line-mode and notmuch-search Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-MailFrom: me@fabionatali.com X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0 Message-ID-Hash: MYIRZPWZ7NX5UVXZI3I4CKARCUMEE5WK X-Message-ID-Hash: MYIRZPWZ7NX5UVXZI3I4CKARCUMEE5WK X-Mailman-Approved-At: Sun, 12 Sep 2021 12:40:24 -0400 X-Mailman-Version: 3.2.1 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1631450430; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=81kZ+CTpI+q3Lfbu8O9A6C7f55Myd5EKM2SLpootnBI=; b=H0nwFBgjKhv0DE2MrSwmSZUqfjC/74NAszFrh7QU+FAnFvePWfvV5vsMW5D+8ZVRKWKBQM 4nRcZM85UqGjO25uDqd94IC3S+JaTeNe/4uyOf7wAmOpAyzczfILXhgRtytZ6VCJ3o49K4 ez47q1Azh/shU2uEjW2z+IXfwUkxTJYBng+XLgKvTUVjTc+iz8EG22csJkN3kar3nSjgp9 RpH7lQWy7r2VxOLI2+NG+eIp+EPjlNbKzmzvIjXgxAGatD8Wba5p83zhib/baJIZN+1aRF +qLFL/Q1Y92Wbq8NGTIB0uugYLPru0vxxgfylZf+q8wr7FuOY4JSWHMmcZW83A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1631450430; a=rsa-sha256; cv=none; b=Af2uu8HNe6X9GS1UwKoVqDF+/Xt/A/1E+OkrPUtN5FlGMmZtdaBJ988ot3wh1dKYkl5WPR ktkBaYIJnVh0NXj5wtMFF3Nx819wkawpz4uWULPbXy/aiPFg461dhRK0xMS/J3KbbltMCn EyU1uO+KOP3bNEGegMSpRABYCD1v9WXK82vBKXZPnYXJijnZSq1rSOt463nmXciIgRa3ME NgehkmZuPyyJRs4kMwLX4VebOAg2rB5VsCxmO6B1pL9pXA4QpXTDXVzVL+WusttIp0wbfu RwePbo/Kt6mNwX0QZW6MPjPSF6Y1BVtgvJLDctQ96KQ18GygE7cxk8EzVcjV+Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=fabionatali.com header.s=gm1 header.b=fzZE5PxU; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -0.63 Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=fabionatali.com header.s=gm1 header.b=fzZE5PxU; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: 9B828763C X-Spam-Score: -0.63 X-Migadu-Scanner: scn0.migadu.com X-TUID: Ob1xgYeQSzmb 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