unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: master 2ec8f28: Introduce defcustom 'executable-prefix-env'
       [not found] ` <20170722073453.C375420329@vcs0.savannah.gnu.org>
@ 2017-07-24 15:58   ` Glenn Morris
  2017-07-24 16:24     ` Eli Zaretskii
  2017-07-24 16:38     ` Glenn Morris
  0 siblings, 2 replies; 7+ messages in thread
From: Glenn Morris @ 2017-07-24 15:58 UTC (permalink / raw)
  To: emacs-devel; +Cc: Andrew L. Moore


> branch: master
> commit 2ec8f28c59902ee1b533f9042c08f782422c2d86
> Author: Andrew L. Moore <slewsys@gmail.com>
> Commit: Eli Zaretskii <eliz@gnu.org>
>
>     Introduce defcustom 'executable-prefix-env'
[...]
>  (defcustom executable-prefix "#!"
> -  "Interpreter magic number prefix inserted when there was no magic number."
> -  :version "24.3"                       ; "#! " -> "#!"
> +  "Interpreter magic number prefix inserted when there was no magic number.
> +Use of `executable-prefix-env' is preferable to this option."
> +  :version "26.1"                       ; deprecated
>    :type 'string
>    :group 'executable)

I don't think I've seen a :version bump used for "not new and no change
in default, but deprecated". Normally such things are instead marked
obsolete.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: master 2ec8f28: Introduce defcustom 'executable-prefix-env'
  2017-07-24 15:58   ` master 2ec8f28: Introduce defcustom 'executable-prefix-env' Glenn Morris
@ 2017-07-24 16:24     ` Eli Zaretskii
  2017-07-26 16:47       ` Glenn Morris
  2017-07-24 16:38     ` Glenn Morris
  1 sibling, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2017-07-24 16:24 UTC (permalink / raw)
  To: Glenn Morris; +Cc: slewsys, emacs-devel

> From: Glenn Morris <rgm@gnu.org>
> Date: Mon, 24 Jul 2017 11:58:43 -0400
> Cc: "Andrew L. Moore" <slewsys@gmail.com>
> 
> 
> >  (defcustom executable-prefix "#!"
> > -  "Interpreter magic number prefix inserted when there was no magic number."
> > -  :version "24.3"                       ; "#! " -> "#!"
> > +  "Interpreter magic number prefix inserted when there was no magic number.
> > +Use of `executable-prefix-env' is preferable to this option."
> > +  :version "26.1"                       ; deprecated
> >    :type 'string
> >    :group 'executable)
> 
> I don't think I've seen a :version bump used for "not new and no change
> in default, but deprecated".

But do you see anything wrong with doing that?  I didn't, so I left it
as submitted by the author.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: master 2ec8f28: Introduce defcustom 'executable-prefix-env'
  2017-07-24 15:58   ` master 2ec8f28: Introduce defcustom 'executable-prefix-env' Glenn Morris
  2017-07-24 16:24     ` Eli Zaretskii
@ 2017-07-24 16:38     ` Glenn Morris
  2017-07-24 16:57       ` Eli Zaretskii
  2017-07-24 18:57       ` Andrew L. Moore
  1 sibling, 2 replies; 7+ messages in thread
From: Glenn Morris @ 2017-07-24 16:38 UTC (permalink / raw)
  To: emacs-devel; +Cc: Andrew L. Moore


PS personally I don't see what was wrong with

(setq executable-prefix "#!/usr/bin/env ")'

http://lists.gnu.org/archive/html/emacs-devel/2017-06/msg00170.html

mentions safety concerns, but you always could, and still can, set it to
"#!/bin/rm " if you are so inclined. It's not even marked risky. But I
guess that would be pointless, since if someone could add a nasty
file-local setting, they could just directly add the #! line as well;
don't run scripts untrusted people can edit.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: master 2ec8f28: Introduce defcustom 'executable-prefix-env'
  2017-07-24 16:38     ` Glenn Morris
@ 2017-07-24 16:57       ` Eli Zaretskii
  2017-07-24 18:57       ` Andrew L. Moore
  1 sibling, 0 replies; 7+ messages in thread
From: Eli Zaretskii @ 2017-07-24 16:57 UTC (permalink / raw)
  To: Glenn Morris; +Cc: slewsys, emacs-devel

> From: Glenn Morris <rgm@gnu.org>
> Date: Mon, 24 Jul 2017 12:38:19 -0400
> Cc: "Andrew L. Moore" <slewsys@gmail.com>
> 
> 
> PS personally I don't see what was wrong with
> 
> (setq executable-prefix "#!/usr/bin/env ")'
> 
> http://lists.gnu.org/archive/html/emacs-devel/2017-06/msg00170.html
> 
> mentions safety concerns, but you always could, and still can, set it to
> "#!/bin/rm " if you are so inclined. It's not even marked risky. But I
> guess that would be pointless, since if someone could add a nasty
> file-local setting, they could just directly add the #! line as well;
> don't run scripts untrusted people can edit.

Thanks for the feedback.  I actually left the patch sitting tight for
more than a month, hoping to have comments, before I pushed it...



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: master 2ec8f28: Introduce defcustom 'executable-prefix-env'
  2017-07-24 16:38     ` Glenn Morris
  2017-07-24 16:57       ` Eli Zaretskii
@ 2017-07-24 18:57       ` Andrew L. Moore
  1 sibling, 0 replies; 7+ messages in thread
From: Andrew L. Moore @ 2017-07-24 18:57 UTC (permalink / raw)
  To: Glenn Morris; +Cc: emacs-devel


> On Jul 24, 2017, at 12:38 PM, Glenn Morris <rgm@gnu.org> wrote:
> 
> 
> PS personally I don't see what was wrong with
> 
> (setq executable-prefix "#!/usr/bin/env ")'
> 
> http://lists.gnu.org/archive/html/emacs-devel/2017-06/msg00170.html

Glenn,
If you're referring to the patch in it's original form, yes it’s more general,
but I agree with Eli that it’s pretty opaque.

Regarding “deprecation" of the variable `executable-prefix', there’s an argument
for not removing it:  the path of env (i.e., “/usr/bin/env”) is not universal.  On those
systems, the variable `executable-prefix’ would be a fallback.  And indeed, the
updated patch is written so that if the variable `executable-prefix’ is anything other
than “#!” or “#!/usr/bin/env”,  then it takes precedences over the value of
`executable-prefix-env’.

Okay, that explanation may be approaching opaque too, but if so, then let it be
another argument for simplicity over generality :)
-AM

> mentions safety concerns, but you always could, and still can, set it to
> "#!/bin/rm " if you are so inclined. It's not even marked risky. But I
> guess that would be pointless, since if someone could add a nasty
> file-local setting, they could just directly add the #! line as well;
> don't run scripts untrusted people can edit.




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: master 2ec8f28: Introduce defcustom 'executable-prefix-env'
  2017-07-24 16:24     ` Eli Zaretskii
@ 2017-07-26 16:47       ` Glenn Morris
  2017-07-26 18:55         ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Glenn Morris @ 2017-07-26 16:47 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: slewsys, emacs-devel

Eli Zaretskii wrote:

>> I don't think I've seen a :version bump used for "not new and no change
>> in default, but deprecated".
>
> But do you see anything wrong with doing that?  I didn't, so I left it
> as submitted by the author.

It's not part of the documented meaning for :version ("This keyword
specifies that the item was first introduced in Emacs version VERSION,
or that its default value was changed in that version").

There's a standard method for deprecating options, to mark them
obsolete; so yes, I think using :version for that is wrong.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: master 2ec8f28: Introduce defcustom 'executable-prefix-env'
  2017-07-26 16:47       ` Glenn Morris
@ 2017-07-26 18:55         ` Eli Zaretskii
  0 siblings, 0 replies; 7+ messages in thread
From: Eli Zaretskii @ 2017-07-26 18:55 UTC (permalink / raw)
  To: Glenn Morris; +Cc: slewsys, emacs-devel

> From: Glenn Morris <rgm@gnu.org>
> Cc: emacs-devel@gnu.org,  slewsys@gmail.com
> Date: Wed, 26 Jul 2017 12:47:53 -0400
> 
> > But do you see anything wrong with doing that?  I didn't, so I left it
> > as submitted by the author.
> 
> It's not part of the documented meaning for :version ("This keyword
> specifies that the item was first introduced in Emacs version VERSION,
> or that its default value was changed in that version").

Yes, it's not the "usual" meaning, but it sounded close enough to me.

> There's a standard method for deprecating options, to mark them
> obsolete; so yes, I think using :version for that is wrong.

I don't think we should deprecate it in the normal sense of that word.



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-07-26 18:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20170722073452.31002.6998@vcs0.savannah.gnu.org>
     [not found] ` <20170722073453.C375420329@vcs0.savannah.gnu.org>
2017-07-24 15:58   ` master 2ec8f28: Introduce defcustom 'executable-prefix-env' Glenn Morris
2017-07-24 16:24     ` Eli Zaretskii
2017-07-26 16:47       ` Glenn Morris
2017-07-26 18:55         ` Eli Zaretskii
2017-07-24 16:38     ` Glenn Morris
2017-07-24 16:57       ` Eli Zaretskii
2017-07-24 18:57       ` Andrew L. Moore

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).