From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id sMWPO0fTYWfZGwAAqHPOHw:P1 (envelope-from ) for ; Tue, 17 Dec 2024 19:38:48 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id sMWPO0fTYWfZGwAAqHPOHw (envelope-from ) for ; Tue, 17 Dec 2024 20:38:48 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=cassou.me header.s=dkim header.b=MALn4Tqs; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 135.181.149.255 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org; dmarc=fail reason="SPF not aligned (relaxed)" header.from=cassou.me (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1734464321; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-owner:list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=yk8ovO8ocQPGHADEQeAiMIRMa10kHOvQ3Qx/z+9n8Fk=; b=Kuy/deDyHIAE5fDbRSPMsyscjJ2s0tPyEpHqCXu4y283AdHTOitDV8NHwh1NFmd1kMvJxS r2WxKieNqQhY1B/I1zUcSCT1toQ/Y06fnNGoYXCdm/0BCcYlhXlR2zmNV/fgy/09EyYGQq dGAT2es0X80fit7MxdCAbDP/K0I76QFIZ7L49XlmYW7Ovuvqx9gOwGc8HZsdIJWwFIGsbE aHx4ujhDWH7WX89dZswmrlkHDA7EKO7gh/fFcjPKHWR47rc5q4+iNtLUgMjZ45Z9rnAIvG 8CoWaokOs3ATGVVCqe8wVHOSUSSMc67avvjnP0k/xEtz15ufnuEm/n3mty39hA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1734464321; a=rsa-sha256; cv=none; b=r17I2t+6UY36mwXJ6tH73c2NrCa/Txu87k2tqMDzRorwoAV0MM2Qbi6LFP1hlme8wl1RJo qfdaa5PjL/kX0Ag/WDZhB3MTCO5HgLOrekZYtC7lktAHnqibR7XzvvgOASGdy8Iw/unDzF T79F7d2fvy6s8CFGfOFDMJyk6S2UQh1dsddSgtctAn1x5Sb3ENEudI0pariMBxC0TqnQL1 x5N0SpaYSKsq3Q91THhaY9zwZsTAVstYFthAK6HQHpxLKF4Gv0dHk4eGfOCJKXMdQRZCPS 22PCENC0H/3//q1ktzPSAa7+S9bwoxFqSHB0VE0EAOv1R7mbZ7H6umzsg4c/gg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=cassou.me header.s=dkim header.b=MALn4Tqs; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 135.181.149.255 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org; dmarc=fail reason="SPF not aligned (relaxed)" header.from=cassou.me (policy=none) Received: from mail.notmuchmail.org (yantan.tethera.net [135.181.149.255]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 5D60E41084 for ; Tue, 17 Dec 2024 20:38:35 +0100 (CET) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 540EF5F5C9; Tue, 17 Dec 2024 19:29:27 +0000 (UTC) Received: from mail.reprendre.net (mail.reprendre.net [IPv6:2001:910:1410:501::1]) by mail.notmuchmail.org (Postfix) with ESMTPS id E0CF65E294 for ; Tue, 17 Dec 2024 19:29:24 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id A76F72CA83F; Tue, 17 Dec 2024 20:29:22 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cassou.me; s=dkim; t=1734463762; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=SCFB1+FhmXBsiAB+U1dFQycIqLw7Fac6bFcrLp41mhU=; b=MALn4Tqsfd/NqnVYm2522mvaS/Gro5+i5TKbP6rzKCcxb4WeQzWI36XrN7+WIxjqglGKDG c9bCrk46+nAhwWvESjFnxRPSt08Op3qxs0zR/xoA0yv1YvgYXbe6dfmatRyc7TMHtngDzG SfBkauhf9VXRJiL6Y2MSTMJT1dwovdMvgvLcbE+ofUvJUc14/Df6D8y8nyGqtHDVHaml1s aGbWfpXgi/m5Yb14Y/99o5uuBG5OJ/ZMKd40EzhXA8Us3wOb5S3/EH33K02tyvPEcEFd/9 J4RLmVPenirh10ETlHyUNc9xIGPbnEqS5VjcdQ5DJuvzllmN4QiC8rvj5cnrLA== From: Damien Cassou To: notmuch@notmuchmail.org Subject: [PATCH v2] notmuch-show-imenu-prev-index-position-function: Don't recenter Date: Tue, 17 Dec 2024 20:29:19 +0100 Message-ID: <20241217192919.889035-1-damien@cassou.me> X-Mailer: git-send-email 2.47.0 MIME-Version: 1.0 X-Last-TLS-Session-Version: TLSv1.3 Message-ID-Hash: FCS5EIZBD4K7EGN3GY4K32JDPPXEQ3MH X-Message-ID-Hash: FCS5EIZBD4K7EGN3GY4K32JDPPXEQ3MH X-MailFrom: damien@cassou.me 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 CC: Damien Cassou X-Mailman-Version: 3.3.3 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN X-Migadu-Country: DE X-Migadu-Scanner: mx11.migadu.com X-Migadu-Spam-Score: 5.79 X-Spam-Score: 5.79 X-Migadu-Queue-Id: 5D60E41084 X-TUID: bTvAX8z4KFSq * 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 . 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