'Tianxiang Xiong' via emacs-helm <
emacs...@googlegroups.com> writes:
> The syntax-quote solution doesn't work b/c sometimes the variables are not used directly, but by functions calling functions. The second seems to work,
> thanks.
>
> Just so I understand fully, can you explain in some detail what's
> going on here? I thinkthe problem is that the Helm source is built
> using a buffer which, unless explicitly specified w/
> `with-helm-current-buffer`, is not in the project, and therefore
> doesn't get the dir-local variable values? Is there a reason that the
> current buffer is not used by default?
Well helm is computing candidates from its buffer (helm-buffer) so if
the function in charge of computing candidates use a local variable
from another buffer, you have to specify the computation happens in this
buffer by making this buffer current (use with-current-buffer).
If you build the source in your local buffer, you can use a quoted
lambda to hard code the value of local variable in your function.
It is why I provided the two options in previous posts.
--
Thierry