emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Add shell-quasiquote.


From: David Kastrup
Subject: Re: [PATCH] Add shell-quasiquote.
Date: Wed, 21 Oct 2015 18:37:16 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Eli Zaretskii <address@hidden> writes:

> From: Random832 <address@hidden>

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

I don't think package authors as a rule _ever_ bother a lot about what
kind of shell might run their commands.  Most external utilities and
Free Software programs of some relevance, including but not restricted
to GNU utilities, are available on a wide variety of both UNIX-like and
unalike systems.

More often than not shell-quote-argument will be used _exactly_ in order
to save the package author from having to bother about the actual shell
in question.  The best way to do that would be a quoting strategy that
works on all systems, the next best autodetection, possibly with some
optionable aid when the system in question is not necessary the local
one (I think we had some expedient for executing helper commands like
decompressors remotely but currently can't find anything.  At any rate,
specifying a local cwd for expanding a shell argument suitable for
execution in the target location or let-binding default-directory
suitably around the call of shell-quote-argument might be appropriate,
though the latter, not being expected behavior for shell-quote-argument
currently, might be problematic).

At any rate, I'm afraid that providing _separate_ shell-quote-argument
functions will encourage people to create programs that stop working
when tramping/communicating/ftping/whatever to a system of different
kind.

-- 
David Kastrup



reply via email to

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