aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Pluim2017-11-17 15:39:02 +0200
committerEli Zaretskii2017-11-17 15:39:02 +0200
commit104f3e51fe6d22cf0ee280509df1b133cb8e1f89 (patch)
tree352e7a415af879a2e3ae4df6b2d8c4a85abdcdb8
parentd8e0951d5f680aa7f688416eec19a1f062241f44 (diff)
downloademacs-104f3e51fe6d22cf0ee280509df1b133cb8e1f89.tar.gz
emacs-104f3e51fe6d22cf0ee280509df1b133cb8e1f89.zip
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.
-rw-r--r--lisp/progmodes/grep.el12
-rw-r--r--lisp/progmodes/project.el6
-rw-r--r--lisp/vc/vc-git.el4
3 files changed, 17 insertions, 5 deletions
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el
index d0404fdeaf4..c2d80223541 100644
--- a/lisp/progmodes/grep.el
+++ b/lisp/progmodes/grep.el
@@ -904,7 +904,9 @@ substitution string. Note dynamic scoping of variables.")
904 904
905(defun grep-read-files (regexp) 905(defun grep-read-files (regexp)
906 "Read a file-name pattern arg for interactive grep. 906 "Read a file-name pattern arg for interactive grep.
907The pattern can include shell wildcards." 907The pattern can include shell wildcards. As whitespace triggers
908completion when entering a pattern, including it requires
909quoting, e.g. `\\[quoted-insert]<space>'."
908 (let* ((bn (or (buffer-file-name) 910 (let* ((bn (or (buffer-file-name)
909 (replace-regexp-in-string "<[0-9]+>\\'" "" (buffer-name)))) 911 (replace-regexp-in-string "<[0-9]+>\\'" "" (buffer-name))))
910 (fn (and bn 912 (fn (and bn
@@ -954,7 +956,9 @@ The pattern can include shell wildcards."
954 "Run grep, searching for REGEXP in FILES in directory DIR. 956 "Run grep, searching for REGEXP in FILES in directory DIR.
955The search is limited to file names matching shell pattern FILES. 957The search is limited to file names matching shell pattern FILES.
956FILES may use abbreviations defined in `grep-files-aliases', e.g. 958FILES may use abbreviations defined in `grep-files-aliases', e.g.
957entering `ch' is equivalent to `*.[ch]'. 959entering `ch' is equivalent to `*.[ch]'. As whitespace triggers
960completion when entering a pattern, including it requires
961quoting, e.g. `\\[quoted-insert]<space>'.
958 962
959With \\[universal-argument] prefix, you can edit the constructed shell command line 963With \\[universal-argument] prefix, you can edit the constructed shell command line
960before it is executed. 964before it is executed.
@@ -1032,7 +1036,9 @@ This command shares argument histories with \\[rgrep] and \\[grep]."
1032 "Recursively grep for REGEXP in FILES in directory tree rooted at DIR. 1036 "Recursively grep for REGEXP in FILES in directory tree rooted at DIR.
1033The search is limited to file names matching shell pattern FILES. 1037The search is limited to file names matching shell pattern FILES.
1034FILES may use abbreviations defined in `grep-files-aliases', e.g. 1038FILES may use abbreviations defined in `grep-files-aliases', e.g.
1035entering `ch' is equivalent to `*.[ch]'. 1039entering `ch' is equivalent to `*.[ch]'. As whitespace triggers
1040completion when entering a pattern, including it requires
1041quoting, e.g. `\\[quoted-insert]<space>'.
1036 1042
1037With \\[universal-argument] prefix, you can edit the constructed shell command line 1043With \\[universal-argument] prefix, you can edit the constructed shell command line
1038before it is executed. 1044before it is executed.
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index 9dc0da4ad5c..93a945edaa4 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -307,7 +307,11 @@ DIRS must contain directory names."
307(defun project-find-regexp (regexp) 307(defun project-find-regexp (regexp)
308 "Find all matches for REGEXP in the current project's roots. 308 "Find all matches for REGEXP in the current project's roots.
309With \\[universal-argument] prefix, you can specify the directory 309With \\[universal-argument] prefix, you can specify the directory
310to search in, and the file name pattern to search for." 310to search in, and the file name pattern to search for. The
311pattern may use abbreviations defined in `grep-files-aliases',
312e.g. entering `ch' is equivalent to `*.[ch]'. As whitespace
313triggers completion when entering a pattern, including it
314requires quoting, e.g. `\\[quoted-insert]<space>'."
311 (interactive (list (project--read-regexp))) 315 (interactive (list (project--read-regexp)))
312 (let* ((pr (project-current t)) 316 (let* ((pr (project-current t))
313 (dirs (if current-prefix-arg 317 (dirs (if current-prefix-arg
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
index ed85603f828..060072ea54d 100644
--- a/lisp/vc/vc-git.el
+++ b/lisp/vc/vc-git.el
@@ -1407,7 +1407,9 @@ This requires git 1.8.4 or later, for the \"-L\" option of \"git log\"."
1407 "Run git grep, searching for REGEXP in FILES in directory DIR. 1407 "Run git grep, searching for REGEXP in FILES in directory DIR.
1408The search is limited to file names matching shell pattern FILES. 1408The search is limited to file names matching shell pattern FILES.
1409FILES may use abbreviations defined in `grep-files-aliases', e.g. 1409FILES may use abbreviations defined in `grep-files-aliases', e.g.
1410entering `ch' is equivalent to `*.[ch]'. 1410entering `ch' is equivalent to `*.[ch]'. As whitespace triggers
1411completion when entering a pattern, including it requires
1412quoting, e.g. `\\[quoted-insert]<space>'.
1411 1413
1412With \\[universal-argument] prefix, you can edit the constructed shell command line 1414With \\[universal-argument] prefix, you can edit the constructed shell command line
1413before it is executed. 1415before it is executed.