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
Add custom command to embark-consult-search-map #663
Comments
Sorry, what? |
Sorry, weird clipboard bug. I will answer coherently soon. |
I wrote an answer in Emacs to paste here, but occasionally clipboard-sharing between the Linux vm in which Emacs runs and the main OS just stops working. So instead of getting that highly relevant answer you got some gobbledygook about the thing I was writing about before this issue. |
While the Linux VM restarts let me just say that Consult async search commands are tricky to use as Embark actions, which is why there is an entire, nontrivial embark-consult package to set up the integration. The particular problem of nothing seeming to happen is because Embark is pressing RET for you immediately. |
OK, here's the configuration you need: (setf (alist-get 'mu-consult-ugrep embark-target-injection-hooks)
'(embark-consult--prep-async embark--allow-edit))
(setf (alist-get 'mu-consult-ugrep embark-pre-action-hooks)
'(embark--unmark-target))
(setf (alist-get 'mu-consult-ugrep embark-around-action-hooks)
'(embark-consult--projectless embark--cd)) In particular, the |
Check out the docstring of those functions used as hooks to see what each does, and feel free to ask me any questions. |
Fantastic, thank you for the quick reply and all the pointers. |
I must confess I didn't immediately remember the reasons I added all those hooks for consult async search commands. Rereading the code, the thing I didn't remember is that you can use |
To be honest, I bound |
Hi,
first of all thanks for Embark, such an awesome package. I have recently wrote a custom command,
mu-consult-ugrep
[1], which I'd like to add toembark-consult-search-map
. I tried this:However, when I hit
C-.
(embark-act
) on a symbol and then hitC u
nothing happens. There is no message in the minibuffer, no error, and I cannot act on that symbol any more.I sure am missing something basic here, but I can't figure it out. :)
[1] https://manueluberti.eu/2023/09/16/consult-ugrep.html
The text was updated successfully, but these errors were encountered: