[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#35326: 26.1; vc-git-grep should pass -i like isearch
From: |
Juri Linkov |
Subject: |
bug#35326: 26.1; vc-git-grep should pass -i like isearch |
Date: |
Thu, 27 Jun 2019 23:31:01 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) |
>> PS: Regarding -w that I proposed previously, I could create
>> a separate request, but here is a preliminary version:
>
> [...]
>
>> + (when grep-word-search
>> + (push "-w" opts))
>
> Hm... I always just say \bfoo\b when I want the word-ish version, so I
> don't know whether this really warrants a new command.
OK, a new request could be created later on more demand.
Meanwhile, I'm using this short snippet in ~/.emacs:
(defun wrgrep ()
"Word-based version of `rgrep'.
Modifies the grep-find template to add the option `-w' that matches whole
words."
(interactive)
(let ((grep-host-defaults-alist nil)
(grep-find-template
(replace-regexp-in-string "<C>" "-w \\&" grep-find-template)))
(call-interactively 'rgrep)))