Comments (9)
@tpeacock19 @clemera I implemented support for ephemeral buffers via the predicate, see bba8ac5
from consult.
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:
- Just use switch-to-buffer if you want to switch to an hidden buffer, I do that almost never, so this is what I am using. Do you often switch to invisible buffers?
- Use dynamic candidates as soon as that becomes a possibility (not yet possible, since selectrum misses support for dynamic candidates in its completing-read implementation). But this would also introduce a bit of additional complexity, so I am not sure if we want that.
- Always show invisible buffers (Not a good idea, I guess)
- Add some additional keybindings to consult-buffer which starts a new switch-buffer session etc. Basically hack around not having dynamic candidate lists available. I have an idea on how to implement this quickly. Maybe I try that.
What do you think?
from consult.
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!
from consult.
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.
from consult.
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 consult--read
, the consult wrapper around completing-read
.
from consult.
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.
from consult.
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.
from consult.
@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.
from consult.
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 all-completions
, I plan to experiment to override all-completions
so it passes the empty string when it gets passed the string for the completion, maybe that could work well enough.
from consult.
Related Issues (20)
- Transform yanks before listing/previewing in consult-yank HOT 1
- Consult previews don't have any font highlighting
- consult-grep family integrates badly with literally-visited files
- consult--each-line not unquoted `end` symbol
- Sorting when buffer switching
- consult-buffer only showing the active buffer HOT 4
- Usage of :history in consult--read?
- consult-xref broken in emacs 30 HOT 1
- Disable consult buffer preview for remote buffers
- Support project.el external roots
- consult-rg wiki advice
- [request] allow `:lookup` in `consult--multi` sources
- Handling buffer renames while switching buffers
- Decorating consult-imenu-multi output with the origin
- Add support to display the matched heading's sub-headings also as candidates in the consult-outline's completion HOT 3
- NetBSD/OpenBSD: find(1) does not support -iwholename
- `which-function-mode` not honored with `consult-line` together with `consult-preview-at-point-mode` (in `completion-list-mode`)
- Need a recipe for annotating `consult-line` ( `consult-grep` etc) with `which-function`
- Is there a way to remember the last search and Change the result layout?
- Possible to grep in other window
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from consult.