1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

Document how to enter whitespace when using grep-read-files

* lisp/progmodes/grep.el (lgrep, rgrep, grep-read-files): Explain
how to enter whitespace when using grep-read-files.  (Bug#29303)
* lisp/progmodes/project.el (project-find-regexp): Likewise.
* lisp/vc/vc-git.el (vc-git-grep): Likewise.
This commit is contained in:
Robert Pluim 2017-11-17 15:39:02 +02:00 committed by Eli Zaretskii
parent d8e0951d5f
commit 104f3e51fe
3 changed files with 17 additions and 5 deletions

View file

@ -904,7 +904,9 @@ substitution string. Note dynamic scoping of variables.")
(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]<space>'."
(let* ((bn (or (buffer-file-name)
(replace-regexp-in-string "<[0-9]+>\\'" "" (buffer-name))))
(fn (and bn
@ -954,7 +956,9 @@ The pattern can include shell wildcards."
"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]<space>'.
With \\[universal-argument] prefix, you can edit the constructed shell command line
before it is executed.
@ -1032,7 +1036,9 @@ This command shares argument histories with \\[rgrep] and \\[grep]."
"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]<space>'.
With \\[universal-argument] prefix, you can edit the constructed shell command line
before it is executed.