From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#47012: xref copies keymap properties to minibuffer Date: Wed, 31 Mar 2021 20:05:52 +0300 Organization: LINKOV.NET Message-ID: <87v99745jj.fsf@mail.linkov.net> References: <87czw9tnu9.fsf@mail.linkov.net> <3aad442a-7319-5db5-2fc6-560bb032c34d@yandex.ru> <87a6r9v24b.fsf@mail.linkov.net> <87sg4kb839.fsf@mail.linkov.net> <871rc3bls6.fsf@mail.linkov.net> <871rc2ly7x.fsf@mail.linkov.net> <4228b128-039c-2bcd-002c-5ac830d7a4d3@yandex.ru> <87pmzgtr80.fsf@mail.linkov.net> <186b46fa-3716-a76d-db85-09638d7805c7@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36130"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) Cc: 47012@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Mar 31 19:12:22 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lReOE-0009Hs-2J for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 31 Mar 2021 19:12:22 +0200 Original-Received: from localhost ([::1]:36760 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lReOC-0002iz-Gt for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 31 Mar 2021 13:12:20 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57840) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lReNt-0002ir-Ux for bug-gnu-emacs@gnu.org; Wed, 31 Mar 2021 13:12:01 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43841) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lReNt-0007hv-O0 for bug-gnu-emacs@gnu.org; Wed, 31 Mar 2021 13:12:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lReNt-0002cs-I3 for bug-gnu-emacs@gnu.org; Wed, 31 Mar 2021 13:12:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 31 Mar 2021 17:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47012 X-GNU-PR-Package: emacs Original-Received: via spool by 47012-submit@debbugs.gnu.org id=B47012.161721069610062 (code B ref 47012); Wed, 31 Mar 2021 17:12:01 +0000 Original-Received: (at 47012) by debbugs.gnu.org; 31 Mar 2021 17:11:36 +0000 Original-Received: from localhost ([127.0.0.1]:55387 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lReNU-0002cD-DY for submit@debbugs.gnu.org; Wed, 31 Mar 2021 13:11:36 -0400 Original-Received: from relay9-d.mail.gandi.net ([217.70.183.199]:44803) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lReNT-0002c0-1u for 47012@debbugs.gnu.org; Wed, 31 Mar 2021 13:11:35 -0400 X-Originating-IP: 91.129.107.223 Original-Received: from mail.gandi.net (m91-129-107-223.cust.tele2.ee [91.129.107.223]) (Authenticated sender: juri@linkov.net) by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id 9DDB0FF809; Wed, 31 Mar 2021 17:11:26 +0000 (UTC) In-Reply-To: <186b46fa-3716-a76d-db85-09638d7805c7@yandex.ru> (Dmitry Gutov's message of "Wed, 31 Mar 2021 18:47:30 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:203377 Archived-At: >> -(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 > > I'm not sure I like the result. Simply applying your change to the face > results in a color-less buffer with grey spots for both file headers and It's good that the buffer is color-less since this improves readability because in such cases colors add distraction. > match highlights (at least, with my current theme). Indeed, it adds grey lines for file headers, but there are no grey lines for match highlights by default. > It's less of a problem with diff-mode because its basic background is > grey already. The proposed change is for the default theme. If the proposed change doesn't fit your personal theme customization, this is fine. At least, please mention in the docstring a suggestion how the users could improve the readability of this face. > I've also considered something like: > > (defface xref-file-header '((t :background "grey90" :extend t :inherit compilation-info)) > "Face used to highlight file header in the xref buffer." > :version "27.1") > > ...but it makes the file names harder to read because of the > reduced contrast. I agree, this is not an improvement. > Then I've tried to see what others do, for instance > https://github.com/Wilfred/deadgrep, which I'd heard people praise > usability of. > > The only distinction it adds to file names is "bold :t". And diff-mode also > does that, actually. > > So... how do you like this simple change? > > (defface xref-file-header '((t :bold t :inherit compilation-info)) > "Face used to highlight file header in the xref buffer." > :version "27.1") This is exactly what I used as customization for a long time, and it was a pain with so much of "visual garbage", until I realized there is the existing solution in diff-mode faces. It seems you're inclined to keep the green color because this is what is used in grep, right? But in grep, the green color on file names doesn't add distraction because file names are located on the left, whereas matches are on the right part of the output. But in xref output lines with file names and lines with matches are interlaced. Another suggestion how to remove "visual garbage" is to truncate duplicate prefixes: currently the prefixes of long absolute file names are repeated for all file names. It would improve readability to display shorter relative file names without duplicate project root part.