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").

Filter by
Sorted by
Tagged with
11
votes
2answers
2k views

Key bindings specific to a buffer

Is it possible to set key bindings specific to buffer? I have the following in one of my org files: # Local Variables: # eval: (local-set-key (kbd "<f10>") 'some-custom-defun-specific-to-this-...
9
votes
1answer
165 views

How comment out a variable line in a local variable list

In a python file I have # Local Variables: # python-shell-interpreter: "python3" # python-shell-virtualenv-path: "~/.virtualenvs/datascience" # leo-python-args-to-send: "-f fqanalysis.txt" # End: ...
12
votes
3answers
970 views

Prevent org-mode from swallowing file-local variables

It is sometimes convenient to define file local variables with comments such as the following, which must be at the end of a file. # Local Variables: # fill-column: 80 # End: However, in org-mode ...
0
votes
1answer
192 views

How to save speck-mode dictionary with file?

What I tried, putting at the end of a file: Local IspellDict: de As local variable: speck-dictionary: de However, neither is interpreted. When I open the file in question, speck-mode always uses en ...
2
votes
1answer
203 views

Mode local variables

I frequently use file-local variables, but after writing some minor modes I find the need to implement mode-based behavior. Let's say I want to define a variable errors-list-regexp that varies ...