emacs-devel
[Top][All Lists]
Advanced

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

Re: Question about completion behavior


From: Ergus
Subject: Re: Question about completion behavior
Date: Wed, 9 Mar 2022 11:11:59 +0100

On Wed, Mar 09, 2022 at 05:37:37AM +0200, Eli Zaretskii wrote:
From: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Date: Tue, 08 Mar 2022 22:05:52 -0500

>>> Was all this behavior intended or how do you propose to solve this?
>>I think this can be changed.
>>Patches welcome.
> I am struggling how to preserve the old behavior indeed, because what I
> find a bit confusing is actually the default behavior.

I think we should first consider *not* preserving the behavior.
I.e. as suggested by the comment, rather than hide the completions, we
should update them (if they're displayed).

But please don't keep updating the completions buffer if TAB arrives
at a complete (but not necessarily unique) candidate.  That would be
an annoyance.


Hi Eli:

Thanks for replying. What do you mean by "at a complete"?
there are several conditions to handle:

These are the current more or less the conditions we have now:

1. no unique        (shows or update completions)
2. unique common    (complete-common and hides completion)
3. unique candidate (complete and hides completion)
4. unique common but completion is a valid entry (complete-common and hides 
completion)

Is the 4 to what you refer?

For example when we have:

magit
magit-commit
magit-push
....

and we do: magi<tab>

the completion goes up to magit (adds the t) but it is a valid
candidate.

What I propose is:

1. no unique        (shows or update completions)
2. unique common    (complete-common and UPDATE completions)
3. unique candidate (complete and hides completion)
4. unique common but completion is a valid entry (complete-common and hides 
completion)

Is this behavior fine??

Best,
Ergus


reply via email to

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