selectrum icon indicating copy to clipboard operation
selectrum copied to clipboard

Remember prescient filtering for selectrum-repeat

Open rileyrg opened this issue 5 years ago • 15 comments

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.

rileyrg avatar Jan 05 '21 09:01 rileyrg

@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 ).

clemera avatar Jan 05 '21 12:01 clemera

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 ;)

rileyrg avatar Jan 05 '21 14:01 rileyrg

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?

minad avatar Jan 05 '21 14:01 minad

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.

clemera avatar Jan 05 '21 14:01 clemera

@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 https://github.com/minad/consult/issues/6#issuecomment-753729831 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!

minad avatar Jan 05 '21 15:01 minad

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.

clemera avatar Jan 05 '21 15:01 clemera

@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.

minad avatar Jan 05 '21 15:01 minad

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.

clemera avatar Jan 05 '21 15:01 clemera

@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 avatar Jan 05 '21 15:01 minad

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

minad avatar Jan 06 '21 10:01 minad

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.

raxod502 avatar Feb 24 '21 05:02 raxod502

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

rileyrg avatar Feb 24 '21 09:02 rileyrg

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?

minad avatar Feb 24 '21 09:02 minad

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.

clemera avatar Feb 24 '21 10:02 clemera

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.

minad avatar Feb 24 '21 10:02 minad