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?

idbrii
  • 293
  • 1
  • 10
  • 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](http://tuhdo.github.io/helm-intro.html) may improve your workflow. – Tu Do May 11 '15 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 May 11 '15 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 May 12 '15 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 May 12 '15 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 May 13 '15 at 15:27
  • @TuDo, sorry for bringing back an old question, I've installed `helm-descbinds` but I don't see the tip `C-z: helm-descbinds-action:describe (keeping session)` at the top of the `Helm` session buffer, and pressing `Tab` does nothing (I've switched `Tab` and `C-z` as per your guide). `helm-descbinds` also seems to apply some sort of theme over my `Emacs`, with weird colorings and borders around buffer, is there a way to turn it off? – MLister Dec 05 '15 at 07:04
  • @MLister `helm-desbinds` only helps you to discover the commands that are bound to a prefix keys i.e. if you already activated `helm-descbinds-mode`, when you want to know which commands use the prefix `C-x r`, then simply press `C-x r C-h` and a Helm window showing all commands and associate key bindings appears. As for `C-h f`, you simply have to do nothing. Just press `C-h f` when `helm-mode` already activated, you can start searching for function. Pressing `TAB` (if you switched) shows a short function description in the modeline. – Tu Do Dec 06 '15 at 10:02

1 Answers1

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.

idbrii
  • 293
  • 1
  • 10