unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Steve Youngs <steve@sxemacs.org>
To: Richard Stallman <rms@gnu.org>
Cc: dima@secretsauce.net, emacs-devel@gnu.org
Subject: Re: Can we expand the valid location of "Local Variables" ?
Date: Sun, 15 Mar 2020 16:41:45 +1000	[thread overview]
Message-ID: <microsoft-free.87r1xup1au.fsf@steveyoungs.com> (raw)
In-Reply-To: <E1jDJdp-0003tT-44@fencepost.gnu.org> (Richard Stallman's message of "Sat, 14 Mar 2020 23:08:41 -0400")

[-- Attachment #1: Type: text/plain, Size: 1501 bytes --]

Richard Stallman <rms@gnu.org> 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!          |
|------------------------------------<steve@sxemacs.org>---|

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 824 bytes --]

  reply	other threads:[~2020-03-15  6:41 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-10 20:56 Can we expand the valid location of "Local Variables" ? Dima Kogan
2020-03-10 21:39 ` Stefan Monnier
2020-03-10 23:44   ` Dima Kogan
2020-03-11  2:01     ` Stefan Monnier
2020-03-22 23:08   ` Dima Kogan
2020-03-23  8:25     ` Robert Pluim
2020-03-23 14:17       ` Eli Zaretskii
2020-03-23 15:28         ` Robert Pluim
2020-03-23 15:54           ` Eli Zaretskii
2020-03-23 17:03             ` Dima Kogan
2020-03-23 17:24             ` Stefan Monnier
2020-03-24  2:20           ` Richard Stallman
2020-03-12  2:26 ` Richard Stallman
2020-03-14  5:54   ` Steve Youngs
2020-03-14  7:07     ` Stefan Monnier
2020-03-15  3:08     ` Richard Stallman
2020-03-15  6:41       ` Steve Youngs [this message]
2020-03-16  3:36         ` Richard Stallman
2020-03-23 15:56 ` Yuri Khan
2020-03-23 16:55   ` Dima Kogan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=microsoft-free.87r1xup1au.fsf@steveyoungs.com \
    --to=steve@sxemacs.org \
    --cc=dima@secretsauce.net \
    --cc=emacs-devel@gnu.org \
    --cc=rms@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).