abo-abo / swiper

Ivy - a generic completion frontend for Emacs, Swiper - isearch with an overview, and more. Oh, man!
https://oremacs.com/swiper/
2.3k stars 338 forks source link

ivy complete integration. #2321

Open Ergus opened 4 years ago

Ergus commented 4 years ago

Hi:

Recently the emacs developers were helping the helm developers to add more integration with all the internal completion infrastructure. Probably part of it is already into ivy (as it is bases in icomplete), but it worth to give it a look if there is something missing in ivy/counsel that can be added/improved.

The thread is: (https://github.com/emacs-helm/helm/issues/2165)

I made some references to this in the mailing list today.

abo-abo commented 4 years ago

Thanks for the info. I also went through the thread on emacs-devel. It's really unfortunate that just two people managed to take over the whole narrative based on their personal preferences.

I can respect Helm, it's quite advanced and well maintained. But comparing those hacks in Ido and telling that they're clearly better than Ivy is very misinformed. Also stating that Icomplete is somehow better or simpler than Ivy: Ivy grew from Icomplete by adding the features users wanted. Just check out an early commit of Ivy and you'll see Icomplete.

I'll go through the linked thread later and see what can be done.

joaotavora commented 4 years ago

Icomplete is somehow better

I didn't say it's better? If I did, I apologize. How could I? I don't use Ivy at all: I can't judge.

It does seem kinda irrefutable that it's much much simpler tho (like at least 10x less lines). Simply because of its decision to have less features, or to have them provided by other components.

abo-abo commented 4 years ago

I didn't say it's better?

I believe the other person said that Ido is clearly better. It seems they did not look into ivy--regex-fuzzy and the automatic integration of flx by ivy.

It does seem kinda irrefutable that it's much much simpler tho (like at least 10x less lines). Simply because of its decision to have less features, or to have them provided by other components.

Arguable, but not irrefutable, IMO. See commit 6a874a4. There, ivy.el is 200 lines of code, basically a cleaned up icomplete.el. The "other components" trick can be arguably counted towards icomplete line count.

joaotavora commented 4 years ago

There, ivy.el is 200 lines of code,

lol, you see there is thing called time and these things called past and present.

now seriously, you were kidding, right? I meant "now" of course, present tense. the fact that it was simpler then has no relation on the fact that it is more complicated now.

The "other components" trick can be arguably counted towards icomplete line count.

This "trick" is called software engineering. I love such trickery, quite the fan.

I'm kidding, of course, don't take this wrong, please. Superlatively amazing work on Ivy, judging by your fandom! I hope you can make it work with Emacs's completion interfaces, just like Helm did, so we can all enjoy it bit by bit and rave about that one initial commit time where our files were empty and infinite times simpler than they are today.

joaotavora commented 4 years ago

I believe the other person said that Ido is clearly better

Just a note. I did say that myself, and you are right to complain. I have no idea, as I said earlier, I never tried your program. Ido's interface seems better (because it seems simpler).

Ergus commented 4 years ago

I should mention that ido.el has 5028 lines and ivy.el 5110. So not a big difference. On the other hand ivy does not requires all the external patches and hacks (like ido-completing-read+, ido-hacks, ido-occur, flx-ido, ido-vertical-mode). Si I think that actually ivy provides just more functionalities.

In any case I hope @abo-abo can integrate whats is missing to make it better.

abo-abo commented 4 years ago

@Ergus @joaotavora I read through the whole thread, but I can't quite make out what's missing.

Could someone enlighten me with a small reproduction scenario?

Ergus commented 4 years ago

Sorry I use ivy very much but I don't know anything about the new functioalities in the completion system maybe @joaotavora could make an abstract of what was added to Helm and then we can see the missing functionalities. So far there shouldn't be too much missing; probably just details. As ivy is based on icomplete, only the new changes will be missing. So far I just know about the new flex completion and that fido has some improved defaults respecting to icomplete. Lets wait for @joaotavora.

joaotavora commented 4 years ago

@joaotavora could make an abstract of what was added to Helm

I think Helm's author is the person most qualified to do that. I just know, from second hand knowledge, that it now works acceptably in SLY.

Also, @abo-abo I will add you to an off-list discussion about changes to completion system.

manuel-uberti commented 4 years ago

Probably makes sense to mention @thierryvolpiatto to see if he can add something useful for @abo-abo, then. :)

thierryvolpiatto commented 4 years ago

I will try to write something in helm wiki about completion-styles implementation, not yet though because the API may change soon and I have few time. @abo-abo if you need some help don't hesitate to ask (note that I know nothing about ivy). You can ask at https://github.com/emacs-helm/helm/issues/2165.

abo-abo commented 4 years ago

@thierryvolpiatto Thanks for the offer. I will ask for help when I have more time to look into this. Looks like a lengthy project.