emacsorg-mode

Setting a local file variable in Emacs org-mode


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?


Solution

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