I am liking rgrep
as it lets you choose a path and searches recursively. How is it possible to highlight the matches in the rgrep
buffer?
grep
(rgrep
) uses two settings (that I know of) to control highlighting in the *grep*
buffer
font-lock-mode
grep-highlight-matches
- customization variable
grep-highlight-matches
depends on font-lock-mode
being on. It can inherit its value from grep-host-defaults-alist
. It controls the use of the GREP_COLORS
environment variable and grep
--color
argument.
In your case I'd check that font-lock-mode
is enabled. From the *grep*
buffer enter: C-h v font-lock-mode
and see what the *Help*
buffer says.
The easiest way to enable it in all buffers that support font locking is to call (global-font-lock-mode t)
You can also enter M-x font-lock-fontify-buffer
on a per buffer basis.
I recall it not being enabled for me in older versions of emacs and/or on certain terminals.
-
Thanks for your comment. It was actually the "match" attribute. I added this `(match ((t (:foreground "#f2804f" :weight bold)))) to custom-theme-set-faces and that did it. – SFbay007 Jan 17 '18 at 5:34
emacs -Q
(no init file)? If you see the highlighting in that case then bisect your init file to find out what is interfering. – Drew Jan 17 '18 at 0:30find
command. Dunno. Works for me, with Emacs 23 to Emacs 26. – Drew Jan 17 '18 at 0:35