From unknown Tue Sep 23 13:13:00 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#29303 <29303@debbugs.gnu.org> To: bug#29303 <29303@debbugs.gnu.org> Subject: Status: 25.2; vc-git-grep should shell-escape FILES Reply-To: bug#29303 <29303@debbugs.gnu.org> Date: Tue, 23 Sep 2025 20:13:00 +0000 retitle 29303 25.2; vc-git-grep should shell-escape FILES reassign 29303 emacs submitter 29303 Angus Lees severity 29303 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 15 01:50:31 2017 Received: (at submit) by debbugs.gnu.org; 15 Nov 2017 06:50:31 +0000 Received: from localhost ([127.0.0.1]:40899 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eErWo-000208-Qz for submit@debbugs.gnu.org; Wed, 15 Nov 2017 01:50:31 -0500 Received: from eggs.gnu.org ([208.118.235.92]:34647) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eEr8f-0001My-Hw for submit@debbugs.gnu.org; Wed, 15 Nov 2017 01:25:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eEr8X-0003ta-TK for submit@debbugs.gnu.org; Wed, 15 Nov 2017 01:25:28 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, HTML_MESSAGE autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:34904) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eEr8X-0003tE-Q6 for submit@debbugs.gnu.org; Wed, 15 Nov 2017 01:25:25 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53834) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eEr8V-0001mk-GK for bug-gnu-emacs@gnu.org; Wed, 15 Nov 2017 01:25:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eEr8Q-0003mo-FH for bug-gnu-emacs@gnu.org; Wed, 15 Nov 2017 01:25:23 -0500 Received: from mail-yw0-f194.google.com ([209.85.161.194]:53397) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eEr8Q-0003lt-6g for bug-gnu-emacs@gnu.org; Wed, 15 Nov 2017 01:25:18 -0500 Received: by mail-yw0-f194.google.com with SMTP id q126so15623423ywq.10 for ; Tue, 14 Nov 2017 22:25:17 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=jda/RmJ0TCx+M9NnlTG5NBjkzpU9gZVOc7sZ0hw2fmo=; b=RE3Lo7Z+BCY/19a68gFNtSazO+n694d1MK38Y8vgLgGYkGYvEfFoFbpAMYVeLnT9Wa 7TnRAmIhrBx+SaiNo9ExLPz4csEhkEc6si9zPhq99GOqOW9/dJ7DlAV7TCW6ZY3aPFq8 cOfmUVFq+F3sW0ItRV40VtQjrIoTGRU8T2T+uZ89aX2eXMLxPsEgajaMLHgXyPk9QD/P 6eBuJBek2Q4n6kcdlZUL6Q0ZTohHeLO9hOCl8YEWdO5vZfdlL60yNFgIZj3Gt9PrAgjm /90hVs50GGc7Nq3jz+NuXVwv46MsqX2lKXDBHcujC79DNtIEM0SccPSsyQE4OOcef048 oouQ== X-Gm-Message-State: AJaThX5QKQsRkwv8AFD00/ect8XnJ+MZMoE2smhsjR2l7S3Gy307X6Cq vyMtPMNsqXLKhdGK+f2bQmdmN5PtRzdykx9EtqXQhA== X-Google-Smtp-Source: AGs4zMboAFSGOzvA34FndL+ZPYKwTrYu9bSttJjWXZJj6R8A9+5izoSIOFOb9FtncVok/R1D+Tp2E190/cztPrFSoso= X-Received: by 10.129.201.3 with SMTP id o3mr9870918ywi.502.1510727116146; Tue, 14 Nov 2017 22:25:16 -0800 (PST) MIME-Version: 1.0 From: Angus Lees Date: Wed, 15 Nov 2017 06:25:04 +0000 Message-ID: Subject: 25.2; vc-git-grep should shell-escape FILES To: bug-gnu-emacs@gnu.org Content-Type: multipart/alternative; boundary="089e0821e92c1c4bc7055dff91a1" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -3.8 (---) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Wed, 15 Nov 2017 01:50:28 -0500 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: -3.8 (---) --089e0821e92c1c4bc7055dff91a1 Content-Type: text/plain; charset="UTF-8" "git grep" is recursive. Consequently, the globbing for FILES arg needs to be done *inside* git, and not by the shell invoking git. Specifically: `vc-git-grep` needs to shell-escape the FILES value after `grep-read-files` (so `grep-files-aliases` continues to work) and before calling `grep-expand-template` (which does no escaping itself). - Gus In GNU Emacs 25.2.2 (x86_64-pc-linux-gnu, GTK+ Version 3.22.20) of 2017-09-12, modified by Debian built on trouble Windowing system distributor 'The X.Org Foundation', version 11.0.11905000 System Description: Debian GNU/Linux testing (buster) Configured using: 'configure --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/emacs25:/etc/emacs:/usr/local/share/emacs/25.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/25.2/site-lisp:/usr/share/emacs/site-lisp --with-sound=alsa --without-gconf --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/emacs25:/etc/emacs:/usr/local/share/emacs/25.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/25.2/site-lisp:/usr/share/emacs/site-lisp --with-sound=alsa --without-gconf --with-x=yes --with-x-toolkit=gtk3 --with-toolkit-scroll-bars 'CFLAGS=-g -O2 -fdebug-prefix-map=/build/emacs25-XrMyQe/emacs25-25.2+1=. -fstack-protector-strong -Wformat -Werror=format-security -Wall' 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2' LDFLAGS=-Wl,-z,relro' Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 Important settings: value of $LANG: en_AU.UTF-8 locale-coding-system: utf-8-unix Major mode: Emacs-Lisp Minor modes in effect: magit-auto-revert-mode: t global-git-commit-mode: t async-bytecomp-package-mode: t shell-dirtrack-mode: t diff-auto-refine-mode: t icomplete-mode: t iswitchb-mode: t show-paren-mode: t tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-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 messages: uncompressing vc-git.el.gz...done Note: file is write protected Mark saved where search started [3 times] Quit Mark saved where search started [3 times] Type "q" in help window to restore its previous buffer, C-M-v to scroll help. Making completion list... mouse-2, RET: find function's definition Auto-saving... Load-path shadows: /usr/share/emacs25/site-lisp/cmake-data/cmake-mode hides /usr/share/emacs/site-lisp/cmake-mode /usr/share/emacs/25.2/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup /usr/share/emacs25/site-lisp/flim/hex-util hides /usr/share/emacs/25.2/lisp/hex-util /usr/share/emacs25/site-lisp/flim/md4 hides /usr/share/emacs/25.2/lisp/md4 /usr/share/emacs/site-lisp/rst hides /usr/share/emacs/25.2/lisp/textmodes/rst /usr/share/emacs25/site-lisp/flim/sasl-ntlm hides /usr/share/emacs/25.2/lisp/net/sasl-ntlm /usr/share/emacs25/site-lisp/flim/sasl-cram hides /usr/share/emacs/25.2/lisp/net/sasl-cram /usr/share/emacs25/site-lisp/flim/ntlm hides /usr/share/emacs/25.2/lisp/net/ntlm /usr/share/emacs25/site-lisp/flim/hmac-def hides /usr/share/emacs/25.2/lisp/net/hmac-def /usr/share/emacs25/site-lisp/flim/sasl-digest hides /usr/share/emacs/25.2/lisp/net/sasl-digest /usr/share/emacs25/site-lisp/flim/hmac-md5 hides /usr/share/emacs/25.2/lisp/net/hmac-md5 /usr/share/emacs25/site-lisp/flim/sasl hides /usr/share/emacs/25.2/lisp/net/sasl /home/gus/.emacs.d/elpa/seq-2.20/seq hides /usr/share/emacs/25.2/lisp/emacs-lisp/seq /home/gus/.emacs.d/elpa/let-alist-1.0.5/let-alist hides /usr/share/emacs/25.2/lisp/emacs-lisp/let-alist Features: (shadow sort mail-extr emacsbug sendmail debug jka-compr eieio-opt speedbar sb-image ezimage dframe find-func pp grep pulse dired-x term/xterm xterm git-rebase dockerfile-mode rx markdown-mode noutline outline magit-obsolete magit-blame magit-stash magit-bisect magit-remote magit-commit magit-sequence magit-notes magit-worktree magit-branch magit-files magit-refs magit-status magit magit-repos magit-apply magit-wip magit-log magit-diff smerge-mode magit-core magit-autorevert autorevert filenotify magit-process magit-margin magit-mode magit-git magit-section magit-popup git-commit magit-utils crm log-edit message rfc822 mml mml-sec epg mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev mail-utils gmm-utils mailheader pcvs-util add-log with-editor async-bytecomp async tramp-sh tramp tramp-compat tramp-loaddefs trampver ucs-normalize shell pcomplete format-spec dash sh-script smie executable yaml-mode make-mode dired-aux js advice sgml-mode json map cc-mode cc-fonts cc-guess cc-menus cc-cmds dabbrev misearch multi-isearch vc-git diff-mode easy-mmode edmacro kmacro imenu go-mode url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util mailcap find-file ffap thingatpt url-parse auth-source gnus-util mm-util help-fns mail-prsvr password-cache url-vars etags xref cl-seq project eieio eieio-core cl-macs compile comint ansi-color ring dired server icomplete iswitchb paren cus-start cus-load cc-styles cc-align cc-engine cc-vars cc-defs finder-inf info package epg-config seq byte-opt gv bytecomp byte-compile cl-extra help-mode easymenu cconv cl-loaddefs pcase cl-lib debian-el debian-el-loaddefs dpkg-dev-el dpkg-dev-el-loaddefs time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese charscript case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote dbusbind inotify dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 492363 64694) (symbols 48 38692 0) (miscs 40 3877 2293) (strings 32 92434 6983) (string-bytes 1 2738138) (vectors 16 59458) (vector-slots 8 991712 39447) (floats 8 392 835) (intervals 56 16373 182) (buffers 976 66) --089e0821e92c1c4bc7055dff91a1 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
"git grep" is recursive.=C2=A0 Consequently= , the globbing for FILES arg needs
to be done *inside* git, and n= ot by the shell invoking git.

Specifically: `vc-gi= t-grep` needs to shell-escape the FILES value after
`grep-read-fi= les` (so `grep-files-aliases` continues to work) and before
calli= ng `grep-expand-template` (which does no escaping itself).

=C2=A0- Gus
=C2=A0

In GNU Emacs= 25.2.2 (x86_64-pc-linux-gnu, GTK+ Version 3.22.20)
=C2=A0of 2017= -09-12, modified by Debian built on trouble
Windowing system dist= ributor 'The X.Org Foundation', version 11.0.11905000
Sys= tem Description: Debian GNU/Linux te= sting (buster)

Configured using:
=C2=A0&= #39;configure --build x86_64-linux-gnu --prefix=3D/usr
=C2=A0--sh= aredstatedir=3D/var/lib --libexecdir=3D/usr/lib
=C2=A0--localstat= edir=3D/var/lib --infodir=3D/usr/share/info
=C2=A0--mandir=3D/usr= /share/man --with-pop=3Dyes
=C2=A0--enable-locallisppath=3D/etc/e= macs25:/etc/emacs:/usr/local/share/emacs/25.2/site-lisp:/usr/local/share/em= acs/site-lisp:/usr/share/emacs/25.2/site-lisp:/usr/share/emacs/site-lisp
=C2=A0--with-sound=3Dalsa --without-gconf --build x86_64-linux-gnu<= /div>
=C2=A0--prefix=3D/usr --sharedstatedir=3D/var/lib --libexecdir=3D= /usr/lib
=C2=A0--localstatedir=3D/var/lib --infodir=3D/usr/share/= info
=C2=A0--mandir=3D/usr/share/man --with-pop=3Dyes
= =C2=A0--enable-locallisppath=3D/etc/emacs25:/etc/emacs:/usr/local/share/ema= cs/25.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/25.2/si= te-lisp:/usr/share/emacs/site-lisp
=C2=A0--with-sound=3Dalsa --wi= thout-gconf --with-x=3Dyes --with-x-toolkit=3Dgtk3
=C2=A0--with-t= oolkit-scroll-bars 'CFLAGS=3D-g -O2
=C2=A0-fdebug-prefix-map= =3D/build/emacs25-XrMyQe/emacs25-25.2+1=3D. -fstack-protector-strong
<= div>=C2=A0-Wformat -Werror=3Dformat-security -Wall' 'CPPFLAGS=3D-Wd= ate-time
=C2=A0-D_FORTIFY_SOURCE=3D2' LDFLAGS=3D-Wl,-z,relro&= #39;

Configured features:
XPM JPEG TIFF = GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY
ACL LIBS= ELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_S= CROLL_BARS GTK3 X11

Important settings:
= =C2=A0 value of $LANG: en_AU.UTF-8
=C2=A0 locale-coding-system: u= tf-8-unix

Major mode: Emacs-Lisp

Minor modes in effect:
=C2=A0 magit-auto-revert-mode: t
=C2=A0 global-git-commit-mode: t
=C2=A0 async-bytecomp-p= ackage-mode: t
=C2=A0 shell-dirtrack-mode: t
=C2=A0 dif= f-auto-refine-mode: t
=C2=A0 icomplete-mode: t
=C2=A0 i= switchb-mode: t
=C2=A0 show-paren-mode: t
=C2=A0 toolti= p-mode: t
=C2=A0 global-eldoc-mode: t
=C2=A0 electric-i= ndent-mode: t
=C2=A0 mouse-wheel-mode: t
=C2=A0 menu-ba= r-mode: t
=C2=A0 file-name-shadow-mode: t
=C2=A0 global= -font-lock-mode: t
=C2=A0 font-lock-mode: t
=C2=A0 auto= -composition-mode: t
=C2=A0 auto-encryption-mode: t
=C2= =A0 auto-compression-mode: t
=C2=A0 buffer-read-only: t
=C2=A0 line-number-mode: t
=C2=A0 transient-mark-mode: t

Recent messages:
uncompressing vc-git.el.gz...d= one
Note: file is write protected
Mark saved where sear= ch started [3 times]
Quit
Mark saved where search start= ed [3 times]
Type "q" in help window to restore its pre= vious buffer, C-M-v to scroll help.
Making completion list...

mouse-2, RET: find function's definition
Auto-saving...

Load-path shadows:
/usr= /share/emacs25/site-lisp/cmake-data/cmake-mode hides /usr/share/emacs/site-= lisp/cmake-mode
/usr/share/emacs/25.2/site-lisp/debian-startup hi= des /usr/share/emacs/site-lisp/debian-startup
/usr/share/emacs25/= site-lisp/flim/hex-util hides /usr/share/emacs/25.2/lisp/hex-util
/usr/share/emacs25/site-lisp/flim/md4 hides /usr/share/emacs/25.2/lisp/md4=
/usr/share/emacs/site-lisp/rst hides /usr/share/emacs/25.2/lisp/= textmodes/rst
/usr/share/emacs25/site-lisp/flim/sasl-ntlm hides /= usr/share/emacs/25.2/lisp/net/sasl-ntlm
/usr/share/emacs25/site-l= isp/flim/sasl-cram hides /usr/share/emacs/25.2/lisp/net/sasl-cram
/usr/share/emacs25/site-lisp/flim/ntlm hides /usr/share/emacs/25.2/lisp/ne= t/ntlm
/usr/share/emacs25/site-lisp/flim/hmac-def hides /usr/shar= e/emacs/25.2/lisp/net/hmac-def
/usr/share/emacs25/site-lisp/flim/= sasl-digest hides /usr/share/emacs/25.2/lisp/net/sasl-digest
/usr= /share/emacs25/site-lisp/flim/hmac-md5 hides /usr/share/emacs/25.2/lisp/net= /hmac-md5
/usr/share/emacs25/site-lisp/flim/sasl hides /usr/share= /emacs/25.2/lisp/net/sasl
/home/gus/.emacs.d/elpa/seq-2.20/seq hi= des /usr/share/emacs/25.2/lisp/emacs-lisp/seq
/home/gus/.emacs.d/= elpa/let-alist-1.0.5/let-alist hides /usr/share/emacs/25.2/lisp/emacs-lisp/= let-alist

Features:
(shadow sort mail-ex= tr emacsbug sendmail debug jka-compr eieio-opt
speedbar sb-image = ezimage dframe find-func pp grep pulse dired-x
term/xterm xterm g= it-rebase dockerfile-mode rx markdown-mode noutline
outline magit= -obsolete magit-blame magit-stash magit-bisect magit-remote
magit= -commit magit-sequence magit-notes magit-worktree magit-branch
ma= git-files magit-refs magit-status magit magit-repos magit-apply
m= agit-wip magit-log magit-diff smerge-mode magit-core magit-autorevert
=
autorevert filenotify magit-process magit-margin magit-mode magit-git<= /div>
magit-section magit-popup git-commit magit-utils crm log-edit mes= sage
rfc822 mml mml-sec epg mm-decode mm-bodies mm-encode mail-pa= rse rfc2231
rfc2047 rfc2045 ietf-drums mailabbrev mail-utils gmm-= utils mailheader
pcvs-util add-log with-editor async-bytecomp asy= nc tramp-sh tramp
tramp-compat tramp-loaddefs trampver ucs-normal= ize shell pcomplete
format-spec dash sh-script smie executable ya= ml-mode make-mode dired-aux
js advice sgml-mode json map cc-mode = cc-fonts cc-guess cc-menus cc-cmds
dabbrev misearch multi-isearch= vc-git diff-mode easy-mmode edmacro
kmacro imenu go-mode url url= -proxy url-privacy url-expand url-methods
url-history url-cookie = url-domsuf url-util mailcap find-file ffap
thingatpt url-parse au= th-source gnus-util mm-util help-fns mail-prsvr
password-cache ur= l-vars etags xref cl-seq project eieio eieio-core
cl-macs compile= comint ansi-color ring dired server icomplete iswitchb
paren cus= -start cus-load cc-styles cc-align cc-engine cc-vars cc-defs
find= er-inf info package epg-config seq byte-opt gv bytecomp byte-compile
<= div>cl-extra help-mode easymenu cconv cl-loaddefs pcase cl-lib debian-el
debian-el-loaddefs dpkg-dev-el dpkg-dev-el-loaddefs time-date mule-= util
tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-flo= at-type
mwheel x-win term/common-win x-dnd tool-bar dnd fontset i= mage regexp-opt
fringe tabulated-list newcomment elisp-mode lisp-= mode prog-mode register
page menu-bar rfn-eshadow timer select sc= roll-bar mouse jit-lock
font-lock syntax facemenu font-core frame= cl-generic cham georgian
utf-8-lang misc-lang vietnamese tibetan= thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek = romanian slovak czech european
ethiopic indian cyrillic chinese c= harscript case-table epa-hook
jka-cmpr-hook help simple abbrev mi= nibuffer cl-preloaded nadvice
loaddefs button faces cus-face macr= oexp files text-properties overlay
sha1 md5 base64 format env cod= e-pages mule custom widget
hashtable-print-readable backquote dbu= sbind inotify dynamic-setting
system-font-setting font-render-set= ting move-toolbar gtk x-toolkit x
multi-tty make-network-process = emacs)

Memory information:
((conses 16 4= 92363 64694)
=C2=A0(symbols 48 38692 0)
=C2=A0(miscs 40= 3877 2293)
=C2=A0(strings 32 92434 6983)
=C2=A0(string= -bytes 1 2738138)
=C2=A0(vectors 16 59458)
=C2=A0(vecto= r-slots 8 991712 39447)
=C2=A0(floats 8 392 835)
=C2=A0= (intervals 56 16373 182)
=C2=A0(buffers 976 66)
--089e0821e92c1c4bc7055dff91a1-- From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 15 04:58:31 2017 Received: (at 29303) by debbugs.gnu.org; 15 Nov 2017 09:58:31 +0000 Received: from localhost ([127.0.0.1]:40990 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eEuSl-0006Gv-A0 for submit@debbugs.gnu.org; Wed, 15 Nov 2017 04:58:31 -0500 Received: from mail-wm0-f41.google.com ([74.125.82.41]:36747) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eEuSi-0006Gh-S7 for 29303@debbugs.gnu.org; Wed, 15 Nov 2017 04:58:29 -0500 Received: by mail-wm0-f41.google.com with SMTP id r68so1757585wmr.1 for <29303@debbugs.gnu.org>; Wed, 15 Nov 2017 01:58:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:gmane-reply-to-list:date:in-reply-to :message-id:user-agent:mime-version; bh=YcPtxSn+NMtjfygDE2f/ETrJD34zcQF7AGPNmeIyvKE=; b=MSD2Wz1GZKausG/gjcbCwa4VlXlKMkG6x2Xy+JZ/pxdTM2fBp+OxsGmdwIiiofxgX/ 7JkI5+l1lSgIyuO7SmP8fR4okI+TXuKSkBuSVjIZ0B8cNF4S1xJWGoXUHbUw4qoegZFO J4c1scRWchr+iqK4Uoi37q+KWD60Ups+4m0nECVeqDJeiZkhoplUBdjjuJQyolj96tb2 q0tqQjxnUAbYoEo+ETgyhhj2Hid3HWURi8BnvCyHLYXShU8bMzQnRmbJZAeb346GoaIc QBJmgxLbLTYbp+MDXRRvfyqTnH+Qq6I3oXlU7H44BXQ8mguYDnP+Hwnhw9q5m0tQzGzh j7AA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references :gmane-reply-to-list:date:in-reply-to:message-id:user-agent :mime-version; bh=YcPtxSn+NMtjfygDE2f/ETrJD34zcQF7AGPNmeIyvKE=; b=ixymI+KbgwJFroGX5s/ifECod2OUuUolkA9iOafyGG74BcOdFOMbcARtT53sVfkuuC bHT9CIEFjcs+ypLhq1ELeTH491qRLloqRE22YmhsUk2Kq9VRj45EE1TB93fu9l3ETKtL IjOprc1xgAKxgSfsf1qgxgkK8Ss8V35PWLRBg/w7JBBVq4wNzYwLF2deAjqZ1Wy06u5G VVZXbybsWOXj3JiUKkfGN1/Z3M1iMz9Bn+HZ6TseMVjc7yWAT6IIOZDalDVTxT6QWqLO bBCh1Cmqbo8qhficcW5m6G265bLurt16WRewCQwSXMKC6FYwaU7C6IjUYqCP43F7RpfA TmwA== X-Gm-Message-State: AJaThX6UE6gbXZqlaBdanR9gzjMzyuebJMo95eZY+RZHaYvPACmOAnpq 4U/umavtTlTfq3+YSFn9NR4L6Glz X-Google-Smtp-Source: AGs4zMa3zW/TPF3LlX1SFVXLubCPgU+K1/w9OtaZ+qDZpze7LkY5/ORcb+q+XZqUNkzKe9xSarZJMA== X-Received: by 10.80.157.199 with SMTP id l7mr21363128edk.170.1510739902651; Wed, 15 Nov 2017 01:58:22 -0800 (PST) Received: from rpluim-ubuntu ([149.5.228.1]) by smtp.gmail.com with ESMTPSA id w49sm18499574edb.13.2017.11.15.01.58.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 Nov 2017 01:58:21 -0800 (PST) From: Robert Pluim To: Angus Lees Subject: Re: bug#29303: 25.2; vc-git-grep should shell-escape FILES References: X-Debbugs-No-Ack: yes Gmane-Reply-To-List: yes Date: Wed, 15 Nov 2017 10:58:19 +0100 In-Reply-To: (Angus Lees's message of "Wed, 15 Nov 2017 06:25:04 +0000") Message-ID: <87efoz983o.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 29303 Cc: 29303@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 (/) --=-=-= Content-Type: text/plain Angus Lees writes: > "git grep" is recursive. Consequently, the globbing for FILES arg needs > to be done *inside* git, and not by the shell invoking git. > > Specifically: `vc-git-grep` needs to shell-escape the FILES value after > `grep-read-files` (so `grep-files-aliases` continues to work) and before > calling `grep-expand-template` (which does no escaping itself). > You mean something like the patch below? I considered splitting on spaces and doing shell-quote-argument, but that seems like overkill. (this is where someone points me at a function somewhere in emacs that does exactly this operation already) --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Quote-filenames-to-inhibit-expansion-by-the-shell.patch >From 788126ca723ba2e37553eaf5f17141be3544a5cb Mon Sep 17 00:00:00 2001 From: Robert Pluim Date: Wed, 15 Nov 2017 10:51:37 +0100 Subject: [PATCH] Quote filenames to inhibit expansion by the shell * lisp/vc/vc-git.el (vc-git-grep): Add quotes around filename patterns to ensure globbing is done by git rather than the shell. (Bug#29303) --- lisp/vc/vc-git.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index ed85603f82..fd5f5d5b63 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -1428,7 +1428,8 @@ vc-git-grep nil nil 'grep-history) nil)) (t (let* ((regexp (grep-read-regexp)) - (files (grep-read-files regexp)) + (files (concat "'" (replace-regexp-in-string " " "' '" + (grep-read-files regexp)) "'")) (dir (read-directory-name "In directory: " nil default-directory t))) (list regexp files dir)))))) -- 2.15.0 --=-=-= Content-Type: text/plain Robert --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 15 12:42:16 2017 Received: (at 29303) by debbugs.gnu.org; 15 Nov 2017 17:42:16 +0000 Received: from localhost ([127.0.0.1]:42075 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eF1hX-0004NS-Q0 for submit@debbugs.gnu.org; Wed, 15 Nov 2017 12:42:15 -0500 Received: from eggs.gnu.org ([208.118.235.92]:50504) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eF1hW-0004NF-Gf for 29303@debbugs.gnu.org; Wed, 15 Nov 2017 12:42:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eF1hO-0008JY-C7 for 29303@debbugs.gnu.org; Wed, 15 Nov 2017 12:42:09 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:33234) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eF1hO-0008JR-6f; Wed, 15 Nov 2017 12:42:06 -0500 Received: from [176.228.60.248] (port=4833 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1eF1hN-0005hb-Li; Wed, 15 Nov 2017 12:42:06 -0500 Date: Wed, 15 Nov 2017 19:42:17 +0200 Message-Id: <83d14jjv5y.fsf@gnu.org> From: Eli Zaretskii To: Robert Pluim In-reply-to: <87efoz983o.fsf@gmail.com> (message from Robert Pluim on Wed, 15 Nov 2017 10:58:19 +0100) Subject: Re: bug#29303: 25.2; vc-git-grep should shell-escape FILES References: <87efoz983o.fsf@gmail.com> 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: -5.0 (-----) X-Debbugs-Envelope-To: 29303 Cc: 29303@debbugs.gnu.org, gus@inodes.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: -5.0 (-----) > From: Robert Pluim > Date: Wed, 15 Nov 2017 10:58:19 +0100 > Cc: 29303@debbugs.gnu.org > > diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el > index ed85603f82..fd5f5d5b63 100644 > --- a/lisp/vc/vc-git.el > +++ b/lisp/vc/vc-git.el > @@ -1428,7 +1428,8 @@ vc-git-grep > nil nil 'grep-history) > nil)) > (t (let* ((regexp (grep-read-regexp)) > - (files (grep-read-files regexp)) > + (files (concat "'" (replace-regexp-in-string " " "' '" > + (grep-read-files regexp)) "'")) > (dir (read-directory-name "In directory: " > nil default-directory t))) > (list regexp files dir)))))) This cannot be right, because this style of quoting only works with Posix shells. From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 15 13:46:02 2017 Received: (at 29303) by debbugs.gnu.org; 15 Nov 2017 18:46:02 +0000 Received: from localhost ([127.0.0.1]:42121 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eF2hG-0006I3-2V for submit@debbugs.gnu.org; Wed, 15 Nov 2017 13:46:02 -0500 Received: from mail-wm0-f53.google.com ([74.125.82.53]:33426) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eF2hF-0006Gx-2S for 29303@debbugs.gnu.org; Wed, 15 Nov 2017 13:46:01 -0500 Received: by mail-wm0-f53.google.com with SMTP id r68so22836515wmr.0 for <29303@debbugs.gnu.org>; Wed, 15 Nov 2017 10:46:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:gmane-reply-to-list:date:in-reply-to :message-id:user-agent:mime-version; bh=hypEIl6sQ+TXJJBJw2rlpUCG5H3f781X1VchTnr0jJE=; b=Gi1+3OYfZnPXz4uB0Hd+yqsI616+dLDUHJzrVa6MjtPC9zmtlNI2dqDELm0MJcNVu8 N/7YXQzBNUEj0niyiu0zMs28IQ0rNreVUfRcCA/bTZ9zvCQR4O7KG78owRnX+1s2XPro JYi9ewut8crNhhEE6rbS25nyMLFB8/hy+P/l4PpgFqSL2JvtpB//56amA5lXWHamWqwL SsVhZFI3GfOkIr83IcXcnoLIqo5skkVVEF3MNvRxlnI16hp08yNu4OVy5Rw4eNo9zSP2 gR1AYBPQ7dJcY2++5hneG8akwO0KGNOkXg9jwGiTlq6kPAKHPYXY92EHRsIHzzC7R1gw rr/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references :gmane-reply-to-list:date:in-reply-to:message-id:user-agent :mime-version; bh=hypEIl6sQ+TXJJBJw2rlpUCG5H3f781X1VchTnr0jJE=; b=cqi3EM4uh9QzRwFIvMcCdb/to8trXRhZW15QKV7hDnG8qksIqfw8nEjEaxXEk4hgKz 5JAkqPE8rpD++E3M0AJP9u6rjP8F1nEorUS6cuKlN2fR/uxJFInOU3oQnCo8C/S3ekCt wapNxgXbnYLOLEiv9fqViRNVgfn4W8fIZpstXZuzFCfRtC4Mc4G9F6cGbAC/4ev3ETEZ nEqInjgSXlucP+rZkzYar7/na4PzFF2Prp7f0np7VinHuX7N//how1NaHJRA+Rg5xf/M XBdaybkHlkjqmDNJc/DeO5YfG5Gyym6mMtAYPGxRaVD/tLLsnB7nIEPkG3qK/cIMuKfU RgPg== X-Gm-Message-State: AJaThX7mypSiw87gYX3WZZ4iephVrJBYVBjjtYMQPcxluBFjjffXp0i4 uWdJke+c1Gj9VZc4NzC8IOezWu+C X-Google-Smtp-Source: AGs4zMYm0HwW4Tgk/SOG7fnr/SPfoUSqQLE9B7zYpQBowBkgAywdH8rto4w+BcIYAxj7FDPs34oauQ== X-Received: by 10.28.151.14 with SMTP id z14mr14148614wmd.5.1510771555037; Wed, 15 Nov 2017 10:45:55 -0800 (PST) Received: from rpluim ([2a01:e34:ecfc:a090:1874:a2a8:70da:f879]) by smtp.gmail.com with ESMTPSA id a71sm4632175wme.33.2017.11.15.10.45.53 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 15 Nov 2017 10:45:53 -0800 (PST) From: Robert Pluim To: Eli Zaretskii Subject: Re: bug#29303: 25.2; vc-git-grep should shell-escape FILES References: <87efoz983o.fsf@gmail.com> <83d14jjv5y.fsf@gnu.org> X-Debbugs-No-Ack: yes Gmane-Reply-To-List: yes Date: Wed, 15 Nov 2017 19:45:52 +0100 In-Reply-To: <83d14jjv5y.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 15 Nov 2017 19:42:17 +0200") Message-ID: <87375fpehr.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 29303 Cc: 29303@debbugs.gnu.org, gus@inodes.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.0 (/) --=-=-= Content-Type: text/plain Eli Zaretskii writes: > This cannot be right, because this style of quoting only works with > Posix shells. There are people who run Emacs on Windows who use cmd.exe as the shell to invoke git? Takes all sorts, I guess. How about this then? --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Shell-quote-filenames-to-inhibit-globbing-by-the-she.patch >From 0e3b4ee74bebae702bade0f1715fbb96b46bbec6 Mon Sep 17 00:00:00 2001 From: Robert Pluim Date: Wed, 15 Nov 2017 10:51:37 +0100 Subject: [PATCH] Shell quote filenames to inhibit globbing by the shell * lisp/vc/vc-git.el (vc-git-grep): Apply shell quoting to filename patterns to ensure globbing is done by git rather than the shell. (Bug#29303) --- lisp/vc/vc-git.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index ed85603f82..43164b4fcf 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -1428,7 +1428,7 @@ vc-git-grep nil nil 'grep-history) nil)) (t (let* ((regexp (grep-read-regexp)) - (files (grep-read-files regexp)) + (files (mapconcat #'shell-quote-argument (split-string (grep-read-files regexp)) " ")) (dir (read-directory-name "In directory: " nil default-directory t))) (list regexp files dir)))))) -- 2.15.0.276.g89ea799ff --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 15 14:59:07 2017 Received: (at 29303) by debbugs.gnu.org; 15 Nov 2017 19:59:07 +0000 Received: from localhost ([127.0.0.1]:42156 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eF3py-0001oX-Ve for submit@debbugs.gnu.org; Wed, 15 Nov 2017 14:59:07 -0500 Received: from eggs.gnu.org ([208.118.235.92]:52149) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eF3px-0001o4-VX for 29303@debbugs.gnu.org; Wed, 15 Nov 2017 14:59:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eF3po-0001bW-K8 for 29303@debbugs.gnu.org; Wed, 15 Nov 2017 14:59:00 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:35721) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eF3pe-0001Mj-BY; Wed, 15 Nov 2017 14:58:46 -0500 Received: from [176.228.60.248] (port=1173 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1eF3pc-00064u-Nv; Wed, 15 Nov 2017 14:58:46 -0500 Date: Wed, 15 Nov 2017 21:58:49 +0200 Message-Id: <837eurjoue.fsf@gnu.org> From: Eli Zaretskii To: Robert Pluim In-reply-to: <87375fpehr.fsf@gmail.com> (message from Robert Pluim on Wed, 15 Nov 2017 19:45:52 +0100) Subject: Re: bug#29303: 25.2; vc-git-grep should shell-escape FILES References: <87efoz983o.fsf@gmail.com> <83d14jjv5y.fsf@gnu.org> <87375fpehr.fsf@gmail.com> 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: -5.0 (-----) X-Debbugs-Envelope-To: 29303 Cc: 29303@debbugs.gnu.org, gus@inodes.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: -5.0 (-----) > From: Robert Pluim > Cc: 29303@debbugs.gnu.org, gus@inodes.org > Date: Wed, 15 Nov 2017 19:45:52 +0100 > > > This cannot be right, because this style of quoting only works with > > Posix shells. > > There are people who run Emacs on Windows who use cmd.exe as the shell > to invoke git? Yes, most of them, because that's the default. But that's not relevant, because shell wildcards are expanded on Windows by the startup code of the invoked program, not by the shell. > diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el > index ed85603f82..43164b4fcf 100644 > --- a/lisp/vc/vc-git.el > +++ b/lisp/vc/vc-git.el > @@ -1428,7 +1428,7 @@ vc-git-grep > nil nil 'grep-history) > nil)) > (t (let* ((regexp (grep-read-regexp)) > - (files (grep-read-files regexp)) > + (files (mapconcat #'shell-quote-argument (split-string (grep-read-files regexp)) " ")) > (dir (read-directory-name "In directory: " > nil default-directory t))) > (list regexp files dir)))))) That's okay portability-wise, but why do you need split-string? AFAIU, grep-read-files reads a single pattern, no? From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 15 15:17:46 2017 Received: (at 29303) by debbugs.gnu.org; 15 Nov 2017 20:17:46 +0000 Received: from localhost ([127.0.0.1]:42174 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eF482-0002GB-8t for submit@debbugs.gnu.org; Wed, 15 Nov 2017 15:17:46 -0500 Received: from mail-wm0-f51.google.com ([74.125.82.51]:47040) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eF480-0002Fy-NA for 29303@debbugs.gnu.org; Wed, 15 Nov 2017 15:17:45 -0500 Received: by mail-wm0-f51.google.com with SMTP id z3so5421083wme.5 for <29303@debbugs.gnu.org>; Wed, 15 Nov 2017 12:17:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:gmane-reply-to-list:date:in-reply-to :message-id:user-agent:mime-version; bh=mQmNXSQusKTZZttj2LftCz79H8oX+/zMuB5UEvM5CSo=; b=KOf8TMKqfSZnRJoq/bOzVq9jNKTDPVjnGCOqvJX01BtkZiUpRU6PPdp3tKRuZAGLPs RPC7fR0nfZSh729Nf3uVpJdl3+ZkELt/eqop8Oc1Jg1hlsr2DhVSQa8/Lf/EnwoCPRY2 0Gx9E3J/v6Q7FWeHRp6T2pwbXC3mzp0gb/4KSsktofmIPyOtxw/Z/aZvxytqemGrlQzA RKS9Wv1FEXvsWSBqEPKSJqiORht0/3FX8E7hxjzV01Ff1A0MpUP9bC2MN5TeLQbZ4Zxc xw7VWSJL8WuScEkbUkYFB/3qi0ElwEhLBld3s7EZXK2MooK3KOLak1khVt01vPavk3wf IOfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references :gmane-reply-to-list:date:in-reply-to:message-id:user-agent :mime-version; bh=mQmNXSQusKTZZttj2LftCz79H8oX+/zMuB5UEvM5CSo=; b=c9zNmRO7ssl8hYlJcn5+nW4/Yo8laM0B9TgWWlmhKmybmJGMvrICZBv/odOley0wMW zdPQdTsT2ueDNaqWm7UGkarTmHw76KFtXi7iOIOvUnfM56wjn45c8dKfNuyCCx407MIS Yxh748JM7lemr5sKqAnlubaN6a8dEBc6ZkJq9nG6DlYK7nLjlA3gnIPq4LgNXc8W7wqi sDlxni89uwog+4DH6FqKWsOixwTcLIJagEB9WQIYVX0S0sV1XSoVNkx5BO/ZxJVFPJLb cXaqXb4vW2Xt76bRAuxN545u6P9RfYHWc/TB8Bn7mJkVUOBCbp7Z6/C0nSjZ3BrmJWQY /ANQ== X-Gm-Message-State: AJaThX662UOPWiufGMeDdk/ot8586WARqMcnIPYiAQLfBbMMJZA/CWk0 2uEb9jlWM5CEpOeHRfRAstc= X-Google-Smtp-Source: AGs4zMb5JU6oXIhJBD5+CdrKC5YQGyQTvTUzo4Y1aKRkDhvVLTAM7RXRRKgIt4tmmkds9JlEmK6YXg== X-Received: by 10.80.162.231 with SMTP id 94mr24116670edm.280.1510777058860; Wed, 15 Nov 2017 12:17:38 -0800 (PST) Received: from rpluim ([2a01:e34:ecfc:a090:1874:a2a8:70da:f879]) by smtp.gmail.com with ESMTPSA id k11sm6379048eda.18.2017.11.15.12.17.37 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 15 Nov 2017 12:17:38 -0800 (PST) From: Robert Pluim To: Eli Zaretskii Subject: Re: bug#29303: 25.2; vc-git-grep should shell-escape FILES References: <87efoz983o.fsf@gmail.com> <83d14jjv5y.fsf@gnu.org> <87375fpehr.fsf@gmail.com> <837eurjoue.fsf@gnu.org> X-Debbugs-No-Ack: yes Gmane-Reply-To-List: yes Date: Wed, 15 Nov 2017 21:17:35 +0100 In-Reply-To: <837eurjoue.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 15 Nov 2017 21:58:49 +0200") Message-ID: <87tvxvnvog.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 29303 Cc: 29303@debbugs.gnu.org, gus@inodes.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.0 (/) Eli Zaretskii writes: >> From: Robert Pluim >> diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el >> index ed85603f82..43164b4fcf 100644 >> --- a/lisp/vc/vc-git.el >> +++ b/lisp/vc/vc-git.el >> @@ -1428,7 +1428,7 @@ vc-git-grep >> nil nil 'grep-history) >> nil)) >> (t (let* ((regexp (grep-read-regexp)) >> - (files (grep-read-files regexp)) >> + (files (mapconcat #'shell-quote-argument (split-string (grep-read-files regexp)) " ")) >> (dir (read-directory-name "In directory: " >> nil default-directory t))) >> (list regexp files dir)))))) > > That's okay portability-wise, but why do you need split-string? > AFAIU, grep-read-files reads a single pattern, no? grep-read-files has support for grep-files-aliases which allows you to eg say 'cc' and have it expand to "*.cc *.cxx *.cpp *.C *.CC *.c++" It's also possible to enter multiple patterns using grep-read-files, although you have to do things like ^Q to get a space into the string. That might be worth fixing separately. Robert From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 15 15:26:25 2017 Received: (at 29303) by debbugs.gnu.org; 15 Nov 2017 20:26:25 +0000 Received: from localhost ([127.0.0.1]:42184 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eF4GP-0002Tb-Dn for submit@debbugs.gnu.org; Wed, 15 Nov 2017 15:26:25 -0500 Received: from eggs.gnu.org ([208.118.235.92]:38172) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eF4GO-0002TL-67 for 29303@debbugs.gnu.org; Wed, 15 Nov 2017 15:26:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eF4GF-0005Aa-UJ for 29303@debbugs.gnu.org; Wed, 15 Nov 2017 15:26:18 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 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]:36411) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eF4G5-00050t-Ed; Wed, 15 Nov 2017 15:26:05 -0500 Received: from [176.228.60.248] (port=1209 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1eF4G4-000312-52; Wed, 15 Nov 2017 15:26:05 -0500 Date: Wed, 15 Nov 2017 22:26:12 +0200 Message-Id: <83y3n7i90b.fsf@gnu.org> From: Eli Zaretskii To: Robert Pluim In-reply-to: <87tvxvnvog.fsf@gmail.com> (message from Robert Pluim on Wed, 15 Nov 2017 21:17:35 +0100) Subject: Re: bug#29303: 25.2; vc-git-grep should shell-escape FILES References: <87efoz983o.fsf@gmail.com> <83d14jjv5y.fsf@gnu.org> <87375fpehr.fsf@gmail.com> <837eurjoue.fsf@gnu.org> <87tvxvnvog.fsf@gmail.com> 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: -5.0 (-----) X-Debbugs-Envelope-To: 29303 Cc: 29303@debbugs.gnu.org, gus@inodes.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: -5.0 (-----) > From: Robert Pluim > Cc: 29303@debbugs.gnu.org, gus@inodes.org > Date: Wed, 15 Nov 2017 21:17:35 +0100 > > > That's okay portability-wise, but why do you need split-string? > > AFAIU, grep-read-files reads a single pattern, no? > > grep-read-files has support for grep-files-aliases which allows you to > eg say 'cc' and have it expand to "*.cc *.cxx *.cpp *.C *.CC *.c++" Ah. So we lose support of patterns with embedded whitespace in order to support the aliases? Is that desirable? From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 15 15:36:19 2017 Received: (at 29303) by debbugs.gnu.org; 15 Nov 2017 20:36:19 +0000 Received: from localhost ([127.0.0.1]:42191 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eF4Pz-0002iq-Hi for submit@debbugs.gnu.org; Wed, 15 Nov 2017 15:36:19 -0500 Received: from mail-wm0-f49.google.com ([74.125.82.49]:33994) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eF4Px-0002ie-9c for 29303@debbugs.gnu.org; Wed, 15 Nov 2017 15:36:17 -0500 Received: by mail-wm0-f49.google.com with SMTP id n74so23017375wmi.1 for <29303@debbugs.gnu.org>; Wed, 15 Nov 2017 12:36:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:gmane-reply-to-list:date:in-reply-to :message-id:user-agent:mime-version; bh=XdNsLVacgg3lD/yXrXrfSWO2IznWEGQFwsP0bnPBkEI=; b=eJuYEmplf42JWZqeQC3npWeUh7juLAQVN0h6ai58uAmMw7hUI61A5NpuGQv4UZbImR li4hepSP0mWlZ4ESmP9IrLeQtZnR3btBJ4udHUXGa2qgXBFbihHNcxeqpRSkXA9qjklo SFt8qWyJ0w/ZbZkamc4g9m2qQ88sGxU4rdkHlqSww77uT2zJPPN3Zd7FQPqUmhc6Xg+C FzXjQ5FuxklZ74o2ZLdG7bZoLLzt4n2/aobz90w2NN1o3V0ZqLKLH5A7t3zs/0BgRKHJ b3yGv9vd2rlPIG5sZiWN0Y97U6tGihX0IRtj5lmfU61NCQy3PkPiIQhIFXXFNmO1DaeL zPmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references :gmane-reply-to-list:date:in-reply-to:message-id:user-agent :mime-version; bh=XdNsLVacgg3lD/yXrXrfSWO2IznWEGQFwsP0bnPBkEI=; b=VEstHNdZu5wNlSudz0cMMBB5diMcYCXN+UqGCcgTyLH+OdrOLOjuwcSoT6WWMvJR1B XNRwezC6SKdk1W8KOevTh/bZEwSiplT7ZuUP+Sepa0U/7zvIEapyLrnPNPOoB0ExEZOe o+SyNq+d9JM2uPl6Jr9Qom6Wf6qU7/fPz8Rv0c8/M012ttovyOpr0QXxTW5SSt99eniR TWl2Ruzde7OKamjM0Pjs5v4nlGprrBwFEsXUz3zk2DKtmARibRAZUx/L5lGPc8cTj+Ip TOAI+7a8eW8kLKkT6QfLnI0sJdHpILSiZVDHk6UyvK0eBgkMs9noDKO9DV20LonjQgug glmw== X-Gm-Message-State: AJaThX6JZnp46l6tudLFN2yj6wM45rci06drZp4w1iQheIGT41d74JA8 Sz30dRzol/XUjpCC1Uhcb6Y= X-Google-Smtp-Source: AGs4zMaED/O54RngtRUgDAZa0rfuk6rAw/zG8XxwSWC/VA3uL5EyASc0xHcBrRDUfbzGF2a9RgdDkg== X-Received: by 10.80.221.199 with SMTP id x7mr17325839edk.180.1510778171401; Wed, 15 Nov 2017 12:36:11 -0800 (PST) Received: from rpluim ([2a01:e34:ecfc:a090:1874:a2a8:70da:f879]) by smtp.gmail.com with ESMTPSA id x38sm18539216edd.94.2017.11.15.12.36.10 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 15 Nov 2017 12:36:10 -0800 (PST) From: Robert Pluim To: Eli Zaretskii Subject: Re: bug#29303: 25.2; vc-git-grep should shell-escape FILES References: <87efoz983o.fsf@gmail.com> <83d14jjv5y.fsf@gnu.org> <87375fpehr.fsf@gmail.com> <837eurjoue.fsf@gnu.org> <87tvxvnvog.fsf@gmail.com> <83y3n7i90b.fsf@gnu.org> X-Debbugs-No-Ack: yes Gmane-Reply-To-List: yes Date: Wed, 15 Nov 2017 21:36:09 +0100 In-Reply-To: <83y3n7i90b.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 15 Nov 2017 22:26:12 +0200") Message-ID: <87lgj7nuti.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 29303 Cc: 29303@debbugs.gnu.org, gus@inodes.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.0 (/) Eli Zaretskii writes: >> From: Robert Pluim >> Cc: 29303@debbugs.gnu.org, gus@inodes.org >> Date: Wed, 15 Nov 2017 21:17:35 +0100 >> >> > That's okay portability-wise, but why do you need split-string? >> > AFAIU, grep-read-files reads a single pattern, no? >> >> grep-read-files has support for grep-files-aliases which allows you to >> eg say 'cc' and have it expand to "*.cc *.cxx *.cpp *.C *.CC *.c++" > > Ah. So we lose support of patterns with embedded whitespace in order > to support the aliases? Is that desirable? That's a good question. Note that interactively entering patterns with a space is currently a pain, since grep-read-files uses read-file-name-internal, which attempts to do completion if you type . So this would presumably only affect people who have changed grep-files-aliases and have patterns with embedded whitespace. Robert From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 16 10:38:23 2017 Received: (at 29303) by debbugs.gnu.org; 16 Nov 2017 15:38:23 +0000 Received: from localhost ([127.0.0.1]:43725 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eFMFD-0002Of-2u for submit@debbugs.gnu.org; Thu, 16 Nov 2017 10:38:23 -0500 Received: from eggs.gnu.org ([208.118.235.92]:49066) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eFMFB-0002OQ-6W for 29303@debbugs.gnu.org; Thu, 16 Nov 2017 10:38:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eFMF5-0005nm-1G for 29303@debbugs.gnu.org; Thu, 16 Nov 2017 10:38:15 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:53763) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eFMEv-0005H6-7L; Thu, 16 Nov 2017 10:38:05 -0500 Received: from [176.228.60.248] (port=1842 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1eFMEu-0002FN-OO; Thu, 16 Nov 2017 10:38:05 -0500 Date: Thu, 16 Nov 2017 17:38:20 +0200 Message-Id: <83vaiai68j.fsf@gnu.org> From: Eli Zaretskii To: Robert Pluim In-reply-to: <87lgj7nuti.fsf@gmail.com> (message from Robert Pluim on Wed, 15 Nov 2017 21:36:09 +0100) Subject: Re: bug#29303: 25.2; vc-git-grep should shell-escape FILES References: <87efoz983o.fsf@gmail.com> <83d14jjv5y.fsf@gnu.org> <87375fpehr.fsf@gmail.com> <837eurjoue.fsf@gnu.org> <87tvxvnvog.fsf@gmail.com> <83y3n7i90b.fsf@gnu.org> <87lgj7nuti.fsf@gmail.com> 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: -5.0 (-----) X-Debbugs-Envelope-To: 29303 Cc: 29303@debbugs.gnu.org, gus@inodes.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: -5.0 (-----) > From: Robert Pluim > Cc: 29303@debbugs.gnu.org, gus@inodes.org > Date: Wed, 15 Nov 2017 21:36:09 +0100 > > > Ah. So we lose support of patterns with embedded whitespace in order > > to support the aliases? Is that desirable? > > That's a good question. Note that interactively entering patterns with > a space is currently a pain, since grep-read-files uses > read-file-name-internal, which attempts to do completion if you type > . So this would presumably only affect people who have changed > grep-files-aliases and have patterns with embedded whitespace. Maybe we should mention this in the doc string (assuming that your proposal indeed fixes the original problem). From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 16 10:43:28 2017 Received: (at 29303) by debbugs.gnu.org; 16 Nov 2017 15:43:28 +0000 Received: from localhost ([127.0.0.1]:43733 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eFMK8-0002WT-AK for submit@debbugs.gnu.org; Thu, 16 Nov 2017 10:43:28 -0500 Received: from mail-wr0-f180.google.com ([209.85.128.180]:43069) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eFMK6-0002WD-NS for 29303@debbugs.gnu.org; Thu, 16 Nov 2017 10:43:27 -0500 Received: by mail-wr0-f180.google.com with SMTP id 4so23210274wrt.0 for <29303@debbugs.gnu.org>; Thu, 16 Nov 2017 07:43:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:gmane-reply-to-list:date:in-reply-to :message-id:user-agent:mime-version; bh=XX273lVeXF8gKxMqrfN1CocQa3mRemGFkmcdU19GvFI=; b=F5x62C7lNxOcEhq1M3NUIDk7ncWQYEGn6piQZt9cXA0D1RNkAI8z1mg0CWA786UsUe vEfMSsx7lsCdAN49nHeJb+Ii8N+4R16ZYiAiPHdgOYf+ss7K+KCWBHSnvViRhy/8NxGq K2qHdiKaHUVf4i1lomQvaeFLQvWD5rue1GVL6gQWflpyrmKtsAe1dseKuOsK53phYGQ/ gzoc/NBLCl9qckXx3jt6gIK4ZxHBskQUtuRs9U2HuZb5/zV35Kmwt/7+XqyezQfe7Qly 5KzLcH5HAtCgw59DuwLHVz6X2bAsgPUYcUEIo15A9tJDapo2J/FEQCg8mG2EfPoEN4ct b10Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references :gmane-reply-to-list:date:in-reply-to:message-id:user-agent :mime-version; bh=XX273lVeXF8gKxMqrfN1CocQa3mRemGFkmcdU19GvFI=; b=bDPOo2GVC348ONCcTtIghcSuUHMZLvwWtXbSCxmesmJkKwgjp5tHj27kTF8OVAOqMk 6pAhdauJWqxhbk3b5Us1Tqj/2w+GY+6Zpb+II91p2ai3T9W3w+we+beRBC9Pgiztj2K8 60aPIXTvJvCviMvnUKeDzJV1jjZByqtOL0INAPTMFtM6C5VkFbCUEDRS9YUAPWbRA69Y r69P7TvKLHTS9Clsx7FKcY/jeUIN+UUvuuwPhfhvo0J20XUZ1OcwMGvkrj5eTNp+g4zB nWZYP/zBVHG6O+1qo9lS1p/MnpYRpETVW+i/u3rwPbZyMOyJcgnTyNHWoHn0+QDhMO2r HzOQ== X-Gm-Message-State: AJaThX5f6suTcnGbMkuyoIjLB6lLZiH8pcnbmdWJIFgY+lzmKCtSnmiJ P5dMP1WQJxNGakMAL48Wl5E= X-Google-Smtp-Source: AGs4zMaWmWRnrlBx67KnncKRMcJisX3bYoJBY2vXe1fVSVaA1UrJIIcRAlx6kXwmSRdEOxGwfLFvCg== X-Received: by 10.223.187.3 with SMTP id r3mr1789528wrg.34.1510847000880; Thu, 16 Nov 2017 07:43:20 -0800 (PST) Received: from rpluim ([2a01:e34:ecfc:a090:1874:a2a8:70da:f879]) by smtp.gmail.com with ESMTPSA id b105sm976224wrd.69.2017.11.16.07.43.19 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 16 Nov 2017 07:43:19 -0800 (PST) From: Robert Pluim To: Eli Zaretskii Subject: Re: bug#29303: 25.2; vc-git-grep should shell-escape FILES References: <87efoz983o.fsf@gmail.com> <83d14jjv5y.fsf@gnu.org> <87375fpehr.fsf@gmail.com> <837eurjoue.fsf@gnu.org> <87tvxvnvog.fsf@gmail.com> <83y3n7i90b.fsf@gnu.org> <87lgj7nuti.fsf@gmail.com> <83vaiai68j.fsf@gnu.org> X-Debbugs-No-Ack: yes Gmane-Reply-To-List: yes Date: Thu, 16 Nov 2017 16:43:19 +0100 In-Reply-To: <83vaiai68j.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 16 Nov 2017 17:38:20 +0200") Message-ID: <87d14insa0.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 29303 Cc: 29303@debbugs.gnu.org, gus@inodes.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: -2.8 (--) Eli Zaretskii writes: >> From: Robert Pluim >> Cc: 29303@debbugs.gnu.org, gus@inodes.org >> Date: Wed, 15 Nov 2017 21:36:09 +0100 >> >> > Ah. So we lose support of patterns with embedded whitespace in order >> > to support the aliases? Is that desirable? >> >> That's a good question. Note that interactively entering patterns with >> a space is currently a pain, since grep-read-files uses >> read-file-name-internal, which attempts to do completion if you type >> . So this would presumably only affect people who have changed >> grep-files-aliases and have patterns with embedded whitespace. > > Maybe we should mention this in the doc string (assuming that your > proposal indeed fixes the original problem). It fixes my test case, at least. Gus, have you had a chance to try the second patch? Thanks Robert From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 16 10:55:38 2017 Received: (at 29303) by debbugs.gnu.org; 16 Nov 2017 15:55:38 +0000 Received: from localhost ([127.0.0.1]:43742 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eFMVt-0002oS-QH for submit@debbugs.gnu.org; Thu, 16 Nov 2017 10:55:37 -0500 Received: from mx2.suse.de ([195.135.220.15]:50098) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eFMVs-0002oK-8X for 29303@debbugs.gnu.org; Thu, 16 Nov 2017 10:55:36 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id B1BE1ABA2; Thu, 16 Nov 2017 15:55:34 +0000 (UTC) From: Andreas Schwab To: Eli Zaretskii Subject: Re: bug#29303: 25.2; vc-git-grep should shell-escape FILES References: <87efoz983o.fsf@gmail.com> <83d14jjv5y.fsf@gnu.org> <87375fpehr.fsf@gmail.com> <837eurjoue.fsf@gnu.org> X-Yow: With YOU, I can be MYSELF.. We don't NEED Dan Rather.. Date: Thu, 16 Nov 2017 16:55:33 +0100 In-Reply-To: <837eurjoue.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 15 Nov 2017 21:58:49 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 29303 Cc: Robert Pluim , 29303@debbugs.gnu.org, gus@inodes.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: -2.3 (--) On Nov 15 2017, Eli Zaretskii wrote: > AFAIU, grep-read-files reads a single pattern, no? All current uses of grep-read-files either use split-string or pass it unquoted to the shell. 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." From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 17 02:13:22 2017 Received: (at 29303) by debbugs.gnu.org; 17 Nov 2017 07:13:22 +0000 Received: from localhost ([127.0.0.1]:44138 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eFaq1-0004zs-Qd for submit@debbugs.gnu.org; Fri, 17 Nov 2017 02:13:21 -0500 Received: from mail-yb0-f177.google.com ([209.85.213.177]:40930) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eFaq0-0004zg-D3 for 29303@debbugs.gnu.org; Fri, 17 Nov 2017 02:13:20 -0500 Received: by mail-yb0-f177.google.com with SMTP id d59so372957ybi.7 for <29303@debbugs.gnu.org>; Thu, 16 Nov 2017 23:13:20 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=t6aIhVNshsZtEtpxV3LjA/cVWwf2LRyXkkZF/27cDIU=; b=E5cRNlJ8whzItBWVKBgP/YRb14PAru4l+QfejGbPr29itkvwgtRd8iacxms9+D9ZQR 3QZCofWdPM8qwIWfqIawSgxXkuf/lDH3B2wuJyXqdX5dUVX0Ko4QHPNHkWDFsUJ6mb23 3qDUm/XCbpeujy9ak/CVo+bYhsboTRFelTtkPhz63I4F7hafWJo6MH8lM4AxbTNUcCdb J7D2m/nnxnw8wC7wpWi5Q2qa1sSXu3Dbs4o9Mum0nco11OyD2BIPVkuPGpa8TsvHwsXD Fkx9QksEvq12VEnaf8y5gktVLFAXyLh8zghBx2nxVuKHrOUg4MUGzacDvBT5PNDjMDXs ebEA== X-Gm-Message-State: AJaThX5LxxH/3MmQbZ4Ptbtbn6kQ5xxLB/SU1zSa+pIFfiQQwB4XpD3t RPQkSPPx9LpiOD71FAUUG5yX656yDlvVntrJLnU= X-Google-Smtp-Source: AGs4zMYNkBMB/mHe/GucoOO01tPFe441+JBIEMZaC8u4uDDAVtqdDeRXxpDAAPZ42FJ9RQmvvx9nmqe1GRJhILnwcr4= X-Received: by 10.37.61.68 with SMTP id k65mr2191887yba.84.1510902794825; Thu, 16 Nov 2017 23:13:14 -0800 (PST) MIME-Version: 1.0 References: <87efoz983o.fsf@gmail.com> <83d14jjv5y.fsf@gnu.org> <87375fpehr.fsf@gmail.com> <837eurjoue.fsf@gnu.org> <87tvxvnvog.fsf@gmail.com> <83y3n7i90b.fsf@gnu.org> <87lgj7nuti.fsf@gmail.com> <83vaiai68j.fsf@gnu.org> <87d14insa0.fsf@gmail.com> In-Reply-To: <87d14insa0.fsf@gmail.com> From: Angus Lees Date: Fri, 17 Nov 2017 07:13:04 +0000 Message-ID: Subject: Re: bug#29303: 25.2; vc-git-grep should shell-escape FILES To: Robert Pluim Content-Type: multipart/alternative; boundary="001a114c7a9860370d055e287874" X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 29303 Cc: Eli Zaretskii , 29303@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.2 (/) --001a114c7a9860370d055e287874 Content-Type: text/plain; charset="UTF-8" On Fri, 17 Nov 2017 at 02:43 Robert Pluim wrote: > It fixes my test case, at least. Gus, have you had a chance to try the > second patch? Yes, works exactly as I'd hoped :) (tried both with a literal (default) value and a value from `grep-file-aliases`) Thanks for the swift responses - I will be happy indeed to be able to just hit RET at that prompt instead of always having to manually escape the glob. - Gus --001a114c7a9860370d055e287874 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Fri, 17 Nov= 2017 at 02:43 Robert Pluim <rpluim@= gmail.com> wrote:
It fixes= my test case, at least. Gus, have you had a chance to try the
second patch?

Yes, works exactly as I'd= hoped :)
(tried both with a literal (default) value and a value = from `grep-file-aliases`)

Thanks for the swift res= ponses - I will be happy indeed to be able to just hit RET at that prompt i= nstead of always having to manually escape the glob.

=C2=A0- Gus
--001a114c7a9860370d055e287874-- From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 17 03:38:43 2017 Received: (at 29303) by debbugs.gnu.org; 17 Nov 2017 08:38:43 +0000 Received: from localhost ([127.0.0.1]:44169 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eFcAd-0006zg-I8 for submit@debbugs.gnu.org; Fri, 17 Nov 2017 03:38:43 -0500 Received: from mail-wm0-f53.google.com ([74.125.82.53]:36910) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eFcAc-0006zS-1O for 29303@debbugs.gnu.org; Fri, 17 Nov 2017 03:38:42 -0500 Received: by mail-wm0-f53.google.com with SMTP id v186so4800045wma.2 for <29303@debbugs.gnu.org>; Fri, 17 Nov 2017 00:38:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:gmane-reply-to-list:date:in-reply-to :message-id:user-agent:mime-version; bh=+pZmObJuXS35zuvV3XzXMRZ+s+WWACuzXmQ7kAzubtc=; b=hREiIxM49SsVHT0eaXvNmy41PPnoX7Av/JfPbrORfOdF8yqm9oSJtYvoHGBT44xtAl DCkIRcyO1hUmATBn2A+/6PUBdWAebrTevuo6vq/YrpTPgW4e/Z/kyosMspVhaih5L2cm 3sAB376gc3aVp8VA9/0W8rEbOzwVUa+5zs5aOCSH86Qn3dwGZ0sCLyEcAiYrdFB9qoFJ dsh7eIB2D9EER9gJVxRQVv1j2dIFS++R0Ben8VTKsz+9f3BeeZMgX+njT8fO5aj1bfWA OayfLW04SwvRBHg60+OoKlg+l7dzsZm4SJMibRVIp4ACzgiy9ahyw5/Y28vCmk36rEJ2 CaSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references :gmane-reply-to-list:date:in-reply-to:message-id:user-agent :mime-version; bh=+pZmObJuXS35zuvV3XzXMRZ+s+WWACuzXmQ7kAzubtc=; b=HAgw35LkQ3ktRBSxYaJpyLIFWqvU3zdTF7OzpPKldhFQ17rg6YbeGsu74RcBdmC4xL XjJV05BefW4WSo2AxW+OU3wt24zGO44x0ATSb4agBp8UY0cJEScK/ZpPZXBh86h7Nc+X wvsE0ErdXMhNbIQ90CJbBlkTvKS9n9A+R0XFEMW87mAEESey/1GFgayEhHKBDw5sXLrY gDXZL+FDLdnEbCFNBSRaHn2J24Cu+4j+82PMmxx5uza+PHUnUQrn9tBiB9eoPjdPIoZS IJ7iheRsuXGIjpsmjFqamvH9c54AcqpZV+ib3akLu1i/kw5gIRsHlX0B5XtYp9SztZmJ 2wjQ== X-Gm-Message-State: AJaThX50y0lgY8itOL3NcL7yvhCFLl63Tjo7aUgNO1i/VXexCo897kSU 0UlsMQw2/j6rSvqTA4Cs7Zs= X-Google-Smtp-Source: AGs4zMZt3xCvaGvQTQyGk/H55ytHcaOqFecXFQFeOVC+6HKj9108/1AKpNSmJ+WPp+fyVcc22OXkSg== X-Received: by 10.80.213.90 with SMTP id f26mr6450725edj.225.1510907916054; Fri, 17 Nov 2017 00:38:36 -0800 (PST) Received: from rpluim ([149.5.228.1]) by smtp.gmail.com with ESMTPSA id z102sm2212744ede.85.2017.11.17.00.38.34 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 17 Nov 2017 00:38:35 -0800 (PST) From: Robert Pluim To: Eli Zaretskii Subject: Re: bug#29303: 25.2; vc-git-grep should shell-escape FILES References: <87efoz983o.fsf@gmail.com> <83d14jjv5y.fsf@gnu.org> <87375fpehr.fsf@gmail.com> <837eurjoue.fsf@gnu.org> <87tvxvnvog.fsf@gmail.com> <83y3n7i90b.fsf@gnu.org> <87lgj7nuti.fsf@gmail.com> <83vaiai68j.fsf@gnu.org> X-Debbugs-No-Ack: yes Gmane-Reply-To-List: yes Date: Fri, 17 Nov 2017 09:38:33 +0100 In-Reply-To: <83vaiai68j.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 16 Nov 2017 17:38:20 +0200") Message-ID: <878tf5nvue.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 29303 Cc: 29303@debbugs.gnu.org, gus@inodes.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.0 (/) Eli Zaretskii writes: >> From: Robert Pluim >> That's a good question. Note that interactively entering patterns with >> a space is currently a pain, since grep-read-files uses >> read-file-name-internal, which attempts to do completion if you type >> . So this would presumably only affect people who have changed >> grep-files-aliases and have patterns with embedded whitespace. > > Maybe we should mention this in the doc string For vc-git-grep, or for every function that uses grep-read-files? Robert From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 17 04:06:48 2017 Received: (at 29303) by debbugs.gnu.org; 17 Nov 2017 09:06:48 +0000 Received: from localhost ([127.0.0.1]:44191 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eFcbn-0007eK-Qy for submit@debbugs.gnu.org; Fri, 17 Nov 2017 04:06:48 -0500 Received: from eggs.gnu.org ([208.118.235.92]:38172) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eFcbm-0007e8-5n for 29303@debbugs.gnu.org; Fri, 17 Nov 2017 04:06:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eFcbd-0006ez-1x for 29303@debbugs.gnu.org; Fri, 17 Nov 2017 04:06:41 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:42051) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eFcbS-0006Zy-VG; Fri, 17 Nov 2017 04:06:26 -0500 Received: from [176.228.60.248] (port=2746 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1eFcbR-0001D9-Iw; Fri, 17 Nov 2017 04:06:26 -0500 Date: Fri, 17 Nov 2017 11:06:09 +0200 Message-Id: <83375di8am.fsf@gnu.org> From: Eli Zaretskii To: Robert Pluim In-reply-to: <878tf5nvue.fsf@gmail.com> (message from Robert Pluim on Fri, 17 Nov 2017 09:38:33 +0100) Subject: Re: bug#29303: 25.2; vc-git-grep should shell-escape FILES References: <87efoz983o.fsf@gmail.com> <83d14jjv5y.fsf@gnu.org> <87375fpehr.fsf@gmail.com> <837eurjoue.fsf@gnu.org> <87tvxvnvog.fsf@gmail.com> <83y3n7i90b.fsf@gnu.org> <87lgj7nuti.fsf@gmail.com> <83vaiai68j.fsf@gnu.org> <878tf5nvue.fsf@gmail.com> 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: -5.0 (-----) X-Debbugs-Envelope-To: 29303 Cc: 29303@debbugs.gnu.org, gus@inodes.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: -5.0 (-----) > From: Robert Pluim > Cc: 29303@debbugs.gnu.org, gus@inodes.org > Date: Fri, 17 Nov 2017 09:38:33 +0100 > > Eli Zaretskii writes: > > >> From: Robert Pluim > >> That's a good question. Note that interactively entering patterns with > >> a space is currently a pain, since grep-read-files uses > >> read-file-name-internal, which attempts to do completion if you type > >> . So this would presumably only affect people who have changed > >> grep-files-aliases and have patterns with embedded whitespace. > > > > Maybe we should mention this in the doc string > > For vc-git-grep, or for every function that uses grep-read-files? The latter, I think. If there are too many of those callers, then we could describe this once, say in grep-read-files, and then reference that, with something like Including whitespace in the pattern requires quoting, see `grep-read-files' for the details. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 17 04:55:08 2017 Received: (at 29303) by debbugs.gnu.org; 17 Nov 2017 09:55:08 +0000 Received: from localhost ([127.0.0.1]:44247 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eFdMa-0000Kz-BL for submit@debbugs.gnu.org; Fri, 17 Nov 2017 04:55:08 -0500 Received: from mail-wm0-f44.google.com ([74.125.82.44]:44576) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eFdMZ-0000Kd-B8 for 29303@debbugs.gnu.org; Fri, 17 Nov 2017 04:55:07 -0500 Received: by mail-wm0-f44.google.com with SMTP id r68so5263547wmr.3 for <29303@debbugs.gnu.org>; Fri, 17 Nov 2017 01:55:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:gmane-reply-to-list:date:in-reply-to :message-id:user-agent:mime-version; bh=AZ6uNwpfg7njP4EnRJAzpCEy/Bakkk5+o8EbyJxZBf0=; b=ireAXf0S4dzzni7gNcbbFozYZBG2VWWiZQ3ZPQVX4hId0LqrUTshDuuSleqxVRFdMq hSnv8InwtAOMikMV9zEP3uzo/jT/cNglRJOvybFU03k4De4F6ZCjL24Z7kVFULKPxL3H 168qiXCbpBTX0e6Q+VInk9tMygVhJsx0++ud6wJOOboXMevu4nbtXD/R4Mrql3qFf9EN ZwqgGcRRdX66n7mtQsfCeM5/8A1YJVKuUBlFIrmQSdKMEVa9QSaV6o6lHW7IwEnGuFuT umzw+fzDOc8rz2BdX2WPHS90fIIueNw5uwT860iMJa4fYES+QbMFVtnLqo0/J/RzdxVr epsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references :gmane-reply-to-list:date:in-reply-to:message-id:user-agent :mime-version; bh=AZ6uNwpfg7njP4EnRJAzpCEy/Bakkk5+o8EbyJxZBf0=; b=fGLETANE22GVUpMtTbLyErlmpOgK/Tsyl2G/qq7VStm2Rpx/uEndOwcOrwQ4exKojh Tz2G/OjULutp5RmO984vAucnJPwDwLzQdV7SUSLCy7EhTSSZxfaYlWTMuaacj8LB0+MZ ricbkxNa9vMfO/+oMAbkHZdthmUOjy7tu1q32jcSICBlNrasFdJIYaG3K21z8Q9aKm+d GIwes7USft9ver+Fo5/RLiwfGHV6vMOfw91WZKtNlc9jTxN2f0DpAituGIClgDDOBbaE 1r0OfhqGnOSYuaTeltlvsNncazS1ku2tYcorq+V8OTNp63E4WZKzMZS431ZPpPVHddN9 HcfQ== X-Gm-Message-State: AJaThX7R6FdqmnpD8IuoQwCEyIQZeh/dpz3BfkIvv/XB/iFZw4vEe8QE dWUkgtcJZFan3+6SzQ5eEcs= X-Google-Smtp-Source: AGs4zMZLjO88JPMuLZJL+BamRtKHeiA+7f7FhLa8hNgG/yFXjZ3zeRIXcVL/3QNeMZRXh5BCnBz2Wg== X-Received: by 10.80.131.38 with SMTP id 35mr6702615edh.291.1510912501391; Fri, 17 Nov 2017 01:55:01 -0800 (PST) Received: from rpluim ([149.5.228.1]) by smtp.gmail.com with ESMTPSA id 30sm2145064edz.42.2017.11.17.01.54.59 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 17 Nov 2017 01:55:00 -0800 (PST) From: Robert Pluim To: Eli Zaretskii Subject: Re: bug#29303: 25.2; vc-git-grep should shell-escape FILES References: <87efoz983o.fsf@gmail.com> <83d14jjv5y.fsf@gnu.org> <87375fpehr.fsf@gmail.com> <837eurjoue.fsf@gnu.org> <87tvxvnvog.fsf@gmail.com> <83y3n7i90b.fsf@gnu.org> <87lgj7nuti.fsf@gmail.com> <83vaiai68j.fsf@gnu.org> <878tf5nvue.fsf@gmail.com> <83375di8am.fsf@gnu.org> X-Debbugs-No-Ack: yes Gmane-Reply-To-List: yes Date: Fri, 17 Nov 2017 10:54:59 +0100 In-Reply-To: <83375di8am.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 17 Nov 2017 11:06:09 +0200") Message-ID: <878tf5fcwc.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 29303 Cc: 29303@debbugs.gnu.org, gus@inodes.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.0 (/) --=-=-= Content-Type: text/plain Eli Zaretskii writes: >> From: Robert Pluim >> For vc-git-grep, or for every function that uses grep-read-files? > > The latter, I think. If there are too many of those callers, then we > could describe this once, say in grep-read-files, and then reference > that, with something like > > Including whitespace in the pattern requires quoting, see > `grep-read-files' for the details. There are only 4 such (5 if you count zrgrep, which basically says 'see rgrep') and the addition is small, so I documented it in the callers, and in grep-read-files. Robert --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Explain-how-to-enter-whitespace-when-using-grep-read.patch >From 2b0535557316518ea75945e0e7b20576b2bbea47 Mon Sep 17 00:00:00 2001 From: Robert Pluim Date: Fri, 17 Nov 2017 10:51:26 +0100 Subject: [PATCH] Explain how to enter whitespace when using grep-read-files * lisp/progmodes/grep.el (lgrep): Explain how to enter whitespace when using grep-read-files. (rgrep): Likewise. (grep-read-files): Likewise. * lisp/progmodes/project.el (project-find-regexp): Likewise. * lisp/vc/vc-git.el (vc-git-grep): Likewise. --- lisp/progmodes/grep.el | 12 +++++++++--- lisp/progmodes/project.el | 6 +++++- lisp/vc/vc-git.el | 4 +++- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index d0404fdeaf..56aef15a08 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el @@ -904,7 +904,9 @@ grep-read-regexp (defun grep-read-files (regexp) "Read a file-name pattern arg for interactive grep. -The pattern can include shell wildcards." +The pattern can include shell wildcards. As whitespace triggers +completion when entering a pattern, including it requires +quoting, eg `\C-q'." (let* ((bn (or (buffer-file-name) (replace-regexp-in-string "<[0-9]+>\\'" "" (buffer-name)))) (fn (and bn @@ -954,7 +956,9 @@ lgrep "Run grep, searching for REGEXP in FILES in directory DIR. The search is limited to file names matching shell pattern FILES. FILES may use abbreviations defined in `grep-files-aliases', e.g. -entering `ch' is equivalent to `*.[ch]'. +entering `ch' is equivalent to `*.[ch]'. As whitespace triggers +completion when entering a pattern, including it requires +quoting, eg `\C-q'. With \\[universal-argument] prefix, you can edit the constructed shell command line before it is executed. @@ -1032,7 +1036,9 @@ rgrep "Recursively grep for REGEXP in FILES in directory tree rooted at DIR. The search is limited to file names matching shell pattern FILES. FILES may use abbreviations defined in `grep-files-aliases', e.g. -entering `ch' is equivalent to `*.[ch]'. +entering `ch' is equivalent to `*.[ch]'. As whitespace triggers +completion when entering a pattern, including it requires +quoting, eg `\C-q'. With \\[universal-argument] prefix, you can edit the constructed shell command line before it is executed. diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index 9dc0da4ad5..06f5aa5c94 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -307,7 +307,11 @@ project--value-in-dir (defun project-find-regexp (regexp) "Find all matches for REGEXP in the current project's roots. With \\[universal-argument] prefix, you can specify the directory -to search in, and the file name pattern to search for." +to search in, and the file name pattern to search for. The +pattern may use abbreviations defined in `grep-files-aliases', +e.g. entering `ch' is equivalent to `*.[ch]'. As whitespace +triggers completion when entering a pattern, including it +requires quoting, eg `\C-q'." (interactive (list (project--read-regexp))) (let* ((pr (project-current t)) (dirs (if current-prefix-arg diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 43164b4fcf..eaa31c5def 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -1407,7 +1407,9 @@ vc-git-grep "Run git grep, searching for REGEXP in FILES in directory DIR. The search is limited to file names matching shell pattern FILES. FILES may use abbreviations defined in `grep-files-aliases', e.g. -entering `ch' is equivalent to `*.[ch]'. +entering `ch' is equivalent to `*.[ch]'. As whitespace triggers +completion when entering a pattern, including it requires +quoting, eg `\C-q'. With \\[universal-argument] prefix, you can edit the constructed shell command line before it is executed. -- 2.15.0.276.g89ea799ff --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 17 05:14:19 2017 Received: (at 29303) by debbugs.gnu.org; 17 Nov 2017 10:14:20 +0000 Received: from localhost ([127.0.0.1]:44303 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eFdf9-0000r8-OM for submit@debbugs.gnu.org; Fri, 17 Nov 2017 05:14:19 -0500 Received: from eggs.gnu.org ([208.118.235.92]:54004) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eFdf8-0000qv-Hx for 29303@debbugs.gnu.org; Fri, 17 Nov 2017 05:14:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eFdf2-0000Uu-GH for 29303@debbugs.gnu.org; Fri, 17 Nov 2017 05:14:13 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_05,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:43971) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eFdes-0000HE-Qn; Fri, 17 Nov 2017 05:14:02 -0500 Received: from [176.228.60.248] (port=2848 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1eFdes-0003JB-5k; Fri, 17 Nov 2017 05:14:02 -0500 Date: Fri, 17 Nov 2017 12:13:46 +0200 Message-Id: <83wp2pgqlh.fsf@gnu.org> From: Eli Zaretskii To: Robert Pluim In-reply-to: <878tf5fcwc.fsf@gmail.com> (message from Robert Pluim on Fri, 17 Nov 2017 10:54:59 +0100) Subject: Re: bug#29303: 25.2; vc-git-grep should shell-escape FILES References: <87efoz983o.fsf@gmail.com> <83d14jjv5y.fsf@gnu.org> <87375fpehr.fsf@gmail.com> <837eurjoue.fsf@gnu.org> <87tvxvnvog.fsf@gmail.com> <83y3n7i90b.fsf@gnu.org> <87lgj7nuti.fsf@gmail.com> <83vaiai68j.fsf@gnu.org> <878tf5nvue.fsf@gmail.com> <83375di8am.fsf@gnu.org> <878tf5fcwc.fsf@gmail.com> 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: -5.0 (-----) X-Debbugs-Envelope-To: 29303 Cc: 29303@debbugs.gnu.org, gus@inodes.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: -5.0 (-----) > From: Robert Pluim > Cc: 29303@debbugs.gnu.org, gus@inodes.org > Date: Fri, 17 Nov 2017 10:54:59 +0100 > > >> For vc-git-grep, or for every function that uses grep-read-files? > > > > The latter, I think. If there are too many of those callers, then we > > could describe this once, say in grep-read-files, and then reference > > that, with something like > > > > Including whitespace in the pattern requires quoting, see > > `grep-read-files' for the details. > > There are only 4 such (5 if you count zrgrep, which basically says > 'see rgrep') and the addition is small, so I documented it in the > callers, and in grep-read-files. Thanks, this is fine, except that please use \\[quoted-insert] instead of a literal \C-q, to DTRT when quoted-insert is rebound to some other key. From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 17 05:33:17 2017 Received: (at 29303) by debbugs.gnu.org; 17 Nov 2017 10:33:17 +0000 Received: from localhost ([127.0.0.1]:44330 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eFdxV-0001Jl-Iw for submit@debbugs.gnu.org; Fri, 17 Nov 2017 05:33:17 -0500 Received: from mail-wr0-f181.google.com ([209.85.128.181]:33956) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eFdxU-0001JT-1J for 29303@debbugs.gnu.org; Fri, 17 Nov 2017 05:33:16 -0500 Received: by mail-wr0-f181.google.com with SMTP id u97so1709776wrc.1 for <29303@debbugs.gnu.org>; Fri, 17 Nov 2017 02:33:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:gmane-reply-to-list:date:in-reply-to :message-id:user-agent:mime-version; bh=PbExS/WPjhgO+LOLC/+BIOJIHbGEihFJ0og8r9BVikA=; b=qgCsgHurYnCvhsz69PUGnrZHnvBNVpvzLjQk5MEC7FraC/oDyZbnMFo1AOJTPQPusX fUhtovawC29ixz9MNdW7KABxYLjAoqx0A2WVPi8qMyshFOYvwlNkg0SULjsXwt2ovFVJ BGhWTycf8stsbb/G7lHvnM6nydGGnLg7hP4RqKRBKmr35JmjEtUmeXUAG0A6TbH74Pg0 L4pc9AGDGH6S1q8FthxwDsIwyVNvGXttkE52m5Ww+Pp/k31kKbkepQ/WVnTBsliCXr4z RYJ3+SgdLgk7EDoQD2biGDtJIEdXJ2q2zl8epuiUFdJ4gQM4fGlyqkyra+Kxe4xm6eGz C9ZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references :gmane-reply-to-list:date:in-reply-to:message-id:user-agent :mime-version; bh=PbExS/WPjhgO+LOLC/+BIOJIHbGEihFJ0og8r9BVikA=; b=lMETphMBSc2oHSdYs0dG6865cdF7huTr3IvjZ6/OVn6OLxbcvsXluKAdSMt37Xlqnt ZWDA6vppO02AvYha0pCiWlpLao0s2uO2RIsy2MDdmhPTE5ks/Zl9xgZOIS8DSnBrRmPn 4XN/d9nwPldXNrdx5/cpYuZlYONcid8I8tId4hQSCZ9oUAM3C/fYQVGl8kOgFKytL3Sb Wnijf40m8ZQ4l0pnwYoNIKrndvU6bgFrrGyxRBy1dXuDfrbptEslKBF3m0O/dFhxVVoY kaAbzFMlDKI5IJwCT06l555CZCgwexfQIJ2j2F9blrf6KMpQ8zyGFb6fzfYR09yZNhES 0CHQ== X-Gm-Message-State: AJaThX6tqksqzmIHDBBpXs5Dj82EHrldPI3HWwrQCENpB5et4KWMvpgG +8sgGTHWro4nHEZshWUDXvw= X-Google-Smtp-Source: AGs4zMZusK52kGrg+hqILif2RrlYt79EFUH302riCvdykh6waH06qwsPW8noCJEToLNC8QUWkxXZ4g== X-Received: by 10.223.143.66 with SMTP id p60mr3662662wrb.99.1510914790114; Fri, 17 Nov 2017 02:33:10 -0800 (PST) Received: from rpluim ([149.5.228.1]) by smtp.gmail.com with ESMTPSA id x63sm3443347wma.39.2017.11.17.02.33.08 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 17 Nov 2017 02:33:09 -0800 (PST) From: Robert Pluim To: Eli Zaretskii Subject: Re: bug#29303: 25.2; vc-git-grep should shell-escape FILES References: <87efoz983o.fsf@gmail.com> <83d14jjv5y.fsf@gnu.org> <87375fpehr.fsf@gmail.com> <837eurjoue.fsf@gnu.org> <87tvxvnvog.fsf@gmail.com> <83y3n7i90b.fsf@gnu.org> <87lgj7nuti.fsf@gmail.com> <83vaiai68j.fsf@gnu.org> <878tf5nvue.fsf@gmail.com> <83375di8am.fsf@gnu.org> <878tf5fcwc.fsf@gmail.com> <83wp2pgqlh.fsf@gnu.org> X-Debbugs-No-Ack: yes Gmane-Reply-To-List: yes Date: Fri, 17 Nov 2017 11:33:08 +0100 In-Reply-To: <83wp2pgqlh.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 17 Nov 2017 12:13:46 +0200") Message-ID: <87bmk1chzv.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 29303 Cc: 29303@debbugs.gnu.org, gus@inodes.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: -2.8 (--) --=-=-= Content-Type: text/plain Eli Zaretskii writes: > Thanks, this is fine, except that please use \\[quoted-insert] instead > of a literal \C-q, to DTRT when quoted-insert is rebound to some other > key. Attached. I fixed my laziness about 'e.g.' for good measure. I'm hoping this can make emacs-26. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Explain-how-to-enter-whitespace-when-using-grep-read.patch >From 69a68ceed22ab78c1f6d578c3ad9781f32b0f218 Mon Sep 17 00:00:00 2001 From: Robert Pluim Date: Fri, 17 Nov 2017 10:51:26 +0100 Subject: [PATCH] Explain how to enter whitespace when using grep-read-files * lisp/progmodes/grep.el (lgrep): Explain how to enter whitespace when using grep-read-files. (rgrep): Likewise. (grep-read-files): Likewise. * lisp/progmodes/project.el (project-find-regexp): Likewise. * lisp/vc/vc-git.el (vc-git-grep): Likewise. --- lisp/progmodes/grep.el | 12 +++++++++--- lisp/progmodes/project.el | 6 +++++- lisp/vc/vc-git.el | 4 +++- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index d0404fdeaf..c2d8022354 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el @@ -904,7 +904,9 @@ grep-read-regexp (defun grep-read-files (regexp) "Read a file-name pattern arg for interactive grep. -The pattern can include shell wildcards." +The pattern can include shell wildcards. As whitespace triggers +completion when entering a pattern, including it requires +quoting, e.g. `\\[quoted-insert]'." (let* ((bn (or (buffer-file-name) (replace-regexp-in-string "<[0-9]+>\\'" "" (buffer-name)))) (fn (and bn @@ -954,7 +956,9 @@ lgrep "Run grep, searching for REGEXP in FILES in directory DIR. The search is limited to file names matching shell pattern FILES. FILES may use abbreviations defined in `grep-files-aliases', e.g. -entering `ch' is equivalent to `*.[ch]'. +entering `ch' is equivalent to `*.[ch]'. As whitespace triggers +completion when entering a pattern, including it requires +quoting, e.g. `\\[quoted-insert]'. With \\[universal-argument] prefix, you can edit the constructed shell command line before it is executed. @@ -1032,7 +1036,9 @@ rgrep "Recursively grep for REGEXP in FILES in directory tree rooted at DIR. The search is limited to file names matching shell pattern FILES. FILES may use abbreviations defined in `grep-files-aliases', e.g. -entering `ch' is equivalent to `*.[ch]'. +entering `ch' is equivalent to `*.[ch]'. As whitespace triggers +completion when entering a pattern, including it requires +quoting, e.g. `\\[quoted-insert]'. With \\[universal-argument] prefix, you can edit the constructed shell command line before it is executed. diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index 9dc0da4ad5..2dc1d9a070 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -307,7 +307,11 @@ project--value-in-dir (defun project-find-regexp (regexp) "Find all matches for REGEXP in the current project's roots. With \\[universal-argument] prefix, you can specify the directory -to search in, and the file name pattern to search for." +to search in, and the file name pattern to search for. The +pattern may use abbreviations defined in `grep-files-aliases', +e.g. entering `ch' is equivalent to `*.[ch]'. As whitespace +triggers completion when entering a pattern, including it +requires quoting, e.g. `\\[quoted-insert]'." (interactive (list (project--read-regexp))) (let* ((pr (project-current t)) (dirs (if current-prefix-arg diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 43164b4fcf..bcb10a544f 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -1407,7 +1407,9 @@ vc-git-grep "Run git grep, searching for REGEXP in FILES in directory DIR. The search is limited to file names matching shell pattern FILES. FILES may use abbreviations defined in `grep-files-aliases', e.g. -entering `ch' is equivalent to `*.[ch]'. +entering `ch' is equivalent to `*.[ch]'. As whitespace triggers +completion when entering a pattern, including it requires +quoting, e.g. `\\[quoted-insert]'. With \\[universal-argument] prefix, you can edit the constructed shell command line before it is executed. -- 2.15.0.276.g89ea799ff --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 17 08:42:37 2017 Received: (at 29303) by debbugs.gnu.org; 17 Nov 2017 13:42:37 +0000 Received: from localhost ([127.0.0.1]:44399 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eFguj-0007eA-Hq for submit@debbugs.gnu.org; Fri, 17 Nov 2017 08:42:37 -0500 Received: from eggs.gnu.org ([208.118.235.92]:36977) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eFgui-0007dx-3P for 29303@debbugs.gnu.org; Fri, 17 Nov 2017 08:42:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eFguZ-0007Kj-Ly for 29303@debbugs.gnu.org; Fri, 17 Nov 2017 08:42:30 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:57960) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eFguL-0006r2-4y; Fri, 17 Nov 2017 08:42:13 -0500 Received: from [176.228.60.248] (port=2929 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1eFguJ-0004Vp-7P; Fri, 17 Nov 2017 08:42:13 -0500 Date: Fri, 17 Nov 2017 15:41:46 +0200 Message-Id: <83tvxtggyt.fsf@gnu.org> From: Eli Zaretskii To: Robert Pluim In-reply-to: <87bmk1chzv.fsf@gmail.com> (message from Robert Pluim on Fri, 17 Nov 2017 11:33:08 +0100) Subject: Re: bug#29303: 25.2; vc-git-grep should shell-escape FILES References: <87efoz983o.fsf@gmail.com> <83d14jjv5y.fsf@gnu.org> <87375fpehr.fsf@gmail.com> <837eurjoue.fsf@gnu.org> <87tvxvnvog.fsf@gmail.com> <83y3n7i90b.fsf@gnu.org> <87lgj7nuti.fsf@gmail.com> <83vaiai68j.fsf@gnu.org> <878tf5nvue.fsf@gmail.com> <83375di8am.fsf@gnu.org> <878tf5fcwc.fsf@gmail.com> <83wp2pgqlh.fsf@gnu.org> <87bmk1chzv.fsf@gmail.com> 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: -5.0 (-----) X-Debbugs-Envelope-To: 29303 Cc: 29303@debbugs.gnu.org, gus@inodes.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: -5.0 (-----) > From: Robert Pluim > Cc: 29303@debbugs.gnu.org, gus@inodes.org > Date: Fri, 17 Nov 2017 11:33:08 +0100 > > > Thanks, this is fine, except that please use \\[quoted-insert] instead > > of a literal \C-q, to DTRT when quoted-insert is rebound to some other > > key. > > Attached. I fixed my laziness about 'e.g.' for good measure. Thanks, pushed. > I'm hoping this can make emacs-26. Documentation changes are always okay for the release branch. From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 17 09:22:03 2017 Received: (at 29303) by debbugs.gnu.org; 17 Nov 2017 14:22:03 +0000 Received: from localhost ([127.0.0.1]:44409 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eFhWs-00005S-Sq for submit@debbugs.gnu.org; Fri, 17 Nov 2017 09:22:03 -0500 Received: from mail-wm0-f49.google.com ([74.125.82.49]:40723) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eFhWr-00004u-Op for 29303@debbugs.gnu.org; Fri, 17 Nov 2017 09:22:02 -0500 Received: by mail-wm0-f49.google.com with SMTP id b189so6679490wmd.5 for <29303@debbugs.gnu.org>; Fri, 17 Nov 2017 06:22:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:gmane-reply-to-list:date:in-reply-to :message-id:user-agent:mime-version; bh=w+Hr6OKDOUG8v1MZYUEH1UmxQyFqfGx0JyYRNL4bhQI=; b=kD1FnDb/OPg6OElxAEW0FK1e7GTiuzA7MsRLlQVdtz9/saoMknhsifG9/AIOkzBNvh fZTMWuOBnvLsH9ePXuqv63uegXaJAoht/BKUUgJmd6lJUgS/+za8ir4iHYyCE2CTyyad vsEiqzwaBFkNMXPKar2aS+zd4ZYlRRTECRfQRcVgMDQWgiYDMyDbBgv4znt6aysCjoGJ sD2p9v9v1aW0rVbW861GFpmHb/INECTtS0V3AqMfC7IHKqRKtNtexfoR4vA/j8Iax9bG +meftO0XGXoohML2zn2fxk0ifyGgWrK/mGyZETRZwtGeK8sB7uSKrALrmY6MjMkqS7sS mtIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references :gmane-reply-to-list:date:in-reply-to:message-id:user-agent :mime-version; bh=w+Hr6OKDOUG8v1MZYUEH1UmxQyFqfGx0JyYRNL4bhQI=; b=ihNBIMDdbnoCx8ibphGmeGWlp3UvWpi+FCsBLJB4rf+k+vEY8zocU5tJ1ExTwlGu1C cKvB9S3p0dcc8XA0orxOHwKn1jIe0sErqzAdOkgfY0SYudrzctRC/gEYw+5pU7ZzCfUK N8VcZE3Xbk294p7Y8w8FxWeFGgxbdP+/dl3mX/OXjik2vfe5JUF4h5+FN91ysef06kfX vnZO+HyIHQ5nZGHq6rxZGNfGWymfuknShQyIQ6XWOFM27ueBmcgukToD3ourh9f9ddeI hYdLTQ1inEg5MaIDbzj5Z+/E9mEPctnufFA5RkZWpYumlyFb3KM5DjIlPYbNpI9uenEY Qb0w== X-Gm-Message-State: AJaThX6qCu5BPqSKMMMbn1kKkGtrAmG99zVRjF09O8odU3Nl62sEdf0o yjQvtOB0VTLfE3MC7piobFw= X-Google-Smtp-Source: AGs4zMYHc4T0aSLHlkptiW9scnDR+LzY7zlAdcYm+tZw2Scc59yE9clt1k2qgvYXeecjEfVbgFyE8A== X-Received: by 10.80.173.227 with SMTP id b32mr7983301edd.65.1510928515832; Fri, 17 Nov 2017 06:21:55 -0800 (PST) Received: from rpluim-ubuntu ([149.5.228.1]) by smtp.gmail.com with ESMTPSA id u10sm2987763edm.56.2017.11.17.06.21.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Nov 2017 06:21:54 -0800 (PST) From: Robert Pluim To: Eli Zaretskii Subject: Re: bug#29303: 25.2; vc-git-grep should shell-escape FILES References: <87efoz983o.fsf@gmail.com> <83d14jjv5y.fsf@gnu.org> <87375fpehr.fsf@gmail.com> <837eurjoue.fsf@gnu.org> <87tvxvnvog.fsf@gmail.com> <83y3n7i90b.fsf@gnu.org> <87lgj7nuti.fsf@gmail.com> <83vaiai68j.fsf@gnu.org> <878tf5nvue.fsf@gmail.com> <83375di8am.fsf@gnu.org> <878tf5fcwc.fsf@gmail.com> <83wp2pgqlh.fsf@gnu.org> <87bmk1chzv.fsf@gmail.com> <83tvxtggyt.fsf@gnu.org> X-Debbugs-No-Ack: yes Gmane-Reply-To-List: yes Date: Fri, 17 Nov 2017 15:21:52 +0100 In-Reply-To: <83tvxtggyt.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 17 Nov 2017 15:41:46 +0200") Message-ID: <87h8ttyohr.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 29303 Cc: 29303@debbugs.gnu.org, gus@inodes.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.0 (/) Eli Zaretskii writes: >> From: Robert Pluim >> Cc: 29303@debbugs.gnu.org, gus@inodes.org >> Date: Fri, 17 Nov 2017 11:33:08 +0100 >> >> > Thanks, this is fine, except that please use \\[quoted-insert] instead >> > of a literal \C-q, to DTRT when quoted-insert is rebound to some other >> > key. >> >> Attached. I fixed my laziness about 'e.g.' for good measure. > > Thanks, pushed. > Thanks >> I'm hoping this can make emacs-26. > > Documentation changes are always okay for the release branch. I meant the patch to quote arguments to git grep, since that's fixing an actual problem, but it's a change in behaviour, so it might be too late for that. Robert From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 28 08:38:07 2017 Received: (at 29303) by debbugs.gnu.org; 28 Nov 2017 13:38:07 +0000 Received: from localhost ([127.0.0.1]:33620 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eJg5P-0004wR-DM for submit@debbugs.gnu.org; Tue, 28 Nov 2017 08:38:07 -0500 Received: from mail-wr0-f193.google.com ([209.85.128.193]:42326) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eJg5O-0004vu-N1 for 29303@debbugs.gnu.org; Tue, 28 Nov 2017 08:38:06 -0500 Received: by mail-wr0-f193.google.com with SMTP id s66so13454wrc.9 for <29303@debbugs.gnu.org>; Tue, 28 Nov 2017 05:38:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:gmane-reply-to-list:date:in-reply-to :message-id:user-agent:mime-version; bh=dtkXEM5m4Z4MmDBkQ1RzGHkS5oLeLHx33JTy789F9VA=; b=p/uff6IMnXzOywQhD4UKnqohWzYB+JZQ7MINYGfq02Wkc+35Oo8+uGAMe3yuHFyw8H yJlsLquykVigXUQTmgkGyfLFUTPiu0UnDlXLKL8eUWSrK5joBC2469mQvd2ixuZp3CQR KVJFe4DMJOaSAETe1lRNDFyvlGUkxVBxnsvaTi7f7sH3ZFP7kh7tFnNwojUgF7MQt2Tt kLajPIEsA3I8+k6pXK983sGCQ+J8XOhoKT9NqmLuGrNnUerFU4yFWHTHVJiYXeo8vIfO ke7gWjox14VU+XMbAQJ/2kT5sgnzTnJH/FAlz//Zw7qIAeHp7aMyFR5HXGu60nWQ55Hj 1qBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references :gmane-reply-to-list:date:in-reply-to:message-id:user-agent :mime-version; bh=dtkXEM5m4Z4MmDBkQ1RzGHkS5oLeLHx33JTy789F9VA=; b=ngMxslfpY7LCzw3vE1XPEzlNfpozFhbaIOeOEJX5k9geiISZx/euQNEuo2Z4ENhZn7 9lJvz6jlQoILJt3yP/h9nCZozee2Ma8fqcG306I2pPG5124tyNd9MUGyIMkhiyHll89+ hiTsnifq8BC0uBuFkkmmpTHil4OTXuyMLkzyll5vXHkdL9EmnU7PWPMSOSFrRaRcQvnm f85oAs4VLV/3f0sOqs/tJ4HlOfEoQitQz3j5+xcTCLN27XB8HYHbZQT1MqxlaDQ7zjF0 80opqOG/HmYE6DiXQ3Y3f2qenQ9MxmuCZiPCZ9yWGAc+a9YPB4mVDvq8boUSntkWgn8U oeHg== X-Gm-Message-State: AJaThX4+Ortt7uHhGn5CUgs+3xfnZ+yFdO03XuMSO8DJ4o74h4ht+tK4 E9T2DcIO2fmlGGFMUDz2IEs= X-Google-Smtp-Source: AGs4zMYUuH4GG18eH6shby6gydqbEHIXlLXECKKzh75x5WOMYyVPk0Rus9pJnvwzWJdIl9fbVjyUCg== X-Received: by 10.223.200.6 with SMTP id d6mr35263410wrh.118.1511876280632; Tue, 28 Nov 2017 05:38:00 -0800 (PST) Received: from rpluim-ubuntu ([149.5.228.1]) by smtp.gmail.com with ESMTPSA id h185sm42581362wma.19.2017.11.28.05.37.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Nov 2017 05:37:59 -0800 (PST) From: Robert Pluim To: Eli Zaretskii Subject: Re: bug#29303: 25.2; vc-git-grep should shell-escape FILES References: <87efoz983o.fsf@gmail.com> <83d14jjv5y.fsf@gnu.org> <87375fpehr.fsf@gmail.com> <837eurjoue.fsf@gnu.org> <87tvxvnvog.fsf@gmail.com> <83y3n7i90b.fsf@gnu.org> <87lgj7nuti.fsf@gmail.com> <83vaiai68j.fsf@gnu.org> <878tf5nvue.fsf@gmail.com> <83375di8am.fsf@gnu.org> <878tf5fcwc.fsf@gmail.com> <83wp2pgqlh.fsf@gnu.org> <87bmk1chzv.fsf@gmail.com> <83tvxtggyt.fsf@gnu.org> <87h8ttyohr.fsf@gmail.com> X-Debbugs-No-Ack: yes Gmane-Reply-To-List: yes Date: Tue, 28 Nov 2017 14:37:58 +0100 In-Reply-To: <87h8ttyohr.fsf@gmail.com> (Robert Pluim's message of "Fri, 17 Nov 2017 15:21:52 +0100") Message-ID: <878teqfrrd.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 29303 Cc: 29303@debbugs.gnu.org, gus@inodes.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.0 (/) Robert Pluim writes: > I meant the patch to quote arguments to git grep, since that's fixing > an actual problem, but it's a change in behaviour, so it might be too > late for that. Eli, is patch #2 ok to go into emacs-26 or master? Do you need a NEWS entry? Thanks Robert From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 28 12:50:03 2017 Received: (at 29303-done) by debbugs.gnu.org; 28 Nov 2017 17:50:03 +0000 Received: from localhost ([127.0.0.1]:34995 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eJk1D-0006eO-Ec for submit@debbugs.gnu.org; Tue, 28 Nov 2017 12:50:03 -0500 Received: from eggs.gnu.org ([208.118.235.92]:42353) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eJk1B-0006dq-JC for 29303-done@debbugs.gnu.org; Tue, 28 Nov 2017 12:50:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eJk15-0001ic-SZ for 29303-done@debbugs.gnu.org; Tue, 28 Nov 2017 12:49:56 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:49985) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eJk0x-0001fO-JX; Tue, 28 Nov 2017 12:49:47 -0500 Received: from [176.228.60.248] (port=3203 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1eJk0v-0002ZK-Ug; Tue, 28 Nov 2017 12:49:47 -0500 Date: Tue, 28 Nov 2017 19:49:33 +0200 Message-Id: <83vahu47ki.fsf@gnu.org> From: Eli Zaretskii To: Robert Pluim In-reply-to: <878teqfrrd.fsf@gmail.com> (message from Robert Pluim on Tue, 28 Nov 2017 14:37:58 +0100) Subject: Re: bug#29303: 25.2; vc-git-grep should shell-escape FILES References: <87efoz983o.fsf@gmail.com> <83d14jjv5y.fsf@gnu.org> <87375fpehr.fsf@gmail.com> <837eurjoue.fsf@gnu.org> <87tvxvnvog.fsf@gmail.com> <83y3n7i90b.fsf@gnu.org> <87lgj7nuti.fsf@gmail.com> <83vaiai68j.fsf@gnu.org> <878tf5nvue.fsf@gmail.com> <83375di8am.fsf@gnu.org> <878tf5fcwc.fsf@gmail.com> <83wp2pgqlh.fsf@gnu.org> <87bmk1chzv.fsf@gmail.com> <83tvxtggyt.fsf@gnu.org> <87h8ttyohr.fsf@gmail.com> <878teqfrrd.fsf@gmail.com> 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: -5.0 (-----) X-Debbugs-Envelope-To: 29303-done Cc: 29303-done@debbugs.gnu.org, gus@inodes.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: -5.0 (-----) > From: Robert Pluim > Cc: 29303@debbugs.gnu.org, gus@inodes.org > Gmane-Reply-To-List: yes > Date: Tue, 28 Nov 2017 14:37:58 +0100 > > Eli, is patch #2 ok to go into emacs-26 or master? I pushed it, thanks. > Do you need a NEWS entry? No, it's a bug fix. From unknown Tue Sep 23 13:13:00 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 27 Dec 2017 12:24:03 +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