emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can we expand the valid location of "Local Variables" ?


From: Steve Youngs
Subject: Re: Can we expand the valid location of "Local Variables" ?
Date: Sun, 15 Mar 2020 16:41:45 +1000
User-agent: Gnus/5.130014 (Ma Gnus v0.14) SXEmacs/22.1.16 (Hillman Hunter, linux)

Richard Stallman <address@hidden> writes:

  >> How about some form of "include" mechanism:

  >> Local Variables:
  >> @include: FILENAME
  >> End:

  > Specifying another file has a serious problem: you can't be sure
  > which file will get included.

It'd be no more problematic than any other facility that supports including
sub-files, for example texinfo.  And, if you think about it, the same
could be said for #'require or #'load in elisp where doing something
malicious would only need the right #'provide form and getting to the
head of the load-path.

In my pseudo-example above, if it were real world, obviously FILENAME is
replaced with a path to a, hopefully, existent file.

Wait, here's another idea from the crazy-dept.  Use a hash, like a md5
or sha1 or some such of the file to be included.  Before the inclusion,
check the hash, error out if there's a mismatch.

        Local variables:
        @include-hash: f31785c629584f30116ff45aa681fa5318613fd9
        @include: FILENAME
        End:

  > Better to refer to something above in the file.

I'm not a huge fan of file-local variables or special "cookies" or
whatnot at the best of times, so I'm not going to say what would be
"better". :-)

-- 
|---<Steve Youngs>-------<GnuPG KeyID: 9FDFE046F5745911>---|
|       SXEmacs - The only _______ you'll ever need.       |
|         Fill in the blank, yes, it's THAT good!          |
|------------------------------------<address@hidden>---|

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]