From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: master 0ad1c0d: * lisp/net/tramp.el (tramp-handle-make-process): Handle shell commands. Date: Fri, 18 Dec 2020 11:28:28 -0500 Message-ID: References: <20201218123338.4927.85373@vcs0.savannah.gnu.org> <20201218123339.A90E820B72@vcs0.savannah.gnu.org> <87czz787dk.fsf@gmx.de> <87y2hv5ch6.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32915"; 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: Michael Albinus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Dec 18 17:29:15 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 1kqId1-0008TL-Nl for ged-emacs-devel@m.gmane-mx.org; Fri, 18 Dec 2020 17:29:15 +0100 Original-Received: from localhost ([::1]:54184 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kqId0-00014l-QA for ged-emacs-devel@m.gmane-mx.org; Fri, 18 Dec 2020 11:29:14 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45864) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kqIcP-0000dP-L3 for emacs-devel@gnu.org; Fri, 18 Dec 2020 11:28:37 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:62653) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kqIcK-0007J2-Cg for emacs-devel@gnu.org; Fri, 18 Dec 2020 11:28:36 -0500 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 596C91000F4; Fri, 18 Dec 2020 11:28:31 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 94F5D1000CF; Fri, 18 Dec 2020 11:28:29 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1608308909; bh=oFr2hgvSHDvsUO5XyQ/clhFDfgEMhAs2LXoLqNBEeWE=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=eqZ0Zz7ETATMvBGmyPcYFQi6PYd1glP+Uz/4VPfVTqF/CZGm4CDg2O6kxPo4lRf68 xaT6L/Pr77/tAQgp/EQS0egjjH40aPvbKWnBsBQLu9ZDLu0YcpdJvcga+ZLz+RipiR lUg9uTjzr/t1LBd5pivlxHBJTqDMo7sie5divJOeqe4N4LVVrASCSm55N4vb98SPC5 4IUwCBu6wwvC1P0GFsw3zM9CG8z9a6Hw3+i5JO8hlhRM1kNHRYm7q7uRxfgOe0zDMS PSxCMSu/msSpUjVRrrU/AEsjSmslM9zRs6OQGpLDOKSnOVXuf7roDCwI0nQGYL1ZSq o4NaI21HBJ+VQ== Original-Received: from alfajor (69-165-136-52.dsl.teksavvy.com [69.165.136.52]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 60DCC1201BD; Fri, 18 Dec 2020 11:28:29 -0500 (EST) In-Reply-To: <87y2hv5ch6.fsf@gmx.de> (Michael Albinus's message of "Fri, 18 Dec 2020 17:02:29 +0100") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_SPF_HELO_TEMPERROR=0.01 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:261205 Archived-At: >> BTW, what would go wrong if you did >> (setq command (mapcar #'tramp-shell-quote-argument command))? > > Tried that, didn't work. Imagine, you call "M-x rgrep" on a remote > machine. This ends up in a make-process call with :command [...] > As you see, three arguments "/bin/sh" "-c" and "find ...". If I do your > proposal, Tramp would send finally I don't understand: your code leaves "sh" and "-c" and passes the third through `tramp-shell-quote-argument`, but that should give the exact same result as passing all three through `tramp-shell-quote-argument` since "sh" and "-c" are both left unchanged by `tramp-shell-quote-argument`. What am I missing? Stefan