From unknown Mon Aug 18 02:34:04 2025
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.509 (Entity 5.509)
Content-Type: text/plain; charset=utf-8
From: bug#20333 <20333@debbugs.gnu.org>
To: bug#20333 <20333@debbugs.gnu.org>
Subject: Status: 24.3; Add warning about shell quoting to documentation of
combine-and-quote-strings
Reply-To: bug#20333 <20333@debbugs.gnu.org>
Date: Mon, 18 Aug 2025 09:34:04 +0000
retitle 20333 24.3; Add warning about shell quoting to documentation of com=
bine-and-quote-strings
reassign 20333 emacs
submitter 20333 Philipp Stephani
severity 20333 minor
tag 20333 patch fixed
thanks
From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 14 15:03:40 2015
Received: (at submit) by debbugs.gnu.org; 14 Apr 2015 19:03:40 +0000
Received: from localhost ([127.0.0.1]:56448 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.80)
(envelope-from )
id 1Yi67X-0003DS-GO
for submit@debbugs.gnu.org; Tue, 14 Apr 2015 15:03:40 -0400
Received: from eggs.gnu.org ([208.118.235.92]:39430)
by debbugs.gnu.org with esmtp (Exim 4.80)
(envelope-from ) id 1Yi67U-0003DB-LJ
for submit@debbugs.gnu.org; Tue, 14 Apr 2015 15:03:37 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
(envelope-from ) id 1Yi67N-0005P5-TW
for submit@debbugs.gnu.org; Tue, 14 Apr 2015 15:03:31 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: *
X-Spam-Status: No, score=1.1 required=5.0 tests=BAYES_50,
FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,T_DKIM_INVALID autolearn=disabled
version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:40316)
by eggs.gnu.org with esmtp (Exim 4.71)
(envelope-from ) id 1Yi67N-0005P0-R5
for submit@debbugs.gnu.org; Tue, 14 Apr 2015 15:03:29 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:52932)
by lists.gnu.org with esmtp (Exim 4.71)
(envelope-from ) id 1Yi67M-0006c6-Bo
for bug-gnu-emacs@gnu.org; Tue, 14 Apr 2015 15:03:29 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
(envelope-from ) id 1Yi67L-0005Oe-2q
for bug-gnu-emacs@gnu.org; Tue, 14 Apr 2015 15:03:28 -0400
Received: from mail-wi0-x234.google.com ([2a00:1450:400c:c05::234]:36539)
by eggs.gnu.org with esmtp (Exim 4.71)
(envelope-from ) id 1Yi67K-0005OY-Os
for bug-gnu-emacs@gnu.org; Tue, 14 Apr 2015 15:03:27 -0400
Received: by wizk4 with SMTP id k4so126047683wiz.1
for ; Tue, 14 Apr 2015 12:03:26 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
h=from:to:subject:date:message-id:mime-version:content-type;
bh=1Y+RG3db1KmWPh2zOHSOXECiZvAifoQD2xmBTmaYmVY=;
b=baWQyULWAFbi21rD7duvq6aSfogsb7ad4gMMQoB1ZhpbOLxaKmLuhGlc3j5FPOxsKe
aM8rA7rEDM6BxYqmJFvREtvDHZvRtN48iYNhGVETyc5zkz2FN/5RE8ZC8U4ZYR9eHnWI
7vATs7zKinZ3qUgNeF7KUHkAQC5pBDeKHt/VuITMPDX9f6ep6BjAUSkgmovnLtg/3P7y
7z5daaWiJnbMgtLAfYkGTJ8jUkwtRxJVeZbCj0UNd50Gp52pCVf/gAxOXWmwpY9D4pUw
NN3mvbDYEg6zZlWSMn5AHCyGK4PfI7tliVXVyFCQSMA/Oe+3F/fgCvgW1vFKGNLLx/dU
vboQ==
X-Received: by 10.180.104.4 with SMTP id ga4mr35464377wib.86.1429038206140;
Tue, 14 Apr 2015 12:03:26 -0700 (PDT)
Received: from phst2.muc.corp.google.com ([2620:0:1046:0:81d9:199c:b303:d233])
by mx.google.com with ESMTPSA id
fa8sm3978309wib.14.2015.04.14.12.03.25 for
(version=TLSv1.2 cipher=RC4-SHA bits=128/128);
Tue, 14 Apr 2015 12:03:25 -0700 (PDT)
From: Philipp Stephani
To: bug-gnu-emacs@gnu.org
Subject: 24.3; Add warning about shell quoting to documentation of
combine-and-quote-strings
Date: Tue, 14 Apr 2015 21:03:18 +0200
Message-ID:
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
(bad octet value).
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
(bad octet value).
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -3.8 (---)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit"
X-Spam-Score: -3.8 (---)
Context and more discussion:
http://lists.gnu.org/archive/html/help-gnu-emacs/2015-04/msg00179.html
It would be great if the documentation string and the Elisp manual about
`combine-and-quote-strings' could be made a bit clearer by explicitly
stating that this function is not useful for shell quoting.
In GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.10.7)
of 2014-03-07 on lamiak, modified by Debian
Windowing system distributor `The X.Org Foundation', version 11.0.11501000
System Description: Ubuntu 14.04 LTS
Configured using:
`configure '--build' 'x86_64-linux-gnu' '--build' 'x86_64-linux-gnu'
'--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib'
'--localstatedir=/var/lib' '--infodir=/usr/share/info'
'--mandir=/usr/share/man' '--with-pop=yes'
'--enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.3/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.3/site-lisp:/usr/share/emacs/site-lisp'
'--with-crt-dir=/usr/lib/x86_64-linux-gnu' '--with-x=yes'
'--with-x-toolkit=gtk3' '--with-toolkit-scroll-bars'
'build_alias=x86_64-linux-gnu' 'CFLAGS=-g -O2 -fstack-protector
--param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall'
'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro'
'CPPFLAGS=-D_FORTIFY_SOURCE=2''
Important settings:
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8-unix
default enable-multibyte-characters: t
Major mode: Help
Minor modes in effect:
tooltip-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
buffer-read-only: t
line-number-mode: t
transient-mark-mode: t
Recent input:
C-h f c o m b i n n
C-h i C-s e l i
C-s p r o c
M-x r e p o r t
Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Type C-x 1 to delete the help window.
Composing main Info directory...done
Mark saved where search started [2 times]
byte-code: End of buffer
Load-path shadows:
None found.
Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util
mail-prsvr mail-utils jka-compr misearch multi-isearch info help-mode
easymenu help-fns time-date tooltip ediff-hook vc-hooks lisp-float-type
mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list newcomment lisp-mode register page menu-bar rfn-eshadow
timer select scroll-bar mouse jit-lock font-lock syntax facemenu
font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan
thai tai-viet lao korean japanese hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces
cus-face macroexp files text-properties overlay sha1 md5 base64 format
env code-pages mule custom widget hashtable-print-readable backquote
make-network-process dbusbind dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)
From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 03 10:03:55 2016
Received: (at 20333) by debbugs.gnu.org; 3 Jul 2016 14:03:55 +0000
Received: from localhost ([127.0.0.1]:36005 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1bJi03-0000Ui-0O
for submit@debbugs.gnu.org; Sun, 03 Jul 2016 10:03:55 -0400
Received: from mail-it0-f43.google.com ([209.85.214.43]:35548)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1bJi01-0000UL-0V; Sun, 03 Jul 2016 10:03:53 -0400
Received: by mail-it0-f43.google.com with SMTP id j185so13819853ith.0;
Sun, 03 Jul 2016 07:03:53 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
h=sender:from:to:cc:subject:references:date:in-reply-to:message-id
:user-agent:mime-version;
bh=jWPK6oy1ShIUjvH/+kYTIRrJcfhHjDTa/pGY0dcbxsQ=;
b=fL9wWA2s0dQobkD6Rde1O3zHji2uZOO37e1piPcmxQdUMMeVm/knVWrWkpqVpykaZe
dfvpolWWitTZ3q0iU9k/54UCRiXULhM+d9RAK08PP/yuRFhc2gRJwxAOsBF3y62pjNBD
65sv3Dw22hz8qGurXhinvdjRsOc/+4IZErkeKuyaHs6zxfQ+eASS8GLpPwkhcuVumuvw
meURRTIKwggEgvTva52ekSn5vKA1Z+Lljh8hjbmhgWcjKyvlPmLCCiLk22flJ6mM6f25
5STO9HEGtclRp0CbLzhFHFI86Sqjr4dk7fpXvGedB599Ri+2QNa3qrLocs5npoZNkVI1
QutQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20130820;
h=x-gm-message-state:sender:from:to:cc:subject:references:date
:in-reply-to:message-id:user-agent:mime-version;
bh=jWPK6oy1ShIUjvH/+kYTIRrJcfhHjDTa/pGY0dcbxsQ=;
b=VwwpzsiCkj8UswXSiseIHfn+sYtmDT/+jt9Q9lyzdiLrlZ2vB9oMm7sFt6fOaU6oNu
KcOS2Qk4gm/Wfvlm/SEMumerRodUwyu3iCpWZwDkCooyxdGkvppmejjIPYrUTuD3nPTK
Ry8gOllCbbTDKpUcR+8ivBFm3Lb6n1E2xd6OR0WAJcVlPwAX/a5QCfxwg1a5r9BanlCy
alNO2viyteVh/01euhbI/CdjXrd4ZMrFvwZA93ixVHe3oL205V2UPeRqgT/yTDoO0zGz
i9OeHOXPfjmcA7mz2XnYFTyp09NQplyYXMUJtgMQYAo/mj0uX8SeqUXKm1FtRWB7Oqs/
AHkg==
X-Gm-Message-State: ALyK8tL0xNNLx3jwUeTvaduvkP5bupWqpk/OIXx+zKV6fIOfN6Y9RZK/wjRvDw3QqVVE3w==
X-Received: by 10.36.105.210 with SMTP id e201mr5658259itc.86.1467554627528;
Sun, 03 Jul 2016 07:03:47 -0700 (PDT)
Received: from zony (206-188-64-44.cpe.distributel.net. [206.188.64.44])
by smtp.googlemail.com with ESMTPSA id q128sm3772847iod.30.2016.07.03.07.03.46
(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
Sun, 03 Jul 2016 07:03:46 -0700 (PDT)
From: npostavs@users.sourceforge.net
To: Philipp Stephani
Subject: Re: bug#20333: 24.3;
Add warning about shell quoting to documentation of
combine-and-quote-strings
References:
Date: Sun, 03 Jul 2016 10:03:55 -0400
In-Reply-To: (Philipp Stephani's
message of "Tue, 14 Apr 2015 21:03:18 +0200")
Message-ID: <87bn2eg6no.fsf@users.sourceforge.net>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.93 (gnu/linux)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 20333
Cc: 20333@debbugs.gnu.org
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit"
X-Spam-Score: -0.7 (/)
--=-=-=
Content-Type: text/plain
tags 20333 patch
quit
Philipp Stephani writes:
> Context and more discussion:
> http://lists.gnu.org/archive/html/help-gnu-emacs/2015-04/msg00179.html
>
> It would be great if the documentation string and the Elisp manual about
> `combine-and-quote-strings' could be made a bit clearer by explicitly
> stating that this function is not useful for shell quoting.
How about this:
--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline;
filename=v1-0001-Note-combine-and-quote-strings-doesn-t-shell-quot.patch
Content-Description: patch
>From 5a1d23231bcf3c279fd3b09654fb132513748e6c Mon Sep 17 00:00:00 2001
From: Noam Postavsky
Date: Sun, 3 Jul 2016 09:56:36 -0400
Subject: [PATCH v1] Note combine-and-quote-strings doesn't shell quote
* doc/lispref/processes.texi (Shell Arguments):
* lisp/subr.el (combine-and-quote-strings): Add a note that
combine-and-quote-strings doesn't protect arguments against shell
evaluation (Bug #20333).
---
doc/lispref/processes.texi | 5 +++++
lisp/subr.el | 5 ++++-
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi
index 5bd0b11..b4542f6 100644
--- a/doc/lispref/processes.texi
+++ b/doc/lispref/processes.texi
@@ -215,6 +215,11 @@ Shell Arguments
string arguments to be passed to @code{call-process} or
@code{start-process}, or for converting such lists of arguments into
a single Lisp string to be presented in the minibuffer or echo area.
+Note that if a shell is involved (e.g., if using
+@code{call-process-shell-command}), arguments should still be
+protected by @code{shell-quote-argument};
+@code{combine-and-quote-strings} is @emph{not} intended to protect
+special characters from shell evaluation.
@defun split-string-and-unquote string &optional separators
This function splits @var{string} into substrings at matches for the
diff --git a/lisp/subr.el b/lisp/subr.el
index ed2166a..e9e19d3 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -3706,7 +3706,10 @@ combine-and-quote-strings
"Concatenate the STRINGS, adding the SEPARATOR (default \" \").
This tries to quote the strings to avoid ambiguity such that
(split-string-and-unquote (combine-and-quote-strings strs)) == strs
-Only some SEPARATORs will work properly."
+Only some SEPARATORs will work properly.
+
+Note that this is not intended to protect STRINGS from
+interpretation by shells, use `shell-quote-argument' for that."
(let* ((sep (or separator " "))
(re (concat "[\\\"]" "\\|" (regexp-quote sep))))
(mapconcat
--
2.8.0
--=-=-=--
From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 03 11:28:15 2016
Received: (at 20333) by debbugs.gnu.org; 3 Jul 2016 15:28:15 +0000
Received: from localhost ([127.0.0.1]:36063 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1bJjJf-0005fE-5p
for submit@debbugs.gnu.org; Sun, 03 Jul 2016 11:28:15 -0400
Received: from mail-lf0-f44.google.com ([209.85.215.44]:34711)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from ) id 1bJjJd-0005f1-MV
for 20333@debbugs.gnu.org; Sun, 03 Jul 2016 11:28:14 -0400
Received: by mail-lf0-f44.google.com with SMTP id h129so103916568lfh.1
for <20333@debbugs.gnu.org>; Sun, 03 Jul 2016 08:28:13 -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
:cc; bh=JGF0nNGXLjuiPjVuNO/ZbMjFnlMOZLSIEw+fHMnMI7s=;
b=Rcb6e0k2OTfancWJqxjA2c2U2Eo3M+LYdDzWGhZKOiVItN9vD/HLOksS7ymmooNOJU
ZF7BH+JwaQVFESKfhLp/32a32nEJF8WACCyC5oO2ZI9neXnI4XHW3JyboK8uQQrt+ibB
EiGduEJR9IkD1Qj+V/HepI8bILtMxa+TAvF+vu/wDyc1rrpbNtGxUR/Zfzc2Mw/xzSa0
NGjzLY/Oyvr/mZbWUxA4O1CKGA45mKuNlnvzXaUe9phfImVVTrnHgys8uexIdEwY1ceL
5xb9gMkKV4zVk+VkTYr4X5/9nGKZ5+atUMtFqbWyvlDKzuldLiN6VeWINXu5corsGeD5
nahg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20130820;
h=x-gm-message-state:mime-version:references:in-reply-to:from:date
:message-id:subject:to:cc;
bh=JGF0nNGXLjuiPjVuNO/ZbMjFnlMOZLSIEw+fHMnMI7s=;
b=c+lkXSdXUgZs9tWYJxY8HXbETefujnJCWkQMtXLdtY5aujjSTf7FzAbs8S5IREfN8P
Nt9EPw2DbSuthki09IxomhlLqsDf50k8zlZ0iDYgVYOrABl3EpXi5heLsTtNP88Z8cFm
tObzx+qSRPh4dHLXhkS6weeRJ76qfqKGw8pZoUM/5ZahaVBafJe10u0Q5rcAw59Cffxq
g3bqGXyxvGTorWIFlCejLdxHOAqIDS86aJsbwm3Y0o2Kno4y+QBp32RPrlAKpO2hnP9Q
Hc3l4M+zu9UGmrrXacArh2dBWgGjG8SvuEpTON7+tbBs6U76ieyNcOXwmCY80DWBxaVb
kPtQ==
X-Gm-Message-State: ALyK8tKbAA+/HLXJMAzCnypRgojlayfmE7nxfmUt+LHBbd+DYalMAKrv6/ssq6ApPUDHBV/d5fmEbYHJYnfWXA==
X-Received: by 10.25.3.12 with SMTP id 12mr1407084lfd.110.1467559687725; Sun,
03 Jul 2016 08:28:07 -0700 (PDT)
MIME-Version: 1.0
References:
<87bn2eg6no.fsf@users.sourceforge.net>
In-Reply-To: <87bn2eg6no.fsf@users.sourceforge.net>
From: Philipp Stephani
Date: Sun, 03 Jul 2016 15:27:58 +0000
Message-ID:
Subject: Re: bug#20333: 24.3; Add warning about shell quoting to documentation
of combine-and-quote-strings
To: npostavs@users.sourceforge.net
Content-Type: multipart/alternative; boundary=001a113ec466dfa86d0536bcdd39
X-Spam-Score: -0.5 (/)
X-Debbugs-Envelope-To: 20333
Cc: 20333@debbugs.gnu.org
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit"
X-Spam-Score: -0.5 (/)
--001a113ec466dfa86d0536bcdd39
Content-Type: text/plain; charset=UTF-8
schrieb am So., 3. Juli 2016 um 16:03 Uhr:
> tags 20333 patch
> quit
>
> Philipp Stephani writes:
>
> > Context and more discussion:
> > http://lists.gnu.org/archive/html/help-gnu-emacs/2015-04/msg00179.html
> >
> > It would be great if the documentation string and the Elisp manual about
> > `combine-and-quote-strings' could be made a bit clearer by explicitly
> > stating that this function is not useful for shell quoting.
>
> How about this:
>
>
Looks good, thanks.
--001a113ec466dfa86d0536bcdd39
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<=
/div>
--001a113ec466dfa86d0536bcdd39--
From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 03 11:34:29 2016
Received: (at 20333) by debbugs.gnu.org; 3 Jul 2016 15:34:29 +0000
Received: from localhost ([127.0.0.1]:36071 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from
)
id 1bJjPh-0005p6-2t
for submit@debbugs.gnu.org; Sun, 03 Jul 2016 11:34:29 -0400
Received: from eggs.gnu.org ([208.118.235.92]:39427)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from ) id 1bJjPf-0005ot-A3
for 20333@debbugs.gnu.org; Sun, 03 Jul 2016 11:34:27 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
(envelope-from ) id 1bJjPW-0000co-6j
for 20333@debbugs.gnu.org; Sun, 03 Jul 2016 11:34:22 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level:
X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_20,RP_MATCHES_RCVD
autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:36617)
by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from )
id 1bJjPW-0000ce-34; Sun, 03 Jul 2016 11:34:18 -0400
Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4716
helo=home-c4e4a596f7)
by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128)
(Exim 4.82) (envelope-from )
id 1bJjPV-0002Do-4h; Sun, 03 Jul 2016 11:34:17 -0400
Date: Sun, 03 Jul 2016 18:34:13 +0300
Message-Id: <83inwmrb0q.fsf@gnu.org>
From: Eli Zaretskii
To: npostavs@users.sourceforge.net
In-reply-to: <87bn2eg6no.fsf@users.sourceforge.net>
(npostavs@users.sourceforge.net)
Subject: Re: bug#20333: 24.3;
Add warning about shell quoting to documentation of
combine-and-quote-strings
References:
<87bn2eg6no.fsf@users.sourceforge.net>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -6.3 (------)
X-Debbugs-Envelope-To: 20333
Cc: p.stephani2@gmail.com, 20333@debbugs.gnu.org
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Reply-To: Eli Zaretskii
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit"
X-Spam-Score: -6.3 (------)
> From: npostavs@users.sourceforge.net
> Date: Sun, 03 Jul 2016 10:03:55 -0400
> Cc: 20333@debbugs.gnu.org
>
> >From 5a1d23231bcf3c279fd3b09654fb132513748e6c Mon Sep 17 00:00:00 2001
> From: Noam Postavsky
> Date: Sun, 3 Jul 2016 09:56:36 -0400
> Subject: [PATCH v1] Note combine-and-quote-strings doesn't shell quote
>
> * doc/lispref/processes.texi (Shell Arguments):
> * lisp/subr.el (combine-and-quote-strings): Add a note that
> combine-and-quote-strings doesn't protect arguments against shell
> evaluation (Bug #20333).
> ---
> doc/lispref/processes.texi | 5 +++++
> lisp/subr.el | 5 ++++-
> 2 files changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi
> index 5bd0b11..b4542f6 100644
> --- a/doc/lispref/processes.texi
> +++ b/doc/lispref/processes.texi
> @@ -215,6 +215,11 @@ Shell Arguments
> string arguments to be passed to @code{call-process} or
> @code{start-process}, or for converting such lists of arguments into
> a single Lisp string to be presented in the minibuffer or echo area.
> +Note that if a shell is involved (e.g., if using
> +@code{call-process-shell-command}), arguments should still be
> +protected by @code{shell-quote-argument};
> +@code{combine-and-quote-strings} is @emph{not} intended to protect
> +special characters from shell evaluation.
>
> @defun split-string-and-unquote string &optional separators
> This function splits @var{string} into substrings at matches for the
> diff --git a/lisp/subr.el b/lisp/subr.el
> index ed2166a..e9e19d3 100644
> --- a/lisp/subr.el
> +++ b/lisp/subr.el
> @@ -3706,7 +3706,10 @@ combine-and-quote-strings
> "Concatenate the STRINGS, adding the SEPARATOR (default \" \").
> This tries to quote the strings to avoid ambiguity such that
> (split-string-and-unquote (combine-and-quote-strings strs)) == strs
> -Only some SEPARATORs will work properly."
> +Only some SEPARATORs will work properly.
> +
> +Note that this is not intended to protect STRINGS from
> +interpretation by shells, use `shell-quote-argument' for that."
> (let* ((sep (or separator " "))
> (re (concat "[\\\"]" "\\|" (regexp-quote sep))))
> (mapconcat
> --
> 2.8.0
LGTM, thanks. This is good for emacs-25.
From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 03 15:08:21 2016
Received: (at 20333) by debbugs.gnu.org; 3 Jul 2016 19:08:21 +0000
Received: from localhost ([127.0.0.1]:36184 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1bJmkf-0007Ao-F9
for submit@debbugs.gnu.org; Sun, 03 Jul 2016 15:08:21 -0400
Received: from mail-io0-f182.google.com ([209.85.223.182]:36441)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1bJmkd-0007AW-R4; Sun, 03 Jul 2016 15:08:20 -0400
Received: by mail-io0-f182.google.com with SMTP id s63so137813662ioi.3;
Sun, 03 Jul 2016 12:08:19 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
h=sender:from:to:cc:subject:references:date:in-reply-to:message-id
:user-agent:mime-version;
bh=HE5ZcF/XNMfgRN6/+dJQQWNJfAfN8rSuVKXLSHUG5Ao=;
b=a5zQ2ukQ+HfaGpjGcG9WVv73t63VcHnbS4W3NaXp9db2HpWFj53PCburZL2gws1l3D
hBMEJlNjGXD/wspwycALSR8za2jWq0iXKrEksWATXVgH2LXXNoI30MuiCC8B1Ygg8sQ7
kdXIUnZkr0WlEB0AiwvowtTBs43Ou6twaXalpgX3dD81e8vZN/4DWFhpaPZeriHdJCjU
QhuYc+q0g9Q1IKrzIn/wv0WauFENd109PUb7m8jG9KmRA6dQq+AQLz5VEaaFMBZo/Gmh
C3719fUD0mAVEqVYeGwnBB5/aPS1QVr+nWxD0jDNTqjt3Cp2q0ztZWB7cZHQjfVR8fOz
tAmw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20130820;
h=x-gm-message-state:sender:from:to:cc:subject:references:date
:in-reply-to:message-id:user-agent:mime-version;
bh=HE5ZcF/XNMfgRN6/+dJQQWNJfAfN8rSuVKXLSHUG5Ao=;
b=Thhb6lcTS19MFilfde1DaCZjub+pXumvREGRFtv8Fto1awyPINjmd8D4qyURly1vZD
5wSzFoIxWRchjbos/BguwNwETCux6oZ7Ux8jDWiQRdZIT7SIzWFA6GVQJvLzOWHghXcr
v1h1EH5hVw0PjmxnnPuqVN+WvgzJ20lH//8T+7QX0IggRDErcZMXjq+8gpTAPvPiLR70
4DOxBqq9tg+tb9Qmfh8pwz5eQblctGrzDj4+S8Gsruq+JMg7EdofudqqRYjF0M7ZLFEF
124uRpwhL4IAF0gWwDwJUlF6eiv5+ojHtkwmpRO4q7+io2ZJZA3FlBAVIYlifpDcnjvu
2Okg==
X-Gm-Message-State: ALyK8tLsUsB+3MwqUEP5cJZmYaYmMk95EwoDheztSQvupG1OcmSRNpYGwaUNI9/+06ZvZg==
X-Received: by 10.107.8.26 with SMTP id 26mr5797702ioi.85.1467572894489;
Sun, 03 Jul 2016 12:08:14 -0700 (PDT)
Received: from zony (206-188-64-44.cpe.distributel.net. [206.188.64.44])
by smtp.googlemail.com with ESMTPSA id
d126sm10608442iog.20.2016.07.03.12.08.13
(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
Sun, 03 Jul 2016 12:08:13 -0700 (PDT)
From: npostavs@users.sourceforge.net
To: Eli Zaretskii
Subject: Re: bug#20333: 24.3;
Add warning about shell quoting to documentation of
combine-and-quote-strings
References:
<87bn2eg6no.fsf@users.sourceforge.net> <83inwmrb0q.fsf@gnu.org>
Date: Sun, 03 Jul 2016 15:08:22 -0400
In-Reply-To: <83inwmrb0q.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 03 Jul
2016 18:34:13 +0300")
Message-ID: <87shvqedzt.fsf@users.sourceforge.net>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.93 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 20333
Cc: p.stephani2@gmail.com, 20333@debbugs.gnu.org
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit"
X-Spam-Score: -0.7 (/)
tags 20333 fixed
close 20333 25.1
quit
Eli Zaretskii writes:
>
> LGTM, thanks. This is good for emacs-25.
Pushed as 178b2f59
From unknown Mon Aug 18 02:34:04 2025
Received: (at fakecontrol) by fakecontrolmessage;
To: internal_control@debbugs.gnu.org
From: Debbugs Internal Request
Subject: Internal Control
Message-Id: bug archived.
Date: Mon, 01 Aug 2016 11:24:04 +0000
User-Agent: Fakemail v42.6.9
# This is a fake control message.
#
# The action:
# bug archived.
thanks
# This fakemail brought to you by your local debbugs
# administrator