-
-
Notifications
You must be signed in to change notification settings - Fork 108
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
Consult-buffer & ephemeral buffers #73
Comments
Yes, this functionality has been taken away. Unfortunately it is not possible to implement it without dynamic candidate lists. This means if we want invisible buffers to be shown too, we would have to show them right away :( Overall, I see these possibilities:
What do you think? |
I don't use it too commonly, but it helps when trying to troubleshoot issues some packages face when executing external programs such as curl. I also have switch-to-buffer on a keybinding and it will probably suffice. I doubt there will be many that need the functionality; I was just curious as to why it had gone away. great package by the way, really appreciate your work! |
Thank you! I tried to implement this quickly, but it is not easy to integrate it nicely with the current mechanism I use for narrowing to files, buffers etc. So given that the buffer switching to invisible buffers is pretty rare I am more inclined to keep things as is. |
For reference - here is the experiment https://github.com/minad/consult/tree/narrow-ephemeral. But it is very half-baked and does not integrate nicely with the functionality of |
Ping @clemera - this could be a possible hack to emulate dynamic candidates for consult-grep/consult-rg, basically installing an after-change-functions hook, start with an empty candidate list, after a few keypresses run grep, throw keyboard-quit and restart the completing-read session with run-at-time. Not sure if we want to go that route, it is also a bit like reimplementing parts of @oantolin's action mechanism from Embark. |
Bypassing completions styles seems better to me to get something like this, but maybe we don't need to call the process automatically in background. Having it under control which string to pass to the process and trigger it manually on the user side would also have its benefits, I think. |
@clemera You mean using a different completion style to hide/unhide invisible buffers. Interesting idea. I have no idea though on how this could be implemented. But then the question is why not use a custom completion style for narrowing too? Is it possible to locally change the completion style? But I think I recall either you or @oantolin saying that they prefer not to mess with the completion style. The question if using such a keyboard-quit mechanism is a good idea is orthogonal to the other question - but I am also not convinced that it is a good idea and if we need the dynamism for consult-grep after all. |
I experimented with changing the completion-style locally in this Selectrum issue and it seems that could work but there is still the problem that passing a string to the completion function will often prefilter you candidates based on prefix using |
@tpeacock19 @clemera I implemented support for ephemeral buffers via the predicate, see bba8ac5 |
I believe an earlier version of
consult-buffer
allowed narrowing to ephemeral/uninteresting buffers whose names start with a space.Is there a reason this functionality was taken away? And if I'm mistaken (or confusing it with the function from the selectrum-wiki) can it be included in
consult-buffer
.The text was updated successfully, but these errors were encountered: