Prefix argument for custom helm source actions

10 views
Skip to first unread message

fi nurr

unread,
Jul 19, 2016, 5:13:07 AM7/19/16
to emacs-helm
Hello there,

I am thinking about implementing a custom helm source.
The use case I have in mind would require that I can pass
a prefix argument similar to the way that helm-M-x would
allow me to do.

So the workflow could be:
1.) run M-x function, which starts completion for my custom helm source
2.) select a candidate
3.) hit tab to activate the activation selection
4.) navigate to the desired action
5.) hit C-u C-u RET so the double prefix arg is passed to the action

Could someone steer me in the right direction on how to
implement this?

Thanks in advance!

/fi

Thierry Volpiatto

unread,
Jul 19, 2016, 6:17:40 AM7/19/16
to emacs...@googlegroups.com

fi nurr <fi.n...@gmail.com> writes:


> 5.) hit C-u C-u RET so the double prefix arg is passed to the action

Use helm-current-prefix-arg in your action function to catch the prefix args.

--
Thierry

fi nurr

unread,
Jul 19, 2016, 6:29:09 AM7/19/16
to emacs-helm


Works like a charm. Thanks for the quick reply, Thierry!

/fi
Reply all
Reply to author
Forward
0 new messages