helm-M-x not as convenient as M-x

Created on 3 May 2014  路  11Comments  路  Source: emacs-helm/helm

Originally, you can auto-complete the commands by TAB in M-x.
For example, if you hit M-x, and type "list-*-p", and then hit TAB,
it expands to "list-load-path-shadows", which is very handy.

However, since TAB binds by default to helm-select-action,
if I (global-set-key (kbd "M-x") 'helm-M-x),
I do not know how to do auto-completion (more like guessing) in M-x.

Is there any workaround or configuration I missed?

Most helpful comment

helm-M-x is more useful. It's just that you should not use the old way in vanilla Emacs or Ido. Here is my old answer to issue:

You should not rely on common prefix as in other packages like Ido or vanilla Emacs. We should not press TAB to refresh a new candidate list; we get new list every time we modify the input. Instead, use the every part of your desired candidate. For example, in your example, if you want to get "package-install", just type "pac stal" and "package-install" will be the first candidate. If you want "list-packages", just type "pac ^l" and you get "list-packages" (notice I do not follow the order of "list-packages").

Use every thing in your candidate string, not just prefix.

https://github.com/emacs-helm/helm/issues/222#issuecomment-39830792

In short, don't press TAB; find unique pattern in your candidate(s) for completion. In your example, typing "lo sh" gives exactly the candidate you want.

All 11 comments

No. You're completely missing the point of helm -- what's currently in the minibuffer is not important.

Don't look at the minibuffer. Look at the the completion window and what's being highlighted; and when you're happy with that, press <enter>.

In your example type "list path". If you prefer the default mental model of looking at the minibuffer, then don't use helm.

You take me wrong, I do not prefer the default mental model.
The example I gave above is not quite proper.
In fact what I wonder is whether auto completion is supported in helm-M-x.
It does not matter which key to intrigue it.

helm-M-x is more useful. It's just that you should not use the old way in vanilla Emacs or Ido. Here is my old answer to issue:

You should not rely on common prefix as in other packages like Ido or vanilla Emacs. We should not press TAB to refresh a new candidate list; we get new list every time we modify the input. Instead, use the every part of your desired candidate. For example, in your example, if you want to get "package-install", just type "pac stal" and "package-install" will be the first candidate. If you want "list-packages", just type "pac ^l" and you get "list-packages" (notice I do not follow the order of "list-packages").

Use every thing in your candidate string, not just prefix.

https://github.com/emacs-helm/helm/issues/222#issuecomment-39830792

In short, don't press TAB; find unique pattern in your candidate(s) for completion. In your example, typing "lo sh" gives exactly the candidate you want.

Le Wang [email protected] writes:

No. You're completely missing the point of helm -- what's currently in the minibuffer is not important.

Don't look at the minibuffer. Look at the the completion window and what's being highlighted; and when you're happy with that, press .

In your example type "list path". You you prefer the default mental model of looking at the minibuffer, then don't use helm.

We really need a FAQ in the wiki to avoid repeating again and again the
same thing.

Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997

I got the point. Thank you both.

I've added FAQ to the wiki: https://github.com/emacs-helm/helm/wiki#3-emacs-completion-vs-helm

@zwz Do you think this text would have been helpful to resolve this question?

@lewang Yes, it helps!
At my first try, I guessed and typed something to find a command.
The command was in fact listed and selected. But as I was quite new to the coloring (background and foreground), I just missed the selected command, and thought: OMG, I cannot do guessing anymore ...

Anyway, I like helm :)

Ok, closing this, for basic usage of helm please ask on the mailing list.

Actually, the issue is not the usage model but rather a missed use-case that is important nevertheless - When trying to select something in helm that is similar to one of the options but isn't there; With regular tab completion, I could tab complete and then edit the result to my liking. With helm, 90% of the time one of the presented options is exactly what I need However, 10% of the time you need something that is not quite there (e.g. file name similar to an existing file name but with .1 at the end, a bump in the minor version of a git tag in magit, etc). All these valid use cases are not served by helm and that's a shame.

<enter> is not enough, sometimes you need completion of directory paths #1630 , use C-j

C-j describes the command when in helm-M-x mode

Was this page helpful?
0 / 5 - 0 ratings