bbatsov / helm-projectile

Helm UI for Projectile
327 stars 71 forks source link

.dir-locals.el variables are ignored #83

Closed dvzubarev closed 6 years ago

dvzubarev commented 7 years ago

I should use .dir-locals.el file for storing local project settings, according to doc. These settings do not work with helm-projectile.

Steps to reproduce the problem

  1. Create temp project: mkdir /tmp/tmp_proj && cd /tmp/tmp_proj && touch .projectile MyBinaryFile echo '((nil . ((projectile-globally-ignored-files . ("MyBinaryFile")))))' > .dir-locals.el
  2. Then open /tmp/tmp_proj/.projectile in emacs
  3. M-x helm-projectile-find-file

Expected behavior

There is no MyBinaryFile in candidates.

Actual behavior

MyBinaryFile is on the candidates list. projectile-find-file works as expected. I printed some information within projectile-current-project-files function and noticed that the current buffer has changed in commit. At commit: (current-buffer) - .projectile (problem is not reproducible), at commit: (current-buffer) - *helm projectile* (problem is reproducible).

Environment & version information

xiongtx commented 6 years ago

The problem is that, when supplying a closure to :candidates in helm-build-sync-source, the closure doesn't get the dir-local value.

I'll have to discuss how best to resolve this w/ @thierryvolpiatto.