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#61340: 29.0.60; Extra space in xref buffer Date: Tue, 07 Feb 2023 09:40:35 +0200 Organization: LINKOV.NET Message-ID: <868rh9zzws.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34742"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) To: 61340@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Feb 07 08:46:37 2023 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 1pPIgW-0008qv-BV for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 07 Feb 2023 08:46:36 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pPIg9-0002Oz-AO; Tue, 07 Feb 2023 02:46:13 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pPIg7-0002Od-MA for bug-gnu-emacs@gnu.org; Tue, 07 Feb 2023 02:46:11 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pPIfy-0007cX-Qj for bug-gnu-emacs@gnu.org; Tue, 07 Feb 2023 02:46:11 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pPIfy-0005xS-Ft for bug-gnu-emacs@gnu.org; Tue, 07 Feb 2023 02:46:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 07 Feb 2023 07:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 61340 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.167575592222845 (code B ref -1); Tue, 07 Feb 2023 07:46:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 7 Feb 2023 07:45:22 +0000 Original-Received: from localhost ([127.0.0.1]:50889 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pPIfK-0005wP-Io for submit@debbugs.gnu.org; Tue, 07 Feb 2023 02:45:22 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:55120) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pPIfI-0005wH-Ic for submit@debbugs.gnu.org; Tue, 07 Feb 2023 02:45:20 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pPIfH-0002Fe-FJ for bug-gnu-emacs@gnu.org; Tue, 07 Feb 2023 02:45:20 -0500 Original-Received: from relay2-d.mail.gandi.net ([217.70.183.194]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pPIfD-0007RB-Vx for bug-gnu-emacs@gnu.org; Tue, 07 Feb 2023 02:45:18 -0500 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 9C99F40006 for ; Tue, 7 Feb 2023 07:45:06 +0000 (UTC) Received-SPF: pass client-ip=217.70.183.194; envelope-from=juri@linkov.net; helo=relay2-d.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:255021 Archived-At: This is a small problem and I didn't notice it until now when there was an important distinction whether there is a space character at the beginning of the line, and it was misleading to see that xref wrongly says there is a leading space. This is because currently xref output differs from grep and occur where there is no space between colon and the text from file. Here is the fix: ``` diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index f01b8a1af18..6160f217afb 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -1108,7 +1108,7 @@ xref--insert-xrefs maximize (xref-location-line (xref-item-location xref))) for line-format = (and max-line - (format "%%%dd: " (1+ (floor (log max-line 10))))) + (format "%%%dd:" (1+ (floor (log max-line 10))))) with item-text-props = (list 'mouse-face 'highlight 'keymap xref--button-map 'help-echo ```