Reputation: 943
In a particular org-mode file, I do not want tags to be inherited. I thought putting -*- org-use-tag-inheritance: nil
for the first line would do the trick, but that doesn't seem to be working. Short of manually executing a setq
statement, how can I make this happen?
Upvotes: 29
Views: 16034
Reputation: 73274
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.
If you have edited the file-local (or indeed directory-local) variables list since visiting the file, you can M-x revert-buffer
to acquire the updated values in that buffer. (Simply saving the changes does not affect the buffer-local values; the file must be re-visited.)
Upvotes: 36
Reputation: 555
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:
Upvotes: 18
Reputation: 5198
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.
Upvotes: 14