2

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)?

  • Did you already see reddit.com/r/emacs/comments/6ogkp3/…? That is just a wild guess. I don't use helm. – Tobias Nov 8 '18 at 5:30
  • Hi Tobias, I looked into that Reddit thread you have linked. But I found no solution/related reply to my issue, but thanks for your contribution anyway! :). – ReneFroger Nov 9 '18 at 21:05
  • helm-for-files is a different command then helm-find-files. Are you sure you are not calling the former when you mean to be calling the the later? – Prgrm.celeritas Nov 9 '18 at 22:22
  • @Prgm.celeritas I'm using helm-find-files, and not using helm-for-files. You might mean the setting helm-find-files-preferred-list based on that Reddit comment? It made no any difference in my case, unfortunately. – ReneFroger Nov 17 '18 at 18:35
0

I had this same problem a while ago.

Whenever files or candidate items don't appear right (in this case bar.txt) away I noticed that searching for bar.txt in the helm buffer would make it appear.

Try this.

(setq helm-candidate-number-limit 10000)
  • It didn't worked in my case. It makes no difference it seems. Have you tried it with the steps to reproduce this problem, without this setting and with this setting? – ReneFroger Nov 17 '18 at 18:27
  • Without providing your entire emacs setting this is impossible to diagnose to a single misconfigured setting. – Zypps987 Nov 23 '18 at 16:03

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.