I generated a .dir-locals.el
by calling the function add-dir-local-variable
, giving it the path for the project for which I want the variable, the variable itself, and its value.
The generated file went to my home directory (not the project path as I expected), and had the following content:
;;; Directory Local Variables
;;; For more information see (info "(emacs) Directory Variables")
(("~/tmp/test_test_dir_local"
(indent-tabs-mode . t)))
Then I went on and created a file a.c
in that directory, and copied .dir-locals.el
there for good measure.
The indent in that file is still set as spaces, as per my ~/.emacs.d/init.el
. I expected it to be tabs, as per the local .dir-locals.el
. I tried restarting emacs, but that did not work either.
What did I do wrong, or misunderstand?
I am on Mac OS Sierra.