1

The result buffer of occur displays the buffer name with some info:

69 matches in 65 lines for "use" in buffer: init.el

It's alright when I run occur in only one buffer.

I just started using multi-occur (rather projectile-multi-occur), thus getting multiple lines of that type, one per file with matches. I find that these lines should make a greater visual separation. Right now, these lines have the face underline (at the bottom of the result of describe-char):

enter image description here

I was expecting a face, which I could change in my theme.

Is this face underline hard-coded in the implementation of occur? Can I customize it from within my theme file?

Gauthier
  • 499
  • 2
  • 13

1 Answers1

1

You can change list-matching-lines-buffer-name-face to the face what your want.

(defface blue-underline
  '((t :foreground "blue" :underline t))
  "blue-underline face.")

(setq list-matching-lines-buffer-name-face 'blue-underline)

How I find it:

  1. go to source code of multi-occur
  2. search underline
Tianshu Wang
  • 1,724
  • 4
  • 7
  • 1
    FYI: I filed Emacs [bug #54157](https://debbugs.gnu.org/cgi/bugreport.cgi?bug=54157), to alias the `list-matching-lines-*` option names to `occur-*` names. – Drew Feb 25 '22 at 17:01
  • Thanks! I tried to put this in my `theme.el`: `\`(list-matching-lines-buffer-name-face ((t (:foreground "blue" :underline t))))`, but it doesn't seem to work. Am I missing something? I see that it's not the same way (not using `defcustom`), but all faces in my theme are done as I pasted here. – Gauthier Feb 25 '22 at 17:08
  • @Gauthier Hi, `list-matching-lines-buffer-name-face` is a variable not face. You should use `setq` to set it to some face. I have update my answer with an example. – Tianshu Wang Feb 26 '22 at 04:00