radian-software / selectrum

🔔 Better solution for incremental narrowing in Emacs.
MIT License
739 stars 33 forks source link

Projectile #233

Closed humanitiesNerd closed 3 years ago

humanitiesNerd commented 3 years ago

In the Projectile documentation, I read Projectile is meant to work in conjunction with Ivy, Helm and maybe Ido too

Can Projectile and Selectrum work in conjunction ?

AndreaCrotti commented 3 years ago

I was using Helm before, and it was integrated with projectile, but now that I switched to selectrum it kind of behaves the same way, I just had to stop using the helm-projectile... and just use projectile-.. instead.

I think selectrum works at a lower level, so all the various actions happening in projectile will still get the benefit of using selectrum.

The only thing I seem to have lost is the auto completion in shell commands running with M-!, but I'm not 100% sure what magic lisp was making it happen before.

minad commented 3 years ago

For projectile it is only necessary to configure the completion-system, see https://github.com/raxod502/selectrum/wiki/Additional-Configuration, since projectile relies on ido by default. Maybe one could also ask @bbatsov if it would make sense to switch to "default" as the default completion system. Ido seems to be getting less attention, upstream is focused on icomplete (and the default completion framework) and external projects like selectrum also hook into the default mechanism.

bbatsov commented 3 years ago

Yeah, we can totally update the documentation. Projectile is not coupled with ido in any way, it's just the best completion-system that's bundled with Emacs.

minad commented 3 years ago

@bbatsov What do you mean by "update the documentation". I mostly agree with your assessment regarding the emacs completion systems. I've used projectile and ido for quite some time. But I think it might be better if projectile defaults to "default". It seems the default completion framework (see also icomplete+fido) is the way to go in the future. Furthermore ido is not as well integrated with the rest of emacs.

bbatsov commented 3 years ago

What do you mean by "update the documentation".

Adding some coverage of Selectrum there.

I mostly agree with your assessment regarding the emacs completion systems. I've used projectile and ido for quite some time. But I think it might be better if projectile defaults to "default". It seems the default completion framework (see also icomplete+fido) is the way to go in the future. Furthermore ido is not as well integrated with the rest of emacs.

That's fine by me. The current default traces back to a time when there weren't many alternatives in general.

minad commented 3 years ago

I think this has been resolved. Projectile is doing auto-detection now and selectrum does not have to do anything.

clemera commented 3 years ago

Okay, thanks @bbatsov and @minad!

bbatsov commented 3 years ago

Btw, as a result of this ticket I've discovered Selectrum and prescient and I've added them to Emacs Prelude. I've also started using them myself, as I've used ivy-mode for a while but I didn't use much counsel and the other extras, so it seemed that Selectrum covers my basic use-cases pretty well.

minad commented 3 years ago

@bbatsov Did you see my very recent Consult package which also covers some of the Counsel needs you may have? There is also some reddit discussion going on right now. The goal is that Consult is much less intrusive than Counsel.

clemera commented 3 years ago

That is nice to hear! There is also a growing amount of packages which allow to get additional features if you miss them. We list them in the README.

bbatsov commented 3 years ago

@minad Thanks for sharing! I'll check it out. I have to admin that functionality like consult-line never struck cord with me, because seeing the matches without context is a bit confusing. I think @raxod502 wrote somewhere about this as well, so I feel his pain. :-)

Might be a good idea to pick a more distinct name for the package before it's published to MELPA, though - I think consult and counsel are pretty close as names, and experience has taught me that this is going to lead to some confusion down the road.

minad commented 3 years ago

@bbatsov

Thanks for sharing! I'll check it out. I have to admin that functionality like consult-line never struck cord with me, because seeing the matches without context is a bit confusing. I think @raxod502 wrote somewhere about this as well, so I feel his pain. :-)

Yes I understand that. However somehow the swiper functionality just falls out without much code. I think it is nice to have options. But consult aims to provide more than swiper. Swiper is just the one consult-line function which happens to be there.

Might be a good idea to pick a more distinct name for the package before it's published to MELPA, though - I think consult and counsel are pretty close as names, and experience has taught me that this is going to lead to some confusion down the road.

This is intentional and I think it is distinct enough. I also like that the functions have some meaning with consult, e.g., consult-line, consult-buffer etc.

bbatsov commented 3 years ago

Yes I understand that. However somehow the swiper functionality just falls out without much code. I think it is nice to have options.

No argument from me. :-) I really tried to like this functionality in swiper, but it just didn't click.

This is intentional and I think it is distinct enough. I also like that the functions have some meaning with consult, e.g., consult-line, consult-buffer etc.

The names definitely sound cool (like actions), although if you want them to be more accurate perhaps something like consult-lines is a more intention revealing name. (e.g. consult-line finds matches in one line, consult-lines in all lines, etc). Naming is hard. :-)

minad commented 3 years ago

No argument from me. :-) I really tried to like this functionality in swiper, but it just didn't click.

I think the same happened to me initially. But after implementing it and playing around with it, they thing clicked for me. There is also the big bias that you likes the things you made :+1:

The names definitely sound cool (like actions), although if you want them to be more accurate perhaps something like consult-lines is a more intention revealing name. (e.g. consult-line finds matches in one line, consult-lines in all lines, etc). Naming is hard. :-)

Yes, I had that before or I had it inconsistent. But somehow the coin flip decided on the singular shorter names ;) There is also consult-*-history which only makes sense in the singular, I guess that is why I went with the singular everywhere.