From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai =?iso-8859-1?q?Gro=DFjohann?=) Newsgroups: gmane.emacs.devel Subject: Re: shell-quote-argument: make it behave as if on Unix? Date: Tue, 16 Apr 2002 11:25:49 +0200 Sender: emacs-devel-admin@gnu.org Message-ID: References: <200204111453.g3BErBr21336@aztec.santafe.edu> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: main.gmane.org 1018949336 31112 127.0.0.1 (16 Apr 2002 09:28:56 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 16 Apr 2002 09:28:56 +0000 (UTC) Cc: emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 16xPGi-00085h-00 for ; Tue, 16 Apr 2002 11:28:56 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 16xPYq-0006sa-00 for ; Tue, 16 Apr 2002 11:47:40 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16xPF1-0001FH-00; Tue, 16 Apr 2002 05:27:11 -0400 Original-Received: from waldorf.cs.uni-dortmund.de ([129.217.4.42]) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16xPDo-0001Bz-00; Tue, 16 Apr 2002 05:25:56 -0400 Original-Received: from lothlorien.cs.uni-dortmund.de (lothlorien [129.217.19.67]) by waldorf.cs.uni-dortmund.de with ESMTP id g3G9Ptb23485; Tue, 16 Apr 2002 11:25:55 +0200 (MES) Original-Received: from lucy.cs.uni-dortmund.de (lucy [129.217.19.80]) by lothlorien.cs.uni-dortmund.de id LAA07529; Tue, 16 Apr 2002 11:25:50 +0200 (MET DST) Original-Received: by lucy.cs.uni-dortmund.de (Postfix, from userid 6104) id C52393B38F; Tue, 16 Apr 2002 11:25:49 +0200 (CEST) Original-To: rms@gnu.org In-Reply-To: <200204111453.g3BErBr21336@aztec.santafe.edu> (Richard Stallman's message of "Thu, 11 Apr 2002 08:53:11 -0600 (MDT)") Original-Lines: 42 User-Agent: Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.2.50 (i686-pc-linux-gnu) Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.9 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:2656 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:2656 Richard Stallman writes: > The Tramp package sends commands to a remote Unix host. These > commands sometimes include filenames, so I pass those through > shell-quote-argument. > > I think you should copy the code you want into your own source file > and give it a different function name. I've been thinking about this for a long time now, and I would like to thank Richard for his very useful advice. All things considered, I think he is right. OT1H it would be nice to reuse code. But OTOH, there are a number of issues with shell-quote-argument as it currently stands, and Tramp can only use it after these have been decided. (1) [This issue has been discussed in the current thread.] shell-quote-argument always quotes for the system that Emacs is running on, but some applications (such as Tramp) might wish to use the strings on a different system. (2) shell-quote-argument does not deal well with newlines in strings. For instance, it converts "a\nb" into "a\\\nb" which the (Bourne) shell then reads as "ab". There is no method (that I know of) which works for both Bourne-ish and c-ish shells on Unix. So I will (maybe not today) change tramp-shell-quote-argument in such a way that it does the work itself. After that, it is not urgent to change the behavior of shell-quote-argument. Are people interested in me working on changing shell-quote-argument to deal with the above two issues? I'll look through the Lisp code in Emacs to see that the change is upwardly=B9 compatible. kai =B9 Or is it "upwards-compatible"? --=20 Silence is foo!