Questions tagged [file-local-variables]

File local variables are set automatically from -*-specifications-*- or "Local Variables:" specifications when visiting a buffer. These specifications are included in the file itself and therefore only affect this file (hence "file local variables").

5 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3
votes
0answers
436 views

How to mark risky variable as safe?

I have some customization in my .dir-locals.el. Some of variables set there are unsafe and when I set them and visit some file in dir for the first time Emacs nicely asks me to save their name-value ...
3
votes
0answers
893 views

How to set the Ispell language via a file variable in Org-Mode?

I put the following in the beginning of the Org file: * :noexport: Local Variables: ispell-local-dictionary: "american" End: #+EXPORT_EXCLUDE_TAGS: noexport And I start flyspell via a hook: (add-...
2
votes
0answers
384 views

.dir-locals.el isn't recognized

I am working on a project that includes some configuration in .dir-locals.el: ((c++-mode . ((compile-command . "cd ../../\; ./build.sh")))) This gets picked up just fine for me and sets the ...
1
vote
0answers
27 views

Specify fallback possibilities for file-local variables?

It is clear from the manual how to set file variables: -*- mode: modename; var: value; … -*- For example, at the top of my ~/.gitconfig file, I have # -*- mode: conf; -*- I recently discovered ...
0
votes
0answers
22 views

Setting reftex-section-levels as a file-local variable

I'm trying to set reftex-section-levels as a file-local variable on a few files I have, since they use non-standard sectioning commands. If I start emacs and open one such file, such as this ...