emacs-devel
[Top][All Lists]
Advanced

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

Re: master 0ad1c0d: * lisp/net/tramp.el (tramp-handle-make-process): Han


From: Michael Albinus
Subject: Re: master 0ad1c0d: * lisp/net/tramp.el (tramp-handle-make-process): Handle shell commands.
Date: Fri, 18 Dec 2020 16:24:23 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> Hi Michael,

Hi Stefan

>> +    ;; Quote shell command.
>> +    (when (and (= (length command) 3)
>> +               (stringp (nth 0 command))
>> +               (string-match-p "sh$" (nth 0 command))
>> +               (stringp (nth 1 command))
>> +               (string-equal "-c" (nth 1 command))
>> +               (stringp (nth 2 command)))
>> +      (setcar (cddr command) (tramp-shell-quote-argument (nth 2 command))))
>
> This looks odd (what is special about the quoting needs of "sh -c" which
> wouldn't apply to other commands?).  Do you have some bug# or test case
> associated to it so we can better understand why it's needed?

See the thread "Tramp and conversion of \r\n into \n" in
emacs-devel. Martin gave me tons of Tramp traces.

I'm also not so happy with this special handling, and I expect we'll
find a better solution. I'm still working on this.

However, it is at least a proof of concept. People using lsp-mode call
also many other asynchronous processes, and so I'll get lot of traces
from real life examples to compare.

And yes, based on these examples I will also extend tramp-tests.el.

>         Stefan

Best regards, Michael.



reply via email to

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