[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#68547: [PATCH] ; Fix 'mode-line-format-right-align' with ElDoc
From: |
Eshel Yaron |
Subject: |
bug#68547: [PATCH] ; Fix 'mode-line-format-right-align' with ElDoc |
Date: |
Sun, 21 Jan 2024 14:20:24 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
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?
- bug#68547: [PATCH] ; Fix 'mode-line-format-right-align' with ElDoc, (continued)
- bug#68547: [PATCH] ; Fix 'mode-line-format-right-align' with ElDoc, Eshel Yaron, 2024/01/20
- bug#68547: [PATCH] ; Fix 'mode-line-format-right-align' with ElDoc, João Távora, 2024/01/20
- bug#68547: [PATCH] ; Fix 'mode-line-format-right-align' with ElDoc, João Távora, 2024/01/20
- bug#68547: [PATCH] ; Fix 'mode-line-format-right-align' with ElDoc, Eshel Yaron, 2024/01/20
- bug#68547: [PATCH] ; Fix 'mode-line-format-right-align' with ElDoc, João Távora, 2024/01/20
- bug#68547: [PATCH] ; Fix 'mode-line-format-right-align' with ElDoc, Eli Zaretskii, 2024/01/20
- bug#68547: [PATCH] ; Fix 'mode-line-format-right-align' with ElDoc, João Távora, 2024/01/20
- bug#68547: [PATCH] ; Fix 'mode-line-format-right-align' with ElDoc, Eli Zaretskii, 2024/01/21
- bug#68547: [PATCH] ; Fix 'mode-line-format-right-align' with ElDoc, Eshel Yaron, 2024/01/21
- bug#68547: [PATCH] ; Fix 'mode-line-format-right-align' with ElDoc, João Távora, 2024/01/21
- bug#68547: [PATCH] ; Fix 'mode-line-format-right-align' with ElDoc,
Eshel Yaron <=