I use the packages Helm and helm-projectile for navigating in Emacs. I ran into problems, when I use projectile-helm inside Helm, and I'm able to reproduce this with a empty Emacs init file. The configuration to reproduce this:
;; Get MELPA
(add-to-list 'package-archives
'("melpa-stable" . "http://melpa-stable.milkbox.net/packages/") t)
;; Add Use-package to the list
(setq package-list
'(use-package))
;; Install use-package
; activate all the packages
(package-initialize)
(use-package projectile
:ensure t
:diminish projectile-mode
:config
(projectile-global-mode)
(use-package helm-projectile
:ensure t
:config
(projectile-global-mode)
(helm-projectile-on))
(use-package helm
:ensure t
:commands helm-for-files
:diminish helm-mode
:config
(helm-mode 1)
(setq helm-for-files-preferred-list '(helm-source-recentf
helm-source-projectile-files-list
helm-source-projectile-recentf-list))
What will the problem be?
The directory foo
contains two files:
foo.txt
and .git
.
The directory bar
contains one files:
bar.txt
.
When you're opening a file in directory foo
:
foo/foo.txt
Then call M-x helm-find-files
, the Helm window will show up, because it's a project file (because of the .git init file, so it can find files), so the source projectile-files-list
will deliver the files.
But when you opening bar.txt
in directory bar
, then call M-x helm-find-files
, it will not show up because it's probably still waiting on input from
helm-source-projectile-files-list
, in buffers *warnings*
, or in buffer errors I can't find anything. I understand where this problem might come, but how could I tell Emacs, to not use helm-source-projectile-files-list
when the buffer is currently not in a project (.git)?
helm-for-files
is a different command thenhelm-find-files
. Are you sure you are not calling the former when you mean to be calling the the later?helm-find-files
, and not usinghelm-for-files
. You might mean the settinghelm-find-files-preferred-list
based on that Reddit comment? It made no any difference in my case, unfortunately.