emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: executable-set-magic update


From: Eli Zaretskii
Subject: Re: executable-set-magic update
Date: Sat, 10 Jun 2017 10:17:28 +0300

> From: "Andrew L. Moore" <address@hidden>
> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]