[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Possible minibuffer completion enhancements

From: Eshel Yaron
Subject: Re: Possible minibuffer completion enhancements
Date: Tue, 23 Jan 2024 08:33:30 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

Hi Philip,

Philip Kaludercic <philipk@posteo.net> writes:

> Eshel Yaron <me@eshelyaron.com> writes:
>> I've rebased the feature/minibuffer-completion-enhancements branch on
>> top of the current master, and pushed it to emacs.git.  Looking forward
>> for your thoughts and feedback!
> I like the improvements, they are not invasive but useful.  C-o is
> particularly nice.

Thanks!  I find that one quite handy, too.

> One annoyance I had with `completions-auto-update-mode' was that it
> didn't update the buffer on deleting a character.

Yes, the `completions-auto-update-mode` I've included in this branch can
definitely be improved with that regards.  TBH this is not really the
focal point of these changes as far as I'm concerned, but I included it
since I think it complements the new commands nicely.

I've implemented this `completions-auto-update-mode` after Spencer
brought up the idea a few months ago, and I've been using it since.
Juri also had some interesting thoughts on the subject, IIRC.  See the
discussion here https://yhetil.org/emacs/87bkd3z9bi.fsf@catern.com/

> This should fix it, but perhaps it can be optimised further by using
> `after-change-functions'?

Unfortunately, neither `post-command-hook` (as you propose in the patch)
nor `after-change-functions` do the right thing in this case, because
there are commands and changes to the minibuffer contents that should
_not_ update *Completions*.  For example, when you move between
completion candidates with M-<down> in the minibuffer.  In fact,
`post-self-insert-hook` covers most of the cases in which we do want to
update *Completions* IME, except that it doesn't cover plain deletion,
as you noticed.

An alternative to using a different hook would be to arrange for your
deletion command to update *Completions* when appropriate.  Juri and
Spencer probably have more useful insights on that matter, though.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]