profile
viewpoint

Ask questionsCan I include a command in a keymap, that does not pass an argument?

I would like an at-point embark menu, where one of the commands is listed, but when chosen runs without argument.

Specifically, I need this:

(org-cite-insert)

... and not this:

(org-cite-insert '("one" "two"))

Is that possible?

oantolin/embark

Answer questions oantolin

Does the function prompt you for anything at the minibuffer? If so, when used as an action, Embark inserts the target at the first minibuffer prompt and simulates pressing RET afterwards. It doesn't matter if the thing prompted for is not an argument to the function: if the command opens a minibuffer at least once, the first time it does so, the target gets injected. If you want to avoid this injection you need to ignore the target somehow: either with a wrapper or with a pre-action hook (which already existed before this change @minad mentioned, but got easier to use now).

useful!

Related questions

No questions were found.
source:https://uonfu.com/
Github User Rank List