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?
foo contains two files:
bar contains one files:
When you're opening a file in directory
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
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)?