From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Glenn Morris Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] scratch/allow-custom-load-paths-in-elisp-flymake 4ef9711: Allow custom load paths in elisp's byte-compilation Flymake Date: Wed, 05 Dec 2018 15:00:00 -0500 Message-ID: References: <20181204233600.7907.75252@vcs0.savannah.gnu.org> <20181204233601.273DD209DC@vcs0.savannah.gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1544039965 1066 195.159.176.226 (5 Dec 2018 19:59:25 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 5 Dec 2018 19:59:25 +0000 (UTC) User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) Cc: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Dec 05 20:59:21 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gUdKL-0000AA-9N for ged-emacs-devel@m.gmane.org; Wed, 05 Dec 2018 20:59:21 +0100 Original-Received: from localhost ([::1]:36524 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gUdMR-00027n-Ur for ged-emacs-devel@m.gmane.org; Wed, 05 Dec 2018 15:01:31 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36770) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gUdL7-0001cx-9v for emacs-devel@gnu.org; Wed, 05 Dec 2018 15:00:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gUdL6-0000sq-HI for emacs-devel@gnu.org; Wed, 05 Dec 2018 15:00:09 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:33301) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gUdKy-0000nH-SR; Wed, 05 Dec 2018 15:00:00 -0500 Original-Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1gUdKy-0001qw-MM; Wed, 05 Dec 2018 15:00:00 -0500 X-Spook: Iran CISU Putin Saudi Arabia nitrate NORAD ICE Brownout X-Ran: DQKf2Uhv|KRMe}WIc.jQST8A%i*vr}oOd,)^P,Ko=;P6MD>MXm*8r8km"*YKSKFL?ZRP0@ X-Hue: magenta X-Attribution: GM In-Reply-To: (Stefan Monnier's message of "Tue, 04 Dec 2018 23:34:48 -0500") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:231650 Archived-At: >> +(put 'elisp-flymake-byte-compile-load-path 'safe-local-variable >> + (lambda (x) (and (listp x) (catch 'tag >> + (dolist (path x t) (unless (stringp path) >> + (throw 'tag nil))))))) AFAICS the above tests whether the value is valid, not whether it is safe. This should probably be a risky-local-variable, like load-path is. The default "." seems actively dangerous, in much the same way as having "." in a shell's PATH is.