emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Add shell-quasiquote.


From: Random832
Subject: Re: [PATCH] Add shell-quasiquote.
Date: Wed, 21 Oct 2015 14:49:43 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Eli Zaretskii <address@hidden> writes:
> First, do csh and the rest really non-Posix?

As far as I know, all of the ones I named have _some_ quirk in the
quoting mechanism that makes it not work. See my earlier messages about
newline mishandling for how csh fails. More broadly, a sh script and a
csh script are obviously in two completely different languages, and see
below.

Doing anything interesting (where "interesting" is defined as almost
anything that you shouldn't be using call-process for anyway) with a
shell command requires knowing what kind of shell it is, which is why I
am somewhat sympathetic to Taylan's "only support POSIX" position.

> 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"?

POSIX defines an entire shell command language, which is a subset of
[most of] ksh88. Bash, among others, supports a superset of this
language [many of its additional features, incidentally, are shared with
ksh93] and has a --posix mode to support it more precisely (documented
at http://tiswww.case.edu/php/chet/bash/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?

I meant a script as a string, not a file. Maybe call it a command, but
I'm specifically referring to things more complicated than a single
utility and a list of arguments (which should use call-process).




reply via email to

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