From: Eshel Yaron via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: "João Távora" <joaotavora@gmail.com>
Cc: Eli Zaretskii <eliz@gnu.org>, 68547@debbugs.gnu.org
Subject: bug#68547: [PATCH] ; Fix 'mode-line-format-right-align' with ElDoc
Date: Sun, 21 Jan 2024 14:20:24 +0100 [thread overview]
Message-ID: <m17ck26cx3.fsf@dazzs-mbp.home> (raw)
In-Reply-To: <CALDnm52KpypEO-gh4rE8ncmdO9==jSa3f1fFw_Lo1zwZNdhUYg@mail.gmail.com> ("João Távora"'s message of "Sun, 21 Jan 2024 08:52:33 +0000")
João Távora <joaotavora@gmail.com> writes:
> On Sun, Jan 21, 2024 at 8:34 AM Eshel Yaron <me@eshelyaron.com> wrote:
>
>> I tried your new patch, and it works well, AFAICT. Two suggestions:
>>
>> 1. This patch omits a space that would appear before the info on the
>> mode line. I like that bit of padding, so I suggest restoring it :)
>
> OK.
>
>> 2. In `eldoc--message-in-mode-line`, `add-hook` and `remove-hook` can be
>> called with non-nil LOCAL argument to further localize the effect,
>> although I'm not sure that makes a real difference in practice.
>
> I tend to think it would break your pathological use cases of
> shuffling buffers above the minibuffer while it is ongoing, no?
> Two or more separate transient cleanup lambdas can appear
> in those cases, no?
Yes, you're right. My suggestion was based on a wrong assumption that
these calls take place with the minibuffer as the current buffer.
If I say something like `(with-current-buffer minibuf ...)` around the
`add-hook` and `remove-hook` calls, and make these calls change the
local value of `minibuffer-exit-hook`, that seems to work nicely. In
particular, this avoids calling the cleanup lambda when you exit a
nested minibuffer (e.g. `M-: (foo bar) M-x baz RET RET`). WDYT?
prev parent reply other threads:[~2024-01-21 13:20 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-17 19:44 bug#68547: [PATCH] ; Fix 'mode-line-format-right-align' with ElDoc Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-20 9:56 ` Eli Zaretskii
2024-01-20 10:20 ` João Távora
2024-01-20 10:58 ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-20 12:01 ` João Távora
2024-01-20 13:55 ` João Távora
2024-01-20 15:33 ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-20 18:08 ` João Távora
2024-01-20 18:16 ` Eli Zaretskii
2024-01-20 21:12 ` João Távora
2024-01-21 5:18 ` Eli Zaretskii
2024-01-21 8:34 ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-21 8:52 ` João Távora
2024-01-21 13:20 ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m17ck26cx3.fsf@dazzs-mbp.home \
--to=bug-gnu-emacs@gnu.org \
--cc=68547@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=joaotavora@gmail.com \
--cc=me@eshelyaron.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.