From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Philipp Stephani Newsgroups: gmane.emacs.help Subject: Re: combine-and-quote-strings Date: Tue, 14 Apr 2015 18:54:15 +0000 Message-ID: References: <87bnitpqdg.fsf@kuiper.lan.informatimago.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1429037690 21613 80.91.229.3 (14 Apr 2015 18:54:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 14 Apr 2015 18:54:50 +0000 (UTC) To: "Pascal J. Bourguignon" , help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Apr 14 20:54:35 2015 Return-path: Envelope-to: geh-help-gnu-emacs@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 1Yi5yj-0003fB-2X for geh-help-gnu-emacs@m.gmane.org; Tue, 14 Apr 2015 20:54:33 +0200 Original-Received: from localhost ([::1]:57613 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yi5yi-0004FR-II for geh-help-gnu-emacs@m.gmane.org; Tue, 14 Apr 2015 14:54:32 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50994) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yi5yU-0004Cp-0R for help-gnu-emacs@gnu.org; Tue, 14 Apr 2015 14:54:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yi5yS-0002UT-Tk for help-gnu-emacs@gnu.org; Tue, 14 Apr 2015 14:54:17 -0400 Original-Received: from mail-wg0-x231.google.com ([2a00:1450:400c:c00::231]:33064) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yi5yS-0002U9-NN for help-gnu-emacs@gnu.org; Tue, 14 Apr 2015 14:54:16 -0400 Original-Received: by wgin8 with SMTP id n8so22329000wgi.0 for ; Tue, 14 Apr 2015 11:54:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :content-type; bh=QyZq6XG76oNeKpJ6ZburORtPDDZmOFvFPeN7SgUq8/E=; b=Zr2ZS0A1GxAoqmRu7HDC7tGCA64xxKtrYsXqCk+4Si+Fi4CLJdoc29PofOkXp/+VSm AgNFMVVZsuz+yL5U5TxfN9OijKOAbuCr8qyvB4XtCvlX9e+dOTxHyqyq1kUqoOGvTdzZ UNAw8YkGut751M2x4o+ystTLvxrcEWi9qBf58o+PSrkalBBzpckEH208mm6iADyFjGKt ql3tQ4ce6WELfwsPYErmDH9jTT9oJ93aPKt7FyaLNyj7tTgA9ZLq5iJpayKNDWT41Pgb U6I+TrzQgRXm7JJ19Z1IrLRWYXv39rSdE1DRCX40wbysRpTDcXJU1diGfFg7reTctN++ dfAQ== X-Received: by 10.180.10.234 with SMTP id l10mr35494672wib.27.1429037656022; Tue, 14 Apr 2015 11:54:16 -0700 (PDT) In-Reply-To: <87bnitpqdg.fsf@kuiper.lan.informatimago.com> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c00::231 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:103720 Archived-At: Pascal J. Bourguignon schrieb am So., 12. Apr. 2015 um 13:05 Uhr: > Philipp Stephani writes: > > > Hi, > > > > the Lisp manual explains (in the section "Shell Arguments"): > > > > The following two functions are useful for combining a list of > > individual command-line argument strings into a single string, > > > > This is about combine-and-quote-strings (and > > split-strings-and-unquote). However, combine-and-quote-strings can't > > really be used for that purpose because it doesn't quote many shell > > metacharacters. The correct way to shell-quote a list of arguments is > > > > (mapconcat #'shell-quote-argument ARGS " ") > > > > Should combine-and-quote-strings be reimplemented in terms of > > shell-quote-argument? The current definition doesn't seem to be optimal > > for shell quoting because many inputs aren't properly quoted. > > > > Or is combine-and-quote-strings not intended for shell quoting at all > > and the documentation should be adapted? > > The documentation ofcombine-and-quote-strings doesn't mention shell > quoting at all. > > True, but it sounds as if it could be used for shell quoting, and only careful reading of the Elisp manual or the source code will tell otherwise. At least I was initially confused about this. Maybe a warning could be added to both the function documentation and the Elisp manual that these functions are not intended for shell quoting?