How to set local buffer variable from Eval: to .dir-local.el?

Why does it work

((nil . ((compilation-directory . "/home/vava/code_directory/")
         (compilation-command . "rake"))
))

and is it not?

((nil . ((Eval . (setq compilation-directory "/home/vava/code_directory"))
         (compilation-command . "rake"))
))

What am I doing wrong here?

I installed enable-local-evalin .emacs.

+3
source share
2 answers

Emacs Lisp is case sensitive: try the lowercase "eval":

((nil . ((eval . (setq compilation-directory "/home/vava/code_directory"))
         (compilation-command . "rake"))))

Also, the file name for local directory variables is -.dir-locals.el, not .dir-local.el, as in the title of the question.

+7
source

, , "eval" , - ; , , , , . , .

-3

Source: https://habr.com/ru/post/1745442/


All Articles