From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id kL2uJsFlYWcWAAAA62LTzQ:P1 (envelope-from ) for ; Tue, 17 Dec 2024 11:51:29 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id kL2uJsFlYWcWAAAA62LTzQ (envelope-from ) for ; Tue, 17 Dec 2024 12:51:29 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=pengjiz.com header.s=fm2 header.b=M3QOESSa; dkim=fail ("body hash did not verify") header.d=messagingengine.com header.s=fm1 header.b=vg9r0gwO; 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=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1734436289; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-owner:list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=uHuiUx7rMwsGTdJkHoH8V+ig4TpdBw4iRMJnVsQPgUU=; b=UG9olg9QswJLTGJtY/oIrRzRauJtGQWcB1Db0WfhZ52uCaj20yetp35SBF5SikK2eJMOsf DwLNUNveIxcUdmb1UcSlCo2WqY2V1QIqqfEetAFjwrcUc4psgGUFIdWGi4V5zCRUggBtXp Mli44CP6CTYV4Ih3F0DMCFUl6TyKMJq/Z6uPEQIjhSVoWjP+lZVfwMhId+f00YYs0r7X28 3SKGJWNTMVpXcjhzEhWM/W/Mo/jBbJh6xDh7BNpMYmRYC+6wmIpDJvQTBQRNE6SDzonAPg 2LyKM9qWxiMu2v2uQBfGnvxvUT+L7UqJThZh2aEoPHZ7dBcEGASvLFJ1eNWEUQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=pengjiz.com header.s=fm2 header.b=M3QOESSa; dkim=fail ("body hash did not verify") header.d=messagingengine.com header.s=fm1 header.b=vg9r0gwO; 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=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1734436289; a=rsa-sha256; cv=none; b=pSovGTVUUJmMUftsUK5Rpgj7YMeLGbdO586/Pk1h1U6cGDBKhssijh14ssvlS+/7xuCbuk lL2AvM+hP76nVLMMrRzb1/Bf04unAODotoyYtZlG/eeDOrsoGCdhNkz74LZF8PuKwcYZ6h rKjtAuSB6mOmZe3B9YvQNaZ+piMTcctD6XfHHnXqzTMHR4L8ra0WYagFXUVfvOHyMhUaTk qUIoIess2OlNiOEbw1RM5axfkse1Xpn3ehD8Mq2q+TyBfLdmjecHYvSGXSD+6t7k2tacgD Jcv/fBGWfO4sAPgyvNaWLTY7R4962zgrXLE2svsQ+z/tHOzJc/XYbwhrSObS8A== 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) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id DA19B5DC95 for ; Tue, 17 Dec 2024 12:51:28 +0100 (CET) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id E52A05F5C9; Tue, 17 Dec 2024 11:51:19 +0000 (UTC) X-Greylist: delayed 372 seconds by postgrey-1.36 at yantan; Tue, 17 Dec 2024 11:51:16 UTC Received: from fout-a6-smtp.messagingengine.com (fout-a6-smtp.messagingengine.com [103.168.172.149]) by mail.notmuchmail.org (Postfix) with ESMTPS id 49F385E294 for ; Tue, 17 Dec 2024 11:51:16 +0000 (UTC) Received: from phl-compute-06.internal (phl-compute-06.phl.internal [10.202.2.46]) by mailfout.phl.internal (Postfix) with ESMTP id 5D412138020A; Tue, 17 Dec 2024 06:45:03 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-06.internal (MEProxy); Tue, 17 Dec 2024 06:45:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pengjiz.com; h= cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1734435903; x=1734522303; bh=8KpKf0Qa29 qhvGvYWKDeKocKev213UEelP0lj7nn0KA=; b=M3QOESSaZcZPXltHjR9rkcT4Nl 2GxQinTlUwzWflDaZDwQDx+QAHDb1ddtFbgCWz4Q5GsHIKmfUt9BQJggzT4KJZvr TGSYjbY7jCpJTKrUaahviorQsVRUC85MPX1S4zetNqhkyx8Y0FVTzSVEJZm7MrEJ GPN3QXLgjwqggwRQ+q1WyCuzcS5+wszcy5/tT85avEYgJygREcXW0Vb2MouDXp/1 aTxYZ8uMikcGmmSiGO2d1pSUxhm2Lt3JrW/jXIqjVXJnGA4g5bEJJ6tv4LJEbx7q zQwENMJtjX0Jiv3fdjD8CdaER2z7w/Wl+/WK+KWLnKLxdUlYaMq8ExeCaLww== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1734435903; x=1734522303; bh=8KpKf0Qa29qhvGvYWKDeKocKev213UEelP0 lj7nn0KA=; b=vg9r0gwOOOaPCYl5CrYNWAAtKmwVwAabW1BlvBe7z7f649YLAIk donzhAPZWAQeaDBje14Ox2k9TVk7Pc886u42x9IB+3ZZdCho3wjcURmBfkqvzVYa Rb0KaQEctZJYT3AjA3SALJSnbsC4HvULpFVKa52Cdpk4yWv2v4PbRgMm1H6559Rj Nsk5WgvFmhSMWI0CGJYniQzEfpI5jcxUOYqgAbSY23fFZ2HN0lu15Ljp05zOGvLi o9zSH/i17/y6zVPR8K7SUCeJBU8kd7UWkEzHc6vJWniBSVddB2IffGAiE5UshTro Owj/GZihsw6osTpzDDxYYSkM5EXVd1UXvFA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrleehgdefvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdpuffr tefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnth hsucdlqddutddtmdenucfjughrpefhvffujghffffkgggtsehttdertddttddtnecuhfhr ohhmpefrvghnghhjihcukghhrghnghcuoehmvgesphgvnhhgjhhiiidrtghomheqnecugg ftrfgrthhtvghrnhepiedvkefhkeeiteefgfeuveekudetveevgefghfelkeevhedtgeev gefgudehvdfgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepmhgvsehpvghnghhjihiirdgtohhmpdhnsggprhgtphhtthhopedvpdhmohguvgep shhmthhpohhuthdprhgtphhtthhopegurghmihgvnhestggrshhsohhurdhmvgdprhgtph htthhopehnohhtmhhutghhsehnohhtmhhutghhmhgrihhlrdhorhhg X-ME-Proxy: Feedback-ID: i16614472:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 17 Dec 2024 06:45:01 -0500 (EST) From: Pengji Zhang To: Damien Cassou , notmuch@notmuchmail.org Subject: Re: [PATCH] emacs/show: Only recenter interactively In-Reply-To: <8734ipdsep.fsf@cassou.me> References: <20241123151601.16201-2-damien@cassou.me> <87o71dguje.fsf@pengjiz.com> <8734ipdsep.fsf@cassou.me> Date: Tue, 17 Dec 2024 19:44:53 +0800 Message-ID: <87ikria5ze.fsf@pengjiz.com> MIME-Version: 1.0 Message-ID-Hash: D7RFWU742MPIXABTPH2YR2YX2OLBHCQZ X-Message-ID-Hash: D7RFWU742MPIXABTPH2YR2YX2OLBHCQZ X-MailFrom: me@pengjiz.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header 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-Country: DE X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx13.migadu.com X-Migadu-Spam-Score: 3.80 X-Spam-Score: 3.80 X-Migadu-Queue-Id: DA19B5DC95 X-TUID: JEppTVzSsAn/ Damien Cassou writes: > [...] > > That makes sense. This function is, for example, called by > `notmuch-show-apply-state' which is itself called by > `notmuch-show--build-buffer' which is itself called by > `notmuch-show-refresh-view'. If I go with the idea of adding an > `adjust` parameter as you (and Emacs maintainers) suggest, does it > mean that I should add this parameter to all these functions? Or maybe > should I move the call to `notmuch-show-message-adjust' from > `notmuch-show-goto-message' to interactive functions that (possibly > indirectly) make use of it (e.g., `notmuch-show-refresh-view' and > `notmuch-show-filter-thread'). The second solution seems to make the > most sense to me because it is only in the interactive function that > the developer really know what should be shown to the user and why. > > Do you have another idea or a preference? I like the second solution better as well. To me, it generally feels cleaner if we constrain the user-visible side effects in interactive commands. However, I am afraid it would be involved, and I am not sure if it is worth the effort. Besides, do you have other use cases for calling those commands non-interactively? If not, IMO this time it might be better to only change 'notmuch-show-previous-message' (or 'notmuch-show-imenu-prev-index-position-function'), so to fix the issue you had with 'which-function-mode'. After a closer look, I have an impression that those commands are meant to be interactive only. Regards, Pengji