enable-remote-dir-locals is a variable defined in ‘files.el’.
Its value is nil
You can customize this variable.
This variable was introduced, or its default value was changed, in
version 24.3 of Emacs.
Probably introduced at or before Emacs version 24.3.
Non-nil means dir-local variables will be applied to remote files.
n.b. I believe ...
Not as such (AFAIK).
However, both those modes derive from prog-mode which might be fine to target for this directory.
((prog-mode . ((comment-start . "/* ")
(comment-end . " */")
(comment-padding . 0))))
Or you could even use nil, which applies to every mode (again, maybe that's ok in practice).
((nil . ((comment-start . "/*...
You're lucky that the files for the different languages are segregated by directory like that.
You can define directory-local values for variable auto-mode-alist.
See the Elisp manual, node Directory Local Variables.
As the intro text of that node says:
This is useful when the files in the directory belong to some “project” and
therefore share the same ...
Is it expected that dir-local variables are applied only after major-mode hooks are run?
Yes. The local variables are normally processed in run-mode-hooks, after running the mode hooks and before running after-change-major-mode-hook.
You could use the latter to deal with your problem. Alternatively you can use hack-local-variables-hook which runs after ...
Did you save the .dir-locals.el file? Are you loading these files via TRAMP? By default, Emacs doesn't look for the .dir-locals.el file when loading files via TRAMP, as it might add significant delays. If this is the problem, you can set enable-remote-dir-locals to t to opt in.
I tried instead of setting a hook, just eval the variable with the python-mode association and seems to work fine, here is the code:
((python-mode . ((eval .
(setq-local realgud:pdb-command-name (concat
"envs/default/bin/python -m pdb"))))))
Local variables are set after hooks are run. Try using a timer:
(let ((buf (current-buffer)))
(run-with-timer 0.01 nil
(if (bound-and-true-p projectile-project-name)