emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Add shell-quasiquote.


From: Eli Zaretskii
Subject: Re: [PATCH] Add shell-quasiquote.
Date: Wed, 21 Oct 2015 20:32:51 +0300

> From: Random832 <address@hidden>
> Date: Wed, 21 Oct 2015 13:06:46 -0400
> 
> Eli Zaretskii <address@hidden> writes:
> >> From: Random832 <address@hidden>
> >> It doesn't have a documented way for the caller to insist that the
> >> string be quoted for a POSIX shell rather than the user's shell.
> >
> > On what OS would that distinction be important, and why?
> 
> Any OS which may have both a POSIX shell that a script may want to
> execute and a non-POSIX shell that is the user's shell. So basically all
> of them, especially if support for more non-POSIX shells such as csh,
> rc, scsh, fish, tclsh, is added in the future - or if a user's
> configuration supports them in the present by replacing or advising the
> function.

First, do csh and the rest really non-Posix?  I wonder.  I always
understood "Posix shells" as a short for "any shell on a Posix host".
Is that incorrect?  In what way are those "non-Posix"?

Next, I could see why users on a Posix host might want to execute some
commands with a particular non-default shell.  I don't see why Emacs
packages, perhaps with a sole exception of Tramp, would need that.

On MS-Windows, using a Posix shell needs to customize variables like
explicit-shell-file-name, and Emacs detects that automatically.

> It would mainly be useful in the presence of a broader mechanism, which
> doesn't exist yet, for executing POSIX shell scripts regardless of the
> user's interactive shell.

On Posix hosts?  I thought that was automatic, since each script says
what interpreter should run it in its "shebang" line.  Right?

On MS-Windows, we would need to write code that parses the shebang
line, and then looks for an appropriate interpreter, probably on
PATH.  But that'd be a w32-only feature.



reply via email to

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