helm-find-files : How to create a file whose name is a prefix of existing file

Created on 30 Mar 2015  路  3Comments  路  Source: emacs-helm/helm

Hi .

I have Ctrl-f bound to "helm-find-files".
I have a buffer open with name like "fooSpec.js".
I want to create buffer named "foo.js" in the same folder.

What I would expect to be able to do is :

  • Ctrl-f (open helm-find-files)
  • Type "foo.js"
  • Type "Enter"
  • Since the file does not exist, confirm that I want to create a new file
  • End up in a new buffer

What happens :

  • Ctrl-F
  • Type "foo.js"
  • Type "Enter"
  • End up in the buffer for "fooSpec", since what I type is a pattern that matches the buffer name.

Is there a way to work around this ?

Thanks

question

Most helpful comment

Is that fooSpec.js in the same directory? If so, Helm will prioritize the first match; but you can create a new file if you want. In this case, when you type foo.js, at the top line there is a candidate like this: [?] foo.js. Move the highlighter to that line and press RET, and you will have a brand new buffer created.

All 3 comments

Is that fooSpec.js in the same directory? If so, Helm will prioritize the first match; but you can create a new file if you want. In this case, when you type foo.js, at the top line there is a candidate like this: [?] foo.js. Move the highlighter to that line and press RET, and you will have a brand new buffer created.

Pierre-Henri Trivier [email protected] writes:

Is there a way to work around this ?

You have to understand that with helm, what you have in minibuffer is
not what you will get.

See:
https://github.com/emacs-helm/helm/wiki#helmiscompletionwindowcentric

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

That did it. Thanks.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ChoppinBlockParty picture ChoppinBlockParty  路  6Comments

taquangtrung picture taquangtrung  路  5Comments

edwintorok picture edwintorok  路  5Comments

rsuhada picture rsuhada  路  3Comments

steckerhalter picture steckerhalter  路  7Comments