unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Thierry Volpiatto <thierry.volpiatto@gmail.com>
To: bug-gnu-emacs@gnu.org
Subject: bug#8531: 24.0.50; shell-quote-argument shouldn't escape special characters
Date: Thu, 21 Apr 2011 15:31:41 +0200	[thread overview]
Message-ID: <87hb9rzq6a.fsf@gmail.com> (raw)
In-Reply-To: <8762q8xe3i.fsf@gmail.com>

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Thierry Volpiatto <thierry.volpiatto@gmail.com>
>> 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 






  reply	other threads:[~2011-04-21 13:31 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-21  7:23 bug#8531: 24.0.50; shell-quote-argument shouldn't escape special characters Thierry Volpiatto
2011-04-21 10:33 ` Eli Zaretskii
2011-04-21 12:10   ` Thierry Volpiatto
2011-04-21 13:04     ` Eli Zaretskii
2011-04-21 13:31       ` Thierry Volpiatto [this message]
2011-04-21 13:58         ` Eli Zaretskii
2011-04-21 16:34           ` Thierry Volpiatto
2011-04-21 23:14             ` Glenn Morris
2011-04-22  5:53               ` Eli Zaretskii
2011-04-22  7:10                 ` Glenn Morris
2011-04-22  8:03                   ` Eli Zaretskii
2011-04-22  6:03               ` Thierry Volpiatto
2011-04-22  6:15                 ` Eli Zaretskii
2011-04-22  9:21                   ` Thierry Volpiatto
2014-12-08  9:34 ` bug#8531: 24.0.50; samer
2014-12-08 18:46   ` Stefan Monnier
2014-12-09  0:15     ` samer
2014-12-09  0:41       ` Lars Magne Ingebrigtsen
2014-12-09  2:11         ` samer
2014-12-09  2:14           ` Lars Magne Ingebrigtsen
2014-12-09 22:11           ` samer
2014-12-09 22:21             ` Lars Magne Ingebrigtsen
2014-12-09 22:30               ` samer
2014-12-08 16:48 ` bug#8531: 24.0.50; shell-quote-argument shouldn't escape special characters samer
2015-02-24 10:51 ` bug#8531: 24.0.50; Samer Masterson
2015-03-03 15:52   ` Eli Zaretskii
     [not found]     ` <1425472710.1450.3@mail.samertm.com>
     [not found]       ` <83h9u0psn8.fsf@gnu.org>
2015-04-06  3:50         ` Samer Masterson
2015-03-15 11:58 ` Samer Masterson
2015-04-09  2:32   ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87hb9rzq6a.fsf@gmail.com \
    --to=thierry.volpiatto@gmail.com \
    --cc=bug-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).