When hitting C-j in the minibuffer while executing helm-find-files and no match is possible, helm creates a new buffer with the name of the completion. E.g. I do M-x helm-find-files, type foo there is only the default match:

helm with default match

Now I hi C-j and a new buffer gets created, named foo. How can I disable this behavior?


I don't know why you hit C-j on no match in the first place. C-j is used for previewing the content of a file and there is no needs to preview a non-exist file. But to kill the buffer, simply hit C-j again, for example,

C-x C-f non-existent-filename C-j C-j

the first C-j opens a buffer named non-existent-filename and the second kills it. I learnt this by reading the documentation. To read the documentation of helm-find-files, open a helm-find-files session then hit C-h m (this is shown in the mode line), or M-x helm-documentation.

  • I hit it often because of a mistake. E.g. when I mistype for an existing filename: fop C-j instead of foo C-j; the main problem is that when this new buffer gets created projectile creates a new cache entry for this and I get them when doing a helm-projectile-find-file.
    – ckruse
    Mar 16 '17 at 8:56
  • I see though I don't use helm-projectile., thanks for the explanation.
    – xuchunyang
    Mar 16 '17 at 12:09
  • helm-projectile should no longer find file with persistent action, only preview it. Apr 17 '17 at 18:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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