Setting a local file variable in Emacs org-mode

I prefer the setting in-buffer lisp variables at the file end, like this:

* Local variables
# local variables:
# org-attach-directory: "./data"
# org-id-method: uuid
# end:

A further alternative is a section Local Variables with the :noexport: tag at the end of the orgmode file:

* Local Variables :noexport:
Local Variables:
org-use-tag-inheritance: nil
End:

The advantage of this method is that the local variables are not part of the last regular section of the orgmode document but are logically separated from the rest of the document by a special section.


You're missing a trailing -*- in the header comment.

Try this:

# -*- org-use-tag-inheritance: nil; -*-

n.b. It's easy to check whether local variables were actually set the way you expected -- just use C-h v VAR for the VAR in question, and Emacs tells you if it has a buffer-local value.

Tags:

Emacs

Org Mode