From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Steve Youngs Newsgroups: gmane.emacs.devel Subject: Re: Can we expand the valid location of "Local Variables" ? Date: Sun, 15 Mar 2020 16:41:45 +1000 Organization: The SXEmacs Project Message-ID: References: <87r1y0apzm.fsf@secretsauce.net> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="20748"; mail-complaints-to="usenet@ciao.gmane.io" Keywords: file,variables,include,filename User-Agent: Gnus/5.130014 (Ma Gnus v0.14) SXEmacs/22.1.16 (Hillman Hunter, linux) Cc: dima@secretsauce.net, emacs-devel@gnu.org To: Richard Stallman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Mar 15 07:43:15 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jDMzT-0005IV-10 for ged-emacs-devel@m.gmane-mx.org; Sun, 15 Mar 2020 07:43:15 +0100 Original-Received: from localhost ([::1]:51474 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jDMzR-0004Ay-Ut for ged-emacs-devel@m.gmane-mx.org; Sun, 15 Mar 2020 02:43:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59906) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jDMyP-0003fE-63 for emacs-devel@gnu.org; Sun, 15 Mar 2020 02:42:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jDMyN-0003zt-Q9 for emacs-devel@gnu.org; Sun, 15 Mar 2020 02:42:08 -0400 Original-Received: from hfcrelay.icp-osb-irony-out7.external.iinet.net.au ([203.59.1.87]:54961) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jDMyM-0002wr-2w; Sun, 15 Mar 2020 02:42:06 -0400 X-SMTP-MATCH: 0 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2DgBgBPzW1e/1vRRD1mHAEBAQEBBwE?= =?us-ascii?q?BEQEEBAEBgXuDaiASKo0YhgUBAYIQESWbCwkBAQEBAQEBAQEDMQECBAEBhEM?= =?us-ascii?q?CgkE4EwIQAQEBBQEBAQEBBQMBbYUKWIVkAQQBLCojEAsOOBRJE4MnglsfBq0?= =?us-ascii?q?6HokNgS4QE4ElgVOKdYIAgydQLj6KOgSNdaFSdoJGfJYSeZpKqluCFSKBWDM?= =?us-ascii?q?aCCgIgydQGA2OKAEBFo43LwMwgQYBAZAQAQE?= X-IPAS-Result: =?us-ascii?q?A2DgBgBPzW1e/1vRRD1mHAEBAQEBBwEBEQEEBAEBgXuDa?= =?us-ascii?q?iASKo0YhgUBAYIQESWbCwkBAQEBAQEBAQEDMQECBAEBhEMCgkE4EwIQAQEBB?= =?us-ascii?q?QEBAQEBBQMBbYUKWIVkAQQBLCojEAsOOBRJE4MnglsfBq06HokNgS4QE4Elg?= =?us-ascii?q?VOKdYIAgydQLj6KOgSNdaFSdoJGfJYSeZpKqluCFSKBWDMaCCgIgydQGA2OK?= =?us-ascii?q?AEBFo43LwMwgQYBAZAQAQE?= X-IronPort-AV: E=Sophos;i="5.70,555,1574092800"; d="asc'?scan'208";a="244805028" Original-Received: from 61-68-209-91.tpgi.com.au (HELO bastard.steveyoungs.com) ([61.68.209.91]) by icp-osb-irony-out7.iinet.net.au with ESMTP; 15 Mar 2020 14:41:56 +0800 Original-Received: from bastard.steveyoungs.com (localhost [127.0.0.1]) by bastard.steveyoungs.com (8.15.2/8.15.2) with ESMTP id 02F6fk4w003347; Sun, 15 Mar 2020 16:41:47 +1000 Original-Received: (from steve@localhost) by bastard.steveyoungs.com (8.15.2/8.15.2/Submit) id 02F6fjRR003346; Sun, 15 Mar 2020 16:41:45 +1000 X-Authentication-Warning: bastard.steveyoungs.com: steve set sender to steve@sxemacs.org using -f X-Face: #O)>9erkUv7RJ~0G~5_6lEMz\HC2&~&kV2bsu4TWHI_v~<8Hj%KBBj1[*\uKF*dxbEzwAli ; tSuN`c)F,}p|7{6lA~e.P+7Qo\A%q"lJ7/UtUX@yEZ!X"Tph(3O8`nhPJF>hI4_GOvb%X{+e*Mi_| ^yTf#aTwGG,(3e41?C9B7Pak*'A$+$/hV Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAElBMVEWTiYMXFxXS0dPn7O1H RELExb+Gty+iAAACTUlEQVQ4jU2UQZPbIAyFZS/cTYe9ZyHcW7u9w1a+E4L+/1/pE7bTMJ5MzIf0 4EmY4rZtQX+2OJ5r0ADt/8w65TeAcYF7cR8niIgI4YqZlv6JpQDr9g5WZ2u+Uq2pvTL9BCi6iLD0 Hfx2md3zBKHyfEn88kSlKWhhDZXmK+TrBTAv1dpwnu7h+QTIlCrvF+iF+QRrSELtBKspvpT5BSTE CzjP5fsETUTNasMpV7zPz6GBAGkI0d2vyOQ5Yzm1JrVWsKARt4LtkqEZQKCNefxBVmIs17GReCl4 YZP73CkbOkAEqLl6ykJ15zvzmCbTAPouZHaRlJe7JjJ4eABr2Owmt2n+cssApRwRUPis1B7z3Tki JuOcgrpUQ0vNMtnucHD2+JmPXRmCdwdw2TA7BVKJKlWLs0jHuaEB8E3Nub0y225Y5OEnpMqMd6Qy S88mG2ssIiafmTiLAvKTxb7mDuDUdnYZJmrERBZecFPgPcRzC9BgO1nLBvHSi/Fq1x4TNQ/NDPcs vO9cFo/YPf7Rc0j1bM2MghmD84zgRkFaQv8kFHEAFce+vrWvsDQlLZidinpSigI0uhZdRiWn4kdE hiV6aVDwgLqKAKgIqjJAGmAbwEGkoCrtHSTboaFjoUDxBZCr8wF+oF+CKoveghXbrgf4u8ESo12h LapL0gGeiGioE1nZDhCHiMcFRwNaoY8wQLvFx9DeNFVA9z7HFYA5sY9UTQCOjhzi4RanAcRGpFIN ve0BIBz7JYnqVRgXCgcMwR7Aayq1qo3PAL40t3KC+A+DncdTD7tOLgAAAABJRU5ErkJggg== X-URL: X-Request-PGP: X-OpenPGP-Fingerprint: FC82 BA78 3923 D6B5 038A BCA7 9FDF E046 F574 5911 X-Now-Playing: I'm Bored --- [Iggy Pop] X-Git-WebSite-Repo: X-Git-Repo: X-Discordian-Date: Prickle-Prickle, the 1st day of Discord, 3186. X-Attribution: SY In-Reply-To: (Richard Stallman's message of "Sat, 14 Mar 2020 23:08:41 -0400") X-Scanned-By: MIMEDefang 2.74 on 192.168.1.10 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 203.59.1.87 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:245521 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Richard Stallman 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". :-) =2D-=20 |-------------| | SXEmacs - The only _______ you'll ever need. | | Fill in the blank, yes, it's THAT good! | |---------------------------------------| --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.2.10 (GNU/Linux) Comment: Stephen R Youngs Comment: The SXEmacs Project Comment: SYcom Comment: the Reading Lamp Comment: SY Writing iQEzBAEBAgAdFiEE/IK6eDkj1rUDirynn9/gRvV0WREFAl5tzikACgkQn9/gRvV0 WREQXQf/VwdsSt/n4Q3YbGFc71GGdFpyfK6P3YRO4EN0X5/GpfsSDAT95BfOhtcV dJCDJhVfnNfrfYMq3jWk1ZDGHPUG3WX9fHqv7mwm8mVxa6Dq3UzPZD4Z9Qa3muFN TObuNN8C1AnbLIyU4gwBPlu/oVao4tYe2E4zg1aOSU0wdbOxgZu5imWqWFNrxFJm PVMgNUh+WGpUsq3rvE9VidOuVim8Sg6QKnBw4Gd4duAfDgCmZ4+UTMjNTVRkotDJ A6FJyj/WH7bQ95pR2obnYkWD3/6+3H+rXn5SKZGOB5Zxm+QxIjavV5nUXHGpxNSO qbrTvc0KuKlvN94xAUQwpIgtGqZvuw== =2g62 -----END PGP SIGNATURE----- --=-=-=--