From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: executable-set-magic update Date: Sat, 10 Jun 2017 10:17:28 +0300 Message-ID: <83ink471mf.fsf@gnu.org> References: Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1497079122 4218 195.159.176.226 (10 Jun 2017 07:18:42 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 10 Jun 2017 07:18:42 +0000 (UTC) Cc: emacs-devel@gnu.org To: "Andrew L. Moore" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jun 10 09:18:38 2017 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 1dJafO-0000uc-CE for ged-emacs-devel@m.gmane.org; Sat, 10 Jun 2017 09:18:38 +0200 Original-Received: from localhost ([::1]:57495 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dJafT-0005zA-JJ for ged-emacs-devel@m.gmane.org; Sat, 10 Jun 2017 03:18:43 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47392) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dJaea-0005qY-9x for emacs-devel@gnu.org; Sat, 10 Jun 2017 03:17:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dJaeX-0007hZ-5A for emacs-devel@gnu.org; Sat, 10 Jun 2017 03:17:48 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:42870) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dJaeX-0007hT-1Y; Sat, 10 Jun 2017 03:17:45 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4097 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dJaeW-0000En-4l; Sat, 10 Jun 2017 03:17:44 -0400 In-reply-to: (slewsys@gmail.com) 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:215550 Archived-At: > From: "Andrew L. Moore" > Date: Fri, 9 Jun 2017 17:31:30 -0400 > > lisp/progmodes/executable.el does not appear to support magic numbers of the form `#/usr/bin/env interpreter’. One way to extend support is via the attached diff which merely adds a new variable `executable-interpreter-path-absolute’. Set the new variable to nil and variable `executable-prefix’ to “#!/usr/bin/env “. Thanks. Wouldn't it be more elegant (and perhaps also safer, security-wise) if we supported the special prefix "/usr/bin/env" directly, i.e. without feeding it via some kind of "back door", and allowing arbitrary strings there? If your proposal is accepted, I think at least its documentation parts should be improved: > +(defcustom executable-interpreter-path-absolute t > + "If non-nil, `executable-set-magic' uses the interpreter's > +absolute path. Otherwise, it's basename is used." This doc string leaves out the important stuff: the reason why the variable is introduced and how it should be used. I think the doc string should be more helpful by explicitly describing its intended usage. > + :version "26.0" Emacs never releases N.0 versions, so this should be "26.1". > @@ -220,6 +226,9 @@ executable-set-magic > (and argument (string< "" argument) " ") > argument)) The doc string of executable-set-magic should mention the variable you introduce. Finally, there should be a NEWS entry about this new facility.