From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Can we expand the valid location of "Local Variables" ? Date: Tue, 10 Mar 2020 22:01:27 -0400 Message-ID: References: <87r1y0apzm.fsf@secretsauce.net> <87mu8nbwr7.fsf@dima.secretsauce.net> Mime-Version: 1.0 Content-Type: text/x-markdown; coding=UTF-8 Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="37424"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Dima Kogan Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Mar 11 03:02:07 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 1jBqhD-0009do-GJ for ged-emacs-devel@m.gmane-mx.org; Wed, 11 Mar 2020 03:02:07 +0100 Original-Received: from localhost ([::1]:42640 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jBqhC-0004fU-JH for ged-emacs-devel@m.gmane-mx.org; Tue, 10 Mar 2020 22:02:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57698) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jBqgf-0004GE-UG for emacs-devel@gnu.org; Tue, 10 Mar 2020 22:01:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jBqge-0000zA-43 for emacs-devel@gnu.org; Tue, 10 Mar 2020 22:01:33 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:54985) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jBqgd-0000xp-Tz for emacs-devel@gnu.org; Tue, 10 Mar 2020 22:01:32 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 0913281A0D; Tue, 10 Mar 2020 22:01:31 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 222F781592; Tue, 10 Mar 2020 22:01:29 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1583892089; bh=mc9yP/Q+hzhjX2gQGyFQsUT/Zf0GtgthWg7iZtjn27U=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=BOSWZ4HzF2t58kxYQybkksQpZlaQpMlENRfNUlkBgE6iiCyd4OMJY3N87dAsuIXxr ZkRFwYdpi0Tr4Sw96nE6R7I9dEsJ4TPtX5Mxp5nJHQXgJPB3AGT5wyoxxBiic5GdDw uIF9463yEA3vF5/N/QXZKAsd+mgOgEVwytZ0gXh6rgHkS8ZduvhkvPXVKMQN+88Ohi nA25OjhScqeHc1SBJV1g0RWvJ+wK8Kw6Hh+fCD3qD0e2Bya0PuvdreHtMoYaa8o8GU dyUb4F2eQmmsq5g/eMUqdhhpsU96+fSX5ZpPsfbJOHerGwZ/jHSf93I0Oz151ShRsn 8SQWRmz9ZQ9Yw== Original-Received: from pastel (unknown [216.154.50.221]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id D469512029A; Tue, 10 Mar 2020 22:01:28 -0400 (EDT) In-Reply-To: <87mu8nbwr7.fsf@dima.secretsauce.net> (Dima Kogan's message of "Tue, 10 Mar 2020 16:44:44 -0700") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 132.204.25.50 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:245465 Archived-At: > OK. I can write such a patch. Is there an upside to not documenting it? > If we REALLY don't want people touching this variable, then why not > leave the hardcoded 3000? I said "variable" just because we don't have constants, but really the way I see it, it should be a constant: if you put your variables further than that, it won't work with an Emacs that hasn't been customized accordingly. > Oof. I COULD do that, but that feels like it makes an already-ugly thing > even uglier. I sent a separate email to the org mailing list about maybe > upstreaming some of the advices, but the general idea doesn't seem > unreasonable to me: we already allow a block to define some custom > variables, so customizing the behavior of some functions doesn't seem > crazy. Putting a large amount of code this way is a major problem security-wise. If you're the only one looking at this file and it's code you wrote, then there's no problem security-wise, but then again you could just put that code in your ~/.emacs instead. If it's not your own code or if you share this file with others, then it's a security hassle and you'd be better off moving that code to some package on which your file will depend. Stefan