Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remember prescient filtering for selectrum-repeat #319

Open
rileyrg opened this issue Jan 5, 2021 · 15 comments
Open

Remember prescient filtering for selectrum-repeat #319

rileyrg opened this issue Jan 5, 2021 · 15 comments

Comments

@rileyrg
Copy link

rileyrg commented Jan 5, 2021

This is nice but would be much nicer if it remembered the prescient filter options - as it is I need to re-enable regexp with M-s r for example. Not sure where to raise this.

@clemera clemera changed the title (global-set-key (kbd "C-x C-z") #'selectrum-repeat) : remember filtering Remember filtering for selectrum-repeat Jan 5, 2021
@clemera clemera changed the title Remember filtering for selectrum-repeat Remember prescient filtering for selectrum-repeat Jan 5, 2021
@clemera
Copy link
Collaborator

clemera commented Jan 5, 2021

@raxod502 Maybe we could completely abandons this command for the time being? I don't think it adds much and mabye it gives to much room for potential problems with a lot of edge cases. Alternatively we could make the last input available via some other means, for example we could look into integrating it with the general idea of input history (#185 ).

@rileyrg
Copy link
Author

rileyrg commented Jan 5, 2021

Hmm, it adds a lot IMO since its way quicker than creating occur buffers. it's analogous to helm's restore candidates/status which was C-c h r iirc. But I'm new to this stuff so maybe use habits change. I was thrilled to find it ;)

@minad
Copy link
Contributor

minad commented Jan 5, 2021

I would rather ban it instead of adding complexity and a dependency to prescient. Alternatively consider moving it to prescient-selectrum? And you can always access the command/minibuffer history or wouldn't that work?

@clemera
Copy link
Collaborator

clemera commented Jan 5, 2021

So you use this mainly to restore searches I assume? If you use embark you can quickly create a static buffer of your current results maybe that would be an alternative.

@minad
Copy link
Contributor

minad commented Jan 5, 2021

@clemera @rileyrg In the context of consult, there was also the feature request for something like ivy-resume, which is used to restore a completing-read session. But I consider it unnecessary. I copy some parts of my response minad/consult#6 (comment) here:

  1. What about accessing the command history instead? It is not as comfortable but almost as good.
  2. Alternatively you can enable recursive minibuffers and jump out of the minibuffer for recursive editing, keeping the current session alive like this. This way you capture the continuation yourself. Basically the feature already exists in stock Emacs :)
  3. And then there is also Embark occur! This is what should be used if you want store a session!

@clemera
Copy link
Collaborator

clemera commented Jan 5, 2021

I mostly agree, the only benefit I see that you don't have to think of it ahead of time. With the repeat functionality you can always restore the last matches after you quit.

@minad
Copy link
Contributor

minad commented Jan 5, 2021

@clemera I agree. But in the context of consult, I still reject it because of the immense complexity associated with a potential consult-resume/consult-repeat command.

@clemera
Copy link
Collaborator

clemera commented Jan 5, 2021

Something like a occur buffer for the last session would be nice. Maybe one could setup minibuffer-exit-hook to save the last results into an occur buffer by default.

@minad
Copy link
Contributor

minad commented Jan 5, 2021

@clemera Oh this sounds like a great idea! Maybe this could be offered by Embark by default! I only wonder about the efficiency/slowdown of that, but it shouldn't be too bad? Please create an Embark issue for that!

@minad
Copy link
Contributor

minad commented Jan 6, 2021

@clemera Does it make sense to remove selectrum-repeat, if we have embark-repeat now?

@raxod502
Copy link
Member

I certainly wouldn't object to removing selectrum-repeat, though I suspect various users might have stronger feelings about it than I. If we've got the feature implemented in a more robust way in Embark, it sounds like we should drop it from Selectrum.

@rileyrg
Copy link
Author

rileyrg commented Feb 24, 2021

I use selectrum repeat. I don't use embark. It's very useful. But, I guess I can try embark again.

@minad
Copy link
Contributor

minad commented Feb 24, 2021

We don't have embark-repeat yet. This had to be reverted again for various reasons. However I think it is perfectly reasonable to remove certain features from selectrum as long as they fit better elsewhere in a completion-system agnostic way.
This way we can avoid overlap between the packages. In any case I can highly recommend Embark. @rileyrg how is it going for you with the packages? Any new feedback/issues?

@clemera
Copy link
Collaborator

clemera commented Feb 24, 2021

However I think it is perfectly reasonable to remove certain features from selectrum as long as they fit better elsewhere in a completion-system agnostic way.

I agree as long as the features aren't part of the default completion API (like for example completion-in-region which is the only place we currently have an overlap I think). As I see it Selectrum tries to provide a better UI for the default completion API so we should cover it completely with the new Selectrum like UI.

@minad
Copy link
Contributor

minad commented Feb 24, 2021

Sure, the completion ui should be fully covered. I consider this repeat command or the history/input history enhancements we discussed as more advanced features, which may be served better elsewhere. It should be decided on a case by case basis.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants