Amelio Vazquez-Reina
Amelio Vazquez-Reina

Reputation: 96360

Tab in Emacs-helm (anything) does not autocomplete with current best match

While trying to autocomplete a file (e.g. to open a file with C-x C-f) Emacs-helm shows a list of possible candidates.

If I then press Tab (which I would hope it would help me choose the first/closest match), I get the following in the minibuffer:

   enter image description here

It looks like the minibuffer gets confused with escape characters, and it does not choose the file that I actually want to open (the top choice).

Upvotes: 9

Views: 3213

Answers (1)

event_jr
event_jr

Reputation: 17707

Helm requires this conceptual jump from the default Emacs completion, which is not so obvious:

You don't need to press a key to complete. The completion buffer refreshes with new results after every input.

This is called "incremental" completion.

The normal tab functionality is not needed in "incremental" completion. So tab was rebound to helm-select-action, which allows you to choose an alternative action with the selection. But there is only one action in read-file-name.

The error you're seeing could be clearer though, I've filed this issue on github.

Additionally, note Helm treats each space separated term as a filtering regular expression. So, pressing space foo will filter the current list down to those that contain foo in the name.

Upvotes: 10

Related Questions