[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>---|
signature.asc
Description: PGP signature
- Re: Can we expand the valid location of "Local Variables" ?, (continued)
- Re: Can we expand the valid location of "Local Variables" ?, Eli Zaretskii, 2020/03/23
- Re: Can we expand the valid location of "Local Variables" ?, Robert Pluim, 2020/03/23
- Re: Can we expand the valid location of "Local Variables" ?, Eli Zaretskii, 2020/03/23
- Re: Can we expand the valid location of "Local Variables" ?, Dima Kogan, 2020/03/23
- Re: Can we expand the valid location of "Local Variables" ?, Stefan Monnier, 2020/03/23
- Re: Can we expand the valid location of "Local Variables" ?, Richard Stallman, 2020/03/23
Re: Can we expand the valid location of "Local Variables" ?, Richard Stallman, 2020/03/11
Re: Can we expand the valid location of "Local Variables" ?, Yuri Khan, 2020/03/23