From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas Schwab Newsgroups: gmane.emacs.devel Subject: Re: Feature Request: Function to quote filenames Date: Wed, 24 Jun 2015 17:34:13 +0200 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1435160244 7500 80.91.229.3 (24 Jun 2015 15:37:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 24 Jun 2015 15:37:24 +0000 (UTC) Cc: emacs-devel@gnu.org To: raman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jun 24 17:37:16 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Z7mjc-0006eD-Pg for ged-emacs-devel@m.gmane.org; Wed, 24 Jun 2015 17:37:08 +0200 Original-Received: from localhost ([::1]:51353 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z7mjc-0002Xt-4C for ged-emacs-devel@m.gmane.org; Wed, 24 Jun 2015 11:37:08 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59286) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z7mgu-0006Zc-MB for emacs-devel@gnu.org; Wed, 24 Jun 2015 11:34:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z7mgp-0000KL-6W for emacs-devel@gnu.org; Wed, 24 Jun 2015 11:34:20 -0400 Original-Received: from cantor2.suse.de ([195.135.220.15]:41527 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z7mgp-0000Jw-1Q for emacs-devel@gnu.org; Wed, 24 Jun 2015 11:34:15 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Original-Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id DC46BAAD1; Wed, 24 Jun 2015 15:34:13 +0000 (UTC) X-Yow: I HIJACKED a 747 to get here!! I hope those fabulous CONEHEADS are at HOME!! In-Reply-To: (raman@google.com's message of "Wed, 24 Jun 2015 08:26:52 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] X-Received-From: 195.135.220.15 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:187480 Archived-At: raman writes: > As an example: Given the filename: > > Alice's Adventures in Wonderland > > (setq f (shell-quote-argument "Alice's Adventures in Wonderland")) > returns > "Alice\\'s\\ Adventures\\ in\\ Wonderland" > > But invocations like > (shell-command (format "ls %s" f)) > > throw an error Which error does it throw? ELISP> (shell-command (format "ls %s" (shell-quote-argument "Alice's Adventures in Wonderland"))) 2 (#o2, #x2, ?\C-b) Andreas. -- Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."