[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 19:19:19 +0300 |
> From: Random832 <address@hidden>
> Date: Wed, 21 Oct 2015 10:18:49 -0400
>
> Eli Zaretskii <address@hidden> writes:
> >> From: Random832 <address@hidden>
> >> Strictly speaking, Emacs doesn't *have* an API for "quote for POSIX
> >> shells"
> >
> > Of course it does: it's called "shell-quote-argument". It does
> > support Posix shells.
>
> 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?
> In particular, the (undocumented) mechanism that Tramp uses to get
> this behavior will obviously break in the presence of (as
> recommended by the documentation) an advised or completely
> overridden version of the function put in place by a user who has an
> unusual shell.
Maybe we should mention this subtlety with Tramp in the documentation
(I presume you mean the ELisp manual, because the doc string doesn't
mention overriding the function).
> Maybe what needs to be done is to have separate functions
> shell-quote-argument-msdos, shell-quote-argument-nt,
> shell-quote-argument-posix, and then have shell-quote-argument call
> those based on the user's shell.
I don't think anyone asked for exposing these internals. I also have
trouble imagining situations when a user on a non-Posix platform would
need to call these functions directly: most users on those platforms
aren't even aware we go through cmdproxy, and only futz with with
their shell when they want the Cygwin Bash to be it, a situation Emacs
detects automatically.
But I won't object to this suggestion, if someone sends patches. I'd
be interested to hear from others, though.
- Re: Maintainers and contributors, (continued)
- Re: Maintainers and contributors, Jay Belanger, 2015/10/22
- Re: [PATCH] Add shell-quasiquote., Random832, 2015/10/20
- Re: [PATCH] Add shell-quasiquote., David Kastrup, 2015/10/21
- Re: [PATCH] Add shell-quasiquote., Eli Zaretskii, 2015/10/21
- Re: [PATCH] Add shell-quasiquote., Random832, 2015/10/21
- Re: [PATCH] Add shell-quasiquote., Michael Albinus, 2015/10/21
- Re: [PATCH] Add shell-quasiquote.,
Eli Zaretskii <=
- Re: [PATCH] Add shell-quasiquote., David Kastrup, 2015/10/21
- Re: [PATCH] Add shell-quasiquote., Eli Zaretskii, 2015/10/22
- Re: [PATCH] Add shell-quasiquote., Random832, 2015/10/21
- Re: [PATCH] Add shell-quasiquote., Eli Zaretskii, 2015/10/21
- Re: [PATCH] Add shell-quasiquote., Stephen J. Turnbull, 2015/10/21
- Re: [PATCH] Add shell-quasiquote., David Kastrup, 2015/10/21
- Re: [PATCH] Add shell-quasiquote., Steinar Bang, 2015/10/26
- Re: [PATCH] Add shell-quasiquote., Wolfgang Jenkner, 2015/10/21
- Re: [PATCH] Add shell-quasiquote., Eli Zaretskii, 2015/10/21
- Re: [PATCH] Add shell-quasiquote., Wolfgang Jenkner, 2015/10/21