From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thierry Volpiatto Newsgroups: gmane.emacs.bugs Subject: bug#8531: 24.0.50; shell-quote-argument shouldn't escape special characters Date: Thu, 21 Apr 2011 15:31:41 +0200 Message-ID: <87hb9rzq6a.fsf@gmail.com> References: <8762q8xe3i.fsf@gmail.com> <83ei4v3ndm.fsf@gnu.org> <87ipu7oldi.fsf@gmail.com> <83aafj3gd6.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1303393057 24403 80.91.229.12 (21 Apr 2011 13:37:37 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 21 Apr 2011 13:37:37 +0000 (UTC) To: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Apr 21 15:37:33 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QCu4a-0007rY-M4 for geb-bug-gnu-emacs@m.gmane.org; Thu, 21 Apr 2011 15:37:32 +0200 Original-Received: from localhost ([::1]:36753 helo=lists2.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QCu4a-0004L3-24 for geb-bug-gnu-emacs@m.gmane.org; Thu, 21 Apr 2011 09:37:32 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:58800) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QCu4X-0004Ky-S0 for bug-gnu-emacs@gnu.org; Thu, 21 Apr 2011 09:37:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QCu4W-0004rv-TE for bug-gnu-emacs@gnu.org; Thu, 21 Apr 2011 09:37:29 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:43993) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QCu4W-0004ri-Rp for bug-gnu-emacs@gnu.org; Thu, 21 Apr 2011 09:37:28 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1QCu0E-0001SU-HB; Thu, 21 Apr 2011 09:33:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <8762q8xe3i.fsf@gmail.com> Resent-From: Thierry Volpiatto Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 21 Apr 2011 13:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8531 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by submit@debbugs.gnu.org id=B.13033927305536 (code B ref -1); Thu, 21 Apr 2011 13:33:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 21 Apr 2011 13:32:10 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QCtzN-0001RF-IW for submit@debbugs.gnu.org; Thu, 21 Apr 2011 09:32:10 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QCtzJ-0001Ql-7q for submit@debbugs.gnu.org; Thu, 21 Apr 2011 09:32:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QCtzD-00040e-F1 for submit@debbugs.gnu.org; Thu, 21 Apr 2011 09:32:00 -0400 Original-Received: from lists.gnu.org ([140.186.70.17]:52461) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QCtzD-00040a-DO for submit@debbugs.gnu.org; Thu, 21 Apr 2011 09:31:59 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:34790) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QCtzC-0003ZK-Hz for bug-gnu-emacs@gnu.org; Thu, 21 Apr 2011 09:31:59 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QCtz9-0003zz-Tr for bug-gnu-emacs@gnu.org; Thu, 21 Apr 2011 09:31:58 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:38585) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QCtz9-0003zp-NV for bug-gnu-emacs@gnu.org; Thu, 21 Apr 2011 09:31:55 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QCtz8-0003oD-Hm for bug-gnu-emacs@gnu.org; Thu, 21 Apr 2011 15:31:54 +0200 Original-Received: from 82.77.197-77.rev.gaoland.net ([77.197.77.82]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 21 Apr 2011 15:31:54 +0200 Original-Received: from thierry.volpiatto by 82.77.197-77.rev.gaoland.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 21 Apr 2011 15:31:54 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 40 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 82.77.197-77.rev.gaoland.net User-Agent: Gnus/5.110016 (No Gnus v0.16) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:KpuRwIQ23LAPV1I2Wtkrfk7q4TA= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Thu, 21 Apr 2011 09:33:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:45920 Archived-At: Eli Zaretskii writes: >> From: Thierry Volpiatto >> Date: Thu, 21 Apr 2011 14:10:49 +0200 >> >> > I have no problem with using the >> > result of shell-quote-argument in "M-!". >> Which result? >> Which command? > > The command was "ls Vid\éos". It displayed the files in that > directory. Yes, but ls "Vid\éos" fail. The point is being able to do something like this: (shell-command (format "ls %s" (shell-quote-argument (read-string "Fname: ")))) instead of e.g (shell-command (format "ls '%s'" (read-string "Fname: "))) >> I am speaking of escaping accentued characters "é, à etc..." > > Yes, so am I. Ok. >> Why `shell-quote-argument' escape such characters? > > Because it wants to play safe. In a Posix shell, any non-special > character preceded with a backslash stands for itself, I'm sure you > know that. Backslash-escaping anything that is not in the Posix > character set avoids too much knowledge about the underlying shell's > special characters, and should be harmless if the escaped characters > are not special. Oh yes, i remember now that "é etc.." are not in posix character set, thanks. -- A+ Thierry Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997