From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.devel Subject: Re: Quotes in Dired listing switches Date: Sat, 26 Dec 2009 21:21:01 +0100 Message-ID: <87pr61qyfm.fsf@gmx.de> References: <87vdfy5om7.fsf@mail.jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1261858882 15063 80.91.229.12 (26 Dec 2009 20:21:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 26 Dec 2009 20:21:22 +0000 (UTC) Cc: Juri Linkov , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Dec 26 21:21:15 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NOd8U-0005Dv-IB for ged-emacs-devel@m.gmane.org; Sat, 26 Dec 2009 21:21:14 +0100 Original-Received: from localhost ([127.0.0.1]:58235 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NOd8U-0006ad-Lj for ged-emacs-devel@m.gmane.org; Sat, 26 Dec 2009 15:21:14 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NOd8O-0006YH-3E for emacs-devel@gnu.org; Sat, 26 Dec 2009 15:21:08 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NOd8J-0006Pa-Fg for emacs-devel@gnu.org; Sat, 26 Dec 2009 15:21:07 -0500 Original-Received: from [199.232.76.173] (port=42696 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NOd8J-0006PL-8r for emacs-devel@gnu.org; Sat, 26 Dec 2009 15:21:03 -0500 Original-Received: from mail.gmx.net ([213.165.64.20]:32961) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1NOd8I-0007zk-On for emacs-devel@gnu.org; Sat, 26 Dec 2009 15:21:03 -0500 Original-Received: (qmail invoked by alias); 26 Dec 2009 20:20:59 -0000 Original-Received: from p4FC00725.dip0.t-ipconnect.de (EHLO arthur.local) [79.192.7.37] by mail.gmx.net (mp022) with SMTP; 26 Dec 2009 21:20:59 +0100 X-Authenticated: #3708877 X-Provags-ID: V01U2FsdGVkX1/gf9cJRgrgE3C4XmHxtfIXxdbinU+h0JvNKGzS5r C07FzQqTnVwXhy In-Reply-To: (Stefan Monnier's message of "Wed, 23 Dec 2009 22:18:58 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.90 (gnu/linux) X-Y-GMX-Trusted: 0 X-FuHaFi: 0.63 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:118826 Archived-At: Stefan Monnier writes: > Obviously, there's a problem in the inconsistent parsing of > dired-listing-switches, where the basic code splits it at spaces without > doing any additional unquoting or analysis, whereas the Tramp code seems > to just pass it as-is to the shell (so if you set it to "-al $(rm -rf ~/.)" > it will try to do something funny). > I won't claim that the basic code's naive splitting is great, but > Tramp's similarly naive use is not great either. So, I suggest to treat > it as a bug in Tramp which should split it like the basic code and then > shell-quote-argument the parts. In tramp.el, I've added quoting of the "'" character in SWITCHES, passed by `insert-directory', which shall be sufficient. However, remote directory listings won't show a "thousands separator of the current locale", because Tramps sets LC_ALL to "C" on the remote hosts. The C locale has no thousands separator. If you (Juri) want to change this, you might customize `tramp-remote-process-environment', setting LC_ALL to en_US.UTF-8 or so. But please be careful, because Tramp reads output from some commands, and might expect English. > Stefan Best regards, Michael.