3

I use helm-M-x and helm-descbinds to show functions and keybindings I can execute. I would like to be able to see the help for a function without having to ESC, C-h f, retype function. (Like this answer for smex).

Defining a key as part of helm-map (even after emacs has loaded) doesn't work for me:

(define-key helm-map (kbd "C-u") 'describe-function)

I get this:

helm: Error: Trying to run helm within a running helm session

(Running describe-function from M-x opens helm.)

This helm intro says:

If helm-mode is activated... C-h f, which runs describe-function, automatically takes the symbol at point as default for searching function.

Does that mean C-h f should work in the helm minibuffer? Or is it referring to other functionality?

How can I invoke other commands on the helm results?

(I use spacemacs on Emacs 24, but I don't think that matters?

7
  • 2
    Press C-z (the default key binding for executing persistent action) and Helm opens a help buffer for you. You don't have to bind anything. But better swap tab and C-z. My helm guide may improve your workflow.
    – Tu Do
    Commented May 11, 2015 at 13:27
  • 1
    C-h f is meant to run separatedly. If you want to invoke other commands on Helm results, press Tab to switch to action menu (or C-z if you follow my guide and swapped the keys).
    – Tu Do
    Commented May 11, 2015 at 14:06
  • So by default, Tab shows a list of actions and C-z executes a persistent action. But a persistent action is not one of those actions. How would I know which persistent action I'll run (buffer-dependent)? Or is it always help?
    – idbrii
    Commented May 12, 2015 at 15:38
  • A persistent action is an action that won't close your current Helm action. An action does. A persistent action of each command depends on the author to decide and not always showing help. For example, in helm-find-files or helm-mini, it opens and show you file/buffer for previewing rather than opening help. Some command don't have persistent action and simply does nothing.
    – Tu Do
    Commented May 12, 2015 at 16:06
  • I see, at the top of the window it shows the persistent action that will run (in this case, describe function).
    – idbrii
    Commented May 13, 2015 at 15:27

1 Answer 1

3

Somehow I missed that at the top of the helm window it says:

C-z: helm-descbinds-action:describe (keeping session)

That (I think) is the persistent action that will be executed by C-z. So both commands will show help for the selected function.

The other examples, I could use helm-add-action-to-source to add new actions to them menu when you press TAB. Example.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.