diff options
| author | Robert Pluim | 2017-11-17 15:39:02 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2017-11-17 15:39:02 +0200 |
| commit | 104f3e51fe6d22cf0ee280509df1b133cb8e1f89 (patch) | |
| tree | 352e7a415af879a2e3ae4df6b2d8c4a85abdcdb8 | |
| parent | d8e0951d5f680aa7f688416eec19a1f062241f44 (diff) | |
| download | emacs-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.el | 12 | ||||
| -rw-r--r-- | lisp/progmodes/project.el | 6 | ||||
| -rw-r--r-- | 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 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. |
| 907 | The pattern can include shell wildcards." | 907 | The pattern can include shell wildcards. As whitespace triggers |
| 908 | completion when entering a pattern, including it requires | ||
| 909 | quoting, 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. |
| 955 | The search is limited to file names matching shell pattern FILES. | 957 | The search is limited to file names matching shell pattern FILES. |
| 956 | FILES may use abbreviations defined in `grep-files-aliases', e.g. | 958 | FILES may use abbreviations defined in `grep-files-aliases', e.g. |
| 957 | entering `ch' is equivalent to `*.[ch]'. | 959 | entering `ch' is equivalent to `*.[ch]'. As whitespace triggers |
| 960 | completion when entering a pattern, including it requires | ||
| 961 | quoting, e.g. `\\[quoted-insert]<space>'. | ||
| 958 | 962 | ||
| 959 | With \\[universal-argument] prefix, you can edit the constructed shell command line | 963 | With \\[universal-argument] prefix, you can edit the constructed shell command line |
| 960 | before it is executed. | 964 | before 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. |
| 1033 | The search is limited to file names matching shell pattern FILES. | 1037 | The search is limited to file names matching shell pattern FILES. |
| 1034 | FILES may use abbreviations defined in `grep-files-aliases', e.g. | 1038 | FILES may use abbreviations defined in `grep-files-aliases', e.g. |
| 1035 | entering `ch' is equivalent to `*.[ch]'. | 1039 | entering `ch' is equivalent to `*.[ch]'. As whitespace triggers |
| 1040 | completion when entering a pattern, including it requires | ||
| 1041 | quoting, e.g. `\\[quoted-insert]<space>'. | ||
| 1036 | 1042 | ||
| 1037 | With \\[universal-argument] prefix, you can edit the constructed shell command line | 1043 | With \\[universal-argument] prefix, you can edit the constructed shell command line |
| 1038 | before it is executed. | 1044 | before 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. |
| 309 | With \\[universal-argument] prefix, you can specify the directory | 309 | With \\[universal-argument] prefix, you can specify the directory |
| 310 | to search in, and the file name pattern to search for." | 310 | to search in, and the file name pattern to search for. The |
| 311 | pattern may use abbreviations defined in `grep-files-aliases', | ||
| 312 | e.g. entering `ch' is equivalent to `*.[ch]'. As whitespace | ||
| 313 | triggers completion when entering a pattern, including it | ||
| 314 | requires 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. |
| 1408 | The search is limited to file names matching shell pattern FILES. | 1408 | The search is limited to file names matching shell pattern FILES. |
| 1409 | FILES may use abbreviations defined in `grep-files-aliases', e.g. | 1409 | FILES may use abbreviations defined in `grep-files-aliases', e.g. |
| 1410 | entering `ch' is equivalent to `*.[ch]'. | 1410 | entering `ch' is equivalent to `*.[ch]'. As whitespace triggers |
| 1411 | completion when entering a pattern, including it requires | ||
| 1412 | quoting, e.g. `\\[quoted-insert]<space>'. | ||
| 1411 | 1413 | ||
| 1412 | With \\[universal-argument] prefix, you can edit the constructed shell command line | 1414 | With \\[universal-argument] prefix, you can edit the constructed shell command line |
| 1413 | before it is executed. | 1415 | before it is executed. |