I should I have been more explicit sorry: I meant "is it possible for ivy to provide a new function that would ease adding new actions to a command?". If I understand your last sentence properly, does it mean you don't expect users to add actions to existing commands such as swiper or counsel-find-file?
you don't expect users to add actions to existing commands such as swiper or counsel-find-file
I do, but the idea is for the user to first copy the default ivy-set-actions for a particular command from counsel.el and then customize it. This way, if you mess them up (I do it often when e.g. testing code for issues) you can reset all of them to your preferred state with a single key in a single place.
But if you really want to PR with ivy-add-actions, I don't mind. Just don't forget to delete-dups.
I've added the new function. But it's a real pain to use, at least for me. The major problem is that if you add a bad action, there's no easy way to remove it. So I'd need to have this code around in *scratch*, so that I can reset if I mess up:
(ivy-add-actions t '(("f" (lambda (x) (message"foobar")) "foobar")))
One advantage of ivy-set-actions is that it automatically resets when I mess up.
I would like, from my
init.el, to add an action to
ivyonly proposes to set actions, which replaces the existing actions I want to keep.
The text was updated successfully, but these errors were encountered: