[OS X Emacs] problem with Local Variables & customisation

Marc Shapiro -- at work marc.shapiro at acm.org
Wed Aug 11 15:14:43 EDT 2010


I'm not sure whether this is the right forum, if not, please excuse me.

Many of my latex files have a "Local Variables" section to set the
associated bibliography search rules.  When Emacs.app reads such a
file, it displays the following message:

    The local variables list in XXXX
    contains values that may not be safe (*).

    Do you want to apply it?  You can type
    y  -- to apply the local variables list.
    n  -- to ignore the local variables list.
    !  -- to apply the local variables list, and permanently mark these
          values (*) as safe (in the future, they will be set automatically.)
      * my-latex-bibfile : "~/YYYY"

I always answer "!", but at the next session, the message comes back
nonetheless.  I notice that the following is automatically appended at
the end of my .emacs:

    (custom-set-variables
      ;; custom-set-variables was added by Custom.
      ;; If you edit it by hand, you could mess it up, so be careful.
      ;; Your init file should contain only one such instance.
      ;; If there is more than one, they won't work right.
     '(safe-local-variable-values (quote ((my-latex-bibfile . "~/YYYY")))))

However this seems to have no effect since the message comes back at the
next session.  (My .emacs is actually a symbolic link to dot-emacs.elc,
but I don't think this is relevant.)

Questions:
 (1) What's wrong?  How can I avoid the message coming back?
 (2) Is there a way to set the safe variables without going through the
     "custom" interface?

                                                        Marc





More information about the MacOSX-Emacs mailing list