From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.devel Subject: Re: master 0ad1c0d: * lisp/net/tramp.el (tramp-handle-make-process): Handle shell commands. Date: Fri, 18 Dec 2020 16:24:23 +0100 Message-ID: <87czz787dk.fsf@gmx.de> References: <20201218123338.4927.85373@vcs0.savannah.gnu.org> <20201218123339.A90E820B72@vcs0.savannah.gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8157"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Dec 18 16:40:12 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kqHrX-0001zj-SX for ged-emacs-devel@m.gmane-mx.org; Fri, 18 Dec 2020 16:40:11 +0100 Original-Received: from localhost ([::1]:58356 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kqHrW-0000e4-RZ for ged-emacs-devel@m.gmane-mx.org; Fri, 18 Dec 2020 10:40:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56880) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kqHcN-000804-GN for emacs-devel@gnu.org; Fri, 18 Dec 2020 10:24:31 -0500 Original-Received: from mout.gmx.net ([212.227.15.19]:39301) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kqHcL-0000qH-FI for emacs-devel@gnu.org; Fri, 18 Dec 2020 10:24:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1608305064; bh=dplLj+IBYb0+rx+dIaOCOEe7AVwTZTlGofVBVrHqz2o=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=PGGWvOccIPtYeaBx0fESLMXXX/8iw91WHB8dp8+g3wUE7Df+mYLPDN3XFJWnUSUrX bXmch28tRrWedFzKribdUGmV+bcXglcsvD/j4dznfX1KEFt7pFSCz1zLJ9ck0EqT/G RrrZhdTqcc7F+ZdTBuMJMlqtGiRlxdF3xFS8u39Q= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from gandalf.gmx.de ([212.86.38.187]) by mail.gmx.com (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MJE2D-1kXEWp17wh-00Kks2; Fri, 18 Dec 2020 16:24:24 +0100 In-Reply-To: (Stefan Monnier's message of "Fri, 18 Dec 2020 10:15:19 -0500") X-Provags-ID: V03:K1:E1L/G8NqsJz4+ZUAk2PseSxxEghDcdYfrN7mivSrn3EXXJMta0s Xm/SnB6jdylhKzLLedMngvFLsA6F/B4TQWqUgJyopAGNSPHDl8GLUtXoqR0CNr5y3MDaCpj Jj3BgjeXJ3kiUfySN6eETJzh16/iQGZ7/pZ+ogsEjiTW8QuHTPyX6BeWZTmW+8P3rxawQex Hb2zNR3wfgmFJ1G8gTAbw== X-UI-Out-Filterresults: notjunk:1;V03:K0:bjmppIDqGNU=:S0u9JXZD+LUId5c1X2o8o6 VbUOYOx1MX/3veUR+HAOdpdmdQo0pid4E6SaHfItYEhtU4ajfyEW6pTqSEBPzOYPeQkXQXsSJ 4YK6GERVRmf2DQPl/+eJaMr6BRtkBB92gZAAxhL4AuOow5iremYkfIz6WTtFiPTOJAx4pU9SX PSNamhi/EqIUSDmv28LmXErzPt/R7I6EAV5GxfmigrZ0uT0hwh1WnDHIMc4H9+7FjBepVn3sY RwUgip0twLEHM9A8b9ntGyzrlyHt6iNLzkLREeheN5+UPg2tyweOkPCo7KROmnFXbKzWKgWZJ Tqh5rCpCeFvyyp52xXqmFGC82IjUnhiqflPvzXguyB5h6rQO7Z8CFwaC/7LSWVvbEfOymRou+ 9fGFAKrRsKwakK0pwbc9Ag7VnTxNcz2CJTGahEvtuXCEn+JX6qOpMl3Ns0j67jFqU+7rytUXB ZKsus2Bx1CZn8ca7Q3EkefK2BSI76oOPvDe+TX+epFujwni9e6h6fFRmMWVx5rhHjH/vlS8RZ DOPXKSNTi8cAWXx2aDPWjog3mcpz7+YlvzrtZaty8qpHkJ/y8JTMHPN4p67BX3zMIYQtLogM8 WETiVR5u5eLacZOj8qfvfIOUdXXBwJylvFdd40bOtUag2HVZG4dtecBtr287gVyoudFue2hFe GVOIEh7bdrZY1vemVzZdbSiKxFK/VaOFC370qYX4kFK2T/e/Ge7mZNExEykMH/RkjivKtu6c4 LRJ1SoQgfcjFXp0XXQpCKytuCab5flqphzxoGexsY6IJo2ebHrzqxIOC9svf7/EfyquQSSU1 Received-SPF: pass client-ip=212.227.15.19; envelope-from=michael.albinus@gmx.de; helo=mout.gmx.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:261196 Archived-At: Stefan Monnier 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.