From: Pengji Zhang <me@pengjiz.com>
To: Damien Cassou <damien@cassou.me>, notmuch@notmuchmail.org
Subject: Re: [PATCH] emacs/show: Only recenter interactively
Date: Tue, 17 Dec 2024 19:44:53 +0800 [thread overview]
Message-ID: <87ikria5ze.fsf@pengjiz.com> (raw)
In-Reply-To: <8734ipdsep.fsf@cassou.me>
Damien Cassou <damien@cassou.me> 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
next prev parent reply other threads:[~2024-12-17 11:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-23 15:16 [PATCH] emacs/show: Only recenter interactively Damien Cassou
2024-12-15 8:12 ` Damien Cassou
2024-12-15 9:33 ` Pengji Zhang
2024-12-15 12:47 ` Damien Cassou
2024-12-17 11:44 ` Pengji Zhang [this message]
2024-12-17 19:32 ` Damien Cassou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ikria5ze.fsf@pengjiz.com \
--to=me@pengjiz.com \
--cc=damien@cassou.me \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).