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:
parent
d8e0951d5f
commit
104f3e51fe
3 changed files with 17 additions and 5 deletions
lisp
|
@ -904,7 +904,9 @@ substitution string. Note dynamic scoping of variables.")
|
||||||
|
|
||||||
(defun grep-read-files (regexp)
|
(defun grep-read-files (regexp)
|
||||||
"Read a file-name pattern arg for interactive grep.
|
"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)
|
(let* ((bn (or (buffer-file-name)
|
||||||
(replace-regexp-in-string "<[0-9]+>\\'" "" (buffer-name))))
|
(replace-regexp-in-string "<[0-9]+>\\'" "" (buffer-name))))
|
||||||
(fn (and bn
|
(fn (and bn
|
||||||
|
@ -954,7 +956,9 @@ The pattern can include shell wildcards."
|
||||||
"Run grep, searching for REGEXP in FILES in directory DIR.
|
"Run grep, searching for REGEXP in FILES in directory DIR.
|
||||||
The search is limited to file names matching shell pattern FILES.
|
The search is limited to file names matching shell pattern FILES.
|
||||||
FILES may use abbreviations defined in `grep-files-aliases', e.g.
|
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
|
With \\[universal-argument] prefix, you can edit the constructed shell command line
|
||||||
before it is executed.
|
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.
|
"Recursively grep for REGEXP in FILES in directory tree rooted at DIR.
|
||||||
The search is limited to file names matching shell pattern FILES.
|
The search is limited to file names matching shell pattern FILES.
|
||||||
FILES may use abbreviations defined in `grep-files-aliases', e.g.
|
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
|
With \\[universal-argument] prefix, you can edit the constructed shell command line
|
||||||
before it is executed.
|
before it is executed.
|
||||||
|
|
|
@ -307,7 +307,11 @@ DIRS must contain directory names."
|
||||||
(defun project-find-regexp (regexp)
|
(defun project-find-regexp (regexp)
|
||||||
"Find all matches for REGEXP in the current project's roots.
|
"Find all matches for REGEXP in the current project's roots.
|
||||||
With \\[universal-argument] prefix, you can specify the directory
|
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]<space>'."
|
||||||
(interactive (list (project--read-regexp)))
|
(interactive (list (project--read-regexp)))
|
||||||
(let* ((pr (project-current t))
|
(let* ((pr (project-current t))
|
||||||
(dirs (if current-prefix-arg
|
(dirs (if current-prefix-arg
|
||||||
|
|
|
@ -1407,7 +1407,9 @@ This requires git 1.8.4 or later, for the \"-L\" option of \"git log\"."
|
||||||
"Run git grep, searching for REGEXP in FILES in directory DIR.
|
"Run git grep, searching for REGEXP in FILES in directory DIR.
|
||||||
The search is limited to file names matching shell pattern FILES.
|
The search is limited to file names matching shell pattern FILES.
|
||||||
FILES may use abbreviations defined in `grep-files-aliases', e.g.
|
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
|
With \\[universal-argument] prefix, you can edit the constructed shell command line
|
||||||
before it is executed.
|
before it is executed.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue