emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] (icomplete-vertical-mode): Add support for affixations and,


From: João Távora
Subject: Re: [PATCH] (icomplete-vertical-mode): Add support for affixations and, annotations
Date: Tue, 25 May 2021 10:21:33 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Daniel Mendler <mail@daniel-mendler.de> writes:

> On 5/25/21 12:46 AM, João Távora wrote:

>> I think rotation makes sense in vanilla icomplete, but not in
>> icomplete-vertical-mode.  So for the latter, I think I will just take
>> the cue from Vertico and use an index (or equivalent).  Since it's in
>> GNU ELPA, maybe even borrow some code :-)
>
> Oh, I disagree here. I think Icomplete should continue to use rotations,
> since this is what Icomplete is.

I don't think Icomplete, or anything in Emacs, is defined by any one
thing.  Things in Emacs do some things, and then people come and add
more things, usually configurable.  Icomplete has lots of switches that
change its behaviour.

icomplete-vertical-mode is a new mode for Emacs 28, so if any users are
very attached to the rotation, they'll likely come forward and the
obvious answer is to make a toggle.

> Why bake in two very different modi inside Icomplete, given that
> Vertico exists?

I don't follow.  A lot of "vertical completers" existed before either
Icomplete or Vertico, and that didn't prevent authors of the latter to
make them.  Some people would ask you back, "why make Vertico given that
Icomplete exists?!"  I'm not among these people.  Maybe Vertico does
something special or you simply enjoy writing it and maintaining it, all
valid reasons to me.

> Honestly, I think it would be better than just import Vertico into
> Emacs then.  Of course it also lives happily on ELPA.

No objections here.

> Baking two such different modi in Icomplete only complicates things and

For whom?  For you?  icomplete-vertical-mode wasn't my idea, though I
quite like that one is able to combine it with fido-mode, for example.

> I don't consider Icomplete a clean implementation actually, since it
> bakes both `completion-in-region` and `completing-read` into one package
> (see my criticism on the README of Vertico and Corfu).

I don't have an opinion on cleanliness but icomplete has been working ok
for me.  I used to use ido-mode, which is a bit "dirtier" than
icomplete, so to speak.  But if your stuff is extra-clean, that's great.

>>>> Another idea is to make icomplete work for
>>>> `completion-in-region-function`.
>>>
>>> Icomplete already should somehow work as a
>>> `completion-in-region-function`, but I think it is a bit brittle.
>> 
>> I have a vague recollection that Someone Somewhere (tm) in one of my
>> extensions over at GitHub tried it out and found it could mostly work
>> with some tweaks.  Will search for it.
>
> I also tried it out and it somehow works.

Cool, what did you do to make it work?

> But as argued above, I think it is actually better to maintain this in
> separate packages, at least if you start from a clean slate. This way
> one can do away with all these icomplete--field-beg accessors too.

I don't see why starting from a clean slate is desired or not.  Also
don't see the problem with those accessors.  At any rate they seem
implementation details.

> Of course I will not hold you back from revamping Icomplete
> completely. It is good to have multiple UIs. But you could seriously
> consider my packages - I think they are exactly what you may be
> looking for

I'll try your packages, but I'm fine with icomplete.el.  I've been using
it for some years and I want to use it.  I don't want to revamp it
completely, just maybe make its vertical mode slightly better.  In fact,
this whole thread is about your patch to do just that :)

I also want to try it for completion-in-region, so be sure to let me
know what you did to get it working.

João

BTW: if you're into completion system widgets, one thing that's sorely
missing in Emacs IMO is a completion tooltip in C that uses the same
display as the very nice new tty menus instead of overlays or tiny
frames.



reply via email to

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