From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Newsgroups: gmane.emacs.help Subject: Re: ;; Local variables: (was: =?utf-8?Q?Re?= =?utf-8?Q?=3A_The_function_=E2=80=98cl-set-difference?= =?utf-8?B?4oCZ?= might not be defined at runtime) Date: Wed, 15 Apr 2020 19:25:54 +0200 Message-ID: <20200415172554.GC5222@tuxteam.de> References: <874ktl3oxb.fsf@disroot.org> <87v9m19a63.fsf@gmail.com> <871rop3mj0.fsf@disroot.org> <87r1wp95u3.fsf@gmail.com> <87y2qx237b.fsf@disroot.org> <87tv1l8iz6.fsf@ebih.ebihd> <20200415070046.GA17630@tuxteam.de> <87zhbcfz8k.fsf_-_@ebih.ebihd> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="vOmOzSkFvhd7u8Ms" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="122539"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mutt/1.5.21 (2010-09-15) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Apr 15 19:26:29 2020 Return-path: Envelope-to: geh-help-gnu-emacs@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 1jOlnw-000VlK-7f for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 15 Apr 2020 19:26:28 +0200 Original-Received: from localhost ([::1]:53038 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jOlnv-0004iI-9z for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 15 Apr 2020 13:26:27 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43417) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jOlnX-0004hS-Mq for help-gnu-emacs@gnu.org; Wed, 15 Apr 2020 13:26:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jOlnW-0007Hm-EM for help-gnu-emacs@gnu.org; Wed, 15 Apr 2020 13:26:03 -0400 Original-Received: from mail.tuxteam.de ([5.199.139.25]:45750) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jOlnW-0007AK-6X for help-gnu-emacs@gnu.org; Wed, 15 Apr 2020 13:26:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tuxteam.de; s=mail; h=From:In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:To:Date; bh=zFC/vXmwb4mqPQhIOnrDpUKbX06Qvy9egBoefzBnwnA=; b=ORQGlPAVI+bjXdfpwAAon7ZgFABRaDMy4WPyCa4eb5L9uH25yIkT5rEVjlS3buKlsKrHuTsY5DAcSVryHm8HX5C+mlyXwlszHJsNFVSbVjDAcvqtEP2xeAAkEXkjcd7F/B9w6PSfpaEhUOr7PMyO7Sj+UMzrYuhZdorT3hXs83IcnXzF2RffIU6eBwzgOzYVeXzIUr+vSn4Uybn8WrXrApdot1xt4R1XQ8+ku8mvkIYVbB1L3ZTQ842/vtq09s3ZT0xFSd5T6CMm1pLsL/uuKCQSqsnWorjf1fV1BZ0yIRM7d7TK+6Ejs2eGY6oicNQUy7x5EAJIII7Qc9fHIXLt9Q==; Original-Received: from tomas by mail.tuxteam.de with local (Exim 4.80) (envelope-from ) id 1jOlnO-00039U-QD for help-gnu-emacs@gnu.org; Wed, 15 Apr 2020 19:25:54 +0200 Content-Disposition: inline In-Reply-To: <87zhbcfz8k.fsf_-_@ebih.ebihd> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 5.199.139.25 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:122834 Archived-At: --vOmOzSkFvhd7u8Ms Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Apr 15, 2020 at 07:14:03PM +0200, Emanuel Berg via Users list for t= he GNU Emacs text editor wrote: > tomas wrote: >=20 > >> [...] what does this mean? > >>=20 > >> ;; Local variables: > >> ;; byte-compile-dynamic: t > >> ;; End: > > > > Quoth "describe-variable" (aka C-h v): [...] > Yes, but I meant the comment/variable syntax, which > I haven't see before. In the particular variable's > docstring, they mention >=20 > -*- byte-compile-dynamic: t -*- >=20 > so how does that differ from >=20 > ;; Local variables: > ;; byte-compile-dynamic: t > ;; End: The one goes to the beginning of the file, the other to the end. Otherwise, they are just alternative ways to express the same thing. The "-*- ... -*-" form has limitations whenever the first line of the file is needed for other things (e.g. the #! in shell scripts. When you've got many file variables, the end form is arguably a bit more readable. See "File Variables" in the manual [1] > As for the syntax, I tried with this and then did > `emacs-lisp-mode', what happened was it popped up > a warning telling me the values were possibly unsafe - > what does that mean? >=20 > ;; Local variables: > ;; local-test-var: t > ;; End: File variables can do Bad Things (remember Word macro viruses?). Code is potentially executed when you load the file. So there's a limited set of file variables considered "safe" (to which you can add) -- beyond that you are warned (unless you switch that off). Just imagine I (evil mastermind) send you a text file with some bad stuff hidden in file variables... See [2]. Cheers [1] https://www.gnu.org/software/emacs/manual/html_node/emacs/Specifying-Fi= le-Variables.html#Specifying-File-Variables [2] https://www.gnu.org/software/emacs/manual/html_node/emacs/Safe-File-Var= iables.html#Safe-File-Variables -- t --vOmOzSkFvhd7u8Ms Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAl6XQ6IACgkQBcgs9XrR2kZfugCfSqWHYGSt+Cd2YM1mhZt+OyX2 o3sAnixgqTsE2njZofCOzZ79AgFB562M =UwKu -----END PGP SIGNATURE----- --vOmOzSkFvhd7u8Ms--