reddit / emacs

embark live updating search results

Unlucky_Business1099 · 2022-08-08 21:28
How do I use embark-live on the exported results of a vertico grep search? I would like to collect/export the results of the search (acting as a snapshot of my search state), and I would also like the embark export buffer to update. E.g. if I select a search result and change it so it no longer matches the search, it should no longer show in the buffer. ​ Each time I've tried to use embark-act -> embark-live; the focus stays in the vertico search. I've fumbled and tried a few things to dismiss the search and work with the embark-live buffer but can't seem to figure that out. ​ Any tips for what I'm doing wrong? (Does embark support this workflow?)
karthink · 2022-08-08 23:37
> E.g. if I select a search result and change it so it no longer matches the search, it should no longer show in the buffer. I don't think Embark supports this, except in this indirect way: - Produce a Collect buffer with `embark-collect`. - Take an action that modifies the candidate list in some way. - Call `revert-buffer` (bound to `g` by default). This will prompt you to rerun the command that generated the collect buffer, from where you can run `embark-collect` again to get an updated buffer. `embark-live` is intended as one component of a completion UI.
Unlucky_Business1099 · 2022-08-15 17:01
u/karthink thanks for the potential workaround! going to see if I can maybe write some elisp to automatically rerun the command that generated the collect buffer every N seconds, (and then maybe I could move that to a hook)