8

Since I updated the whole of my emacs third party packages projectile has started to see my home folder (which emacs opens in) as a projectile project.

Screenshot of helm-projectile showing the home folder as projectile project

There is no .projectile file in my home folder, neither is my home folder under version control.

marcus@mri-tp:~ >>> cat ~/.projectile
cat: /home/marcus/.projectile: No such file or directory

My home folder is also not in my projectile-bookmarks.eld:

("~/.emacs.d/" "~/projects/pwb-ss15/" "~/projects/fhw-symmrecog/" "~/fhw/ss15/dbassistenz/" "~/projects/dsa-compendium/" "~/.zprezto/" "~/projects/pwb-ws13/" "~/fhw/ss15/db/" "~/fhw/ss15/ps2_00/" "~/projects/jekyll-school/" "~/projects/webIsoRogue/" "~/projects/spacerace/" "~/projects/marcusriemer.de/")

I am however using projectile together with helm and ecb. To sync the ecb file tree I use the snippet from the emacs wiki: ecb + projectile:

(defvar default-ecb-source-path ())

(add-hook 'ecb-basic-buffer-sync-hook
                (lambda ()
                        (when (functionp 'projectile-get-project-directories)
                        (when (projectile-project-p)
                                (dolist (path-dir (projectile-get-project-directories))
                                (unless (member (list path-dir path-dir) default-ecb-source-path)
                                        (push (list path-dir path-dir) default-ecb-source-path)
                                        (customize-set-variable 'ecb-source-path default-ecb-source-path)
                                        ))))))

As far as I can tell I have not set projectile-require-project-root(nil):

marcus@mri-tp:~/.emacs.d >>> find . -iname "*.el" | xargs grep "projectile-require-project-root"
./elpa/helm-projectile-20150610.253/helm-projectile.el:  (let ((projectile-require-project-root nil))
./elpa/helm-projectile-20150610.253/helm-projectile.el:  (let* ((projectile-require-project-root nil)
./elpa/helm-projectile-20150610.253/helm-projectile.el:                (let ((projectile-require-project-root nil))
./elpa/projectile-20150610.2247/projectile.el:(defcustom projectile-require-project-root t
./elpa/projectile-20150610.2247/projectile.el:        (if projectile-require-project-root
./elpa/projectile-20150610.2247/projectile.el:        (projectile-require-project-root nil))
./elpa/projectile-20150610.2247/projectile.el:  (let ((projectile-require-project-root nil))

Does anyone have an idea why projectile started to index my home directory? And how can I tell it to ignore my home folder once and for all?

Marcus Riemer
  • 539
  • 6
  • 16
  • Do you have projectile-require-project-root set to nil? – Tu Do Jun 12 '15 at 11:07
  • If you want to delete it, you can press TAB to switch to action menu, then narrow to Delete project action. – Tu Do Jun 12 '15 at 11:17
  • I have updated the question, as far as I can tell I do net set projectile-require-project-root myself. Deleting the project didn't help. – Marcus Riemer Jun 12 '15 at 13:18

1 Answers1

9

Okay, this was dumb ... I had an empty Makefile sitting in my home directory. And because Projectile Project Root Files Top Down Recurring tells Projectile to recognize a Makefile as project root my home folder got picked up.

Just in case anybody has a similar problem in the future: If projectile picks up unwanted folders try to disable automatic project detection as a whole and see what happens. You can do that by using M-x customize RET projectile RET and setting Projectile Project Root Files Functions to an empty list. I figured out my problem after doing this and manually deleting the incorrect projectile bookmark.

Marcus Riemer
  • 539
  • 6
  • 16