emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-26 104f3e5: Document how to enter whitespace when us


From: Eli Zaretskii
Subject: [Emacs-diffs] emacs-26 104f3e5: Document how to enter whitespace when using grep-read-files
Date: Fri, 17 Nov 2017 08:40:00 -0500 (EST)

branch: emacs-26
commit 104f3e51fe6d22cf0ee280509df1b133cb8e1f89
Author: Robert Pluim <address@hidden>
Commit: Eli Zaretskii <address@hidden>

    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.
---
 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 d0404fd..c2d8022 100644
--- a/lisp/progmodes/grep.el
+++ b/lisp/progmodes/grep.el
@@ -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.
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index 9dc0da4..93a945e 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -307,7 +307,11 @@ DIRS must contain directory names."
 (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]<space>'."
   (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 ed85603..060072e 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\"."
   "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]<space>'.
 
 With \\[universal-argument] prefix, you can edit the constructed shell command 
line
 before it is executed.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]