unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Andrew L. Moore" <slewsys@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: executable-set-magic update
Date: Sat, 10 Jun 2017 10:17:28 +0300	[thread overview]
Message-ID: <83ink471mf.fsf@gnu.org> (raw)
In-Reply-To: <AB65B7E3-CCF6-405B-B46A-26B269132CAF@gmail.com> (slewsys@gmail.com)

> From: "Andrew L. Moore" <slewsys@gmail.com>
> 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.



  reply	other threads:[~2017-06-10  7:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-09 21:31 executable-set-magic update Andrew L. Moore
2017-06-10  7:17 ` Eli Zaretskii [this message]
2017-06-10 19:31   ` Andrew L. Moore
2017-07-22  7:36     ` Eli Zaretskii
2017-06-10 12:26 ` Stefan Monnier
  -- strict thread matches above, loose matches on Subject: below --
2017-07-24 18:22 Andrew L. Moore
2017-07-24 22:41 ` Andrew L. Moore

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83ink471mf.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=slewsys@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).