bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#47012: xref copies keymap properties to minibuffer


From: Juri Linkov
Subject: bug#47012: xref copies keymap properties to minibuffer
Date: Tue, 30 Mar 2021 22:16:07 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)

>>>    (defvar project-regexp-history-variable 'grep-regexp-history)
>>>
>>> will be good enough.
>> This would a good thing to do.
>
> Let's go with this one, then. At least for now.
>
> Meaning, your patch plus a change of the default value to
> 'grep-regexp-history.

Now patch is pushed.

BTW, it was a big hassle to use project-find-regexp
until I realized where is the problem.  There is
no such problem in grep because in the grep output
file names are placed separately on the left,
and output lines are on the right on the same lines.
So it's easy to scan output lines visually.

But the output of project-find-regexp is a mess
because output lines are interspersed with file names
where output lines are almost indistinguishable
from file lines.  Indeed, file names are currently
highlighted in green color, but such green foreground
doesn't help to distinguish file names from output lines,
so it's very hard to read the output.

Then I realized that this problem is already solved
in diff-mode where the faces 'diff-header' and
'diff-file-header' use the grey background to separate diff hunks.

Using the same solution of 'diff-header' and
'diff-file-header' for 'xref-file-header'
improves the readability significantly:

#+begin_src diff
diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el
index ea52befec5..f2aa8bfba4 100644
--- a/lisp/progmodes/xref.el
+++ b/lisp/progmodes/xref.el
@@ -513,7 +513,7 @@ xref-pop-to-location
 (defconst xref-buffer-name "*xref*"
   "The name of the buffer to show xrefs.")
 
-(defface xref-file-header '((t :inherit compilation-info))
+(defface xref-file-header '((t :background "grey90" :extend t))
   "Face used to highlight file header in the xref buffer."
   :version "27.1")
#+end_src





reply via email to

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