Subject: Re: bug#34130: Specifying File Variables: mention why can't specify "current file"

From: 積丹尼 Dan Jacobson <[email-masked]>
Date: Wed, 02 Oct 2019 03:44:37 +0800

>>>>> "LI" == Lars Ingebrigtsen <[email-masked]> writes:
LI> Eli Zaretskii <[email-masked]> writes:

>>> On (info "(emacs) Specifying File Variables")
>>> at
>>> 
>>> # Local Variables:
>>> # compile-command: "cc foo.c -Dfoo=bar -Dhack=whatever \
>>> #   -Dmumble=blaah"
>>> # End:
>>> 
>>> do also mention why there is absolutely no way to say "<<<current file>>>",
>>> $$$${current_file} etc. if one wanted to, instead of needing to hardwire
>>> the filename (foo.c) of the file (foo.c) into the file (foo.c) itself! Thanks.
>> 
>> Is something wrong with using buffer-file-name?  You could create
>> compile-command by using 'eval', which can accept Emacs functions.

LI> Indeed, so I don't think there's anything here to be fixed.  Closing.

eval needs to be whitelisted as a safe local variable, creating a security hole.