* [PATCH v2] notmuch-show-imenu-prev-index-position-function: Don't recenter
@ 2024-12-17 19:29 Damien Cassou
0 siblings, 0 replies; only message in thread
From: Damien Cassou @ 2024-12-17 19:29 UTC (permalink / raw)
To: notmuch; +Cc: Damien Cassou
* emacs/notmuch-show.el (notmuch-show-imenu-prev-index-position-function):
---
This is a completely new and much simpler implementation. Idea is from
Pengji Zhang <me@pengjiz.com>.
Message-ID: <87ikria5ze.fsf@pengjiz.com>
---
emacs/notmuch-show.el | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index 14e3c698..921c0ef1 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -2686,7 +2686,9 @@ (defun notmuch-show-imenu-prev-index-position-function ()
`imenu-prev-index-position-function'."
(if (bobp)
nil
- (notmuch-show-previous-message)
+ (if (eobp)
+ (notmuch-show-move-to-message-top)
+ (notmuch-show-goto-message-previous))
t))
(defun notmuch-show-imenu-extract-index-name-function ()
--
2.47.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2024-12-17 19:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-17 19:29 [PATCH v2] notmuch-show-imenu-prev-index-position-function: Don't recenter Damien Cassou
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).