From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#61340: 29.0.60; Extra space in xref buffer Date: Wed, 8 Feb 2023 02:58:02 +0200 Message-ID: <6a7e3db4-bc2b-2742-bc6c-ad9da8203b85@yandex.ru> References: <868rh9zzws.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8617"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 To: Juri Linkov , 61340@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Feb 08 01:59:18 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 1pPYnt-00028a-So for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 08 Feb 2023 01:59:17 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pPYnh-0004I1-Cz; Tue, 07 Feb 2023 19:59:05 -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 1pPYne-0004Hr-OQ for bug-gnu-emacs@gnu.org; Tue, 07 Feb 2023 19:59:02 -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 1pPYne-00084I-G7 for bug-gnu-emacs@gnu.org; Tue, 07 Feb 2023 19:59:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pPYnd-00034Q-SS for bug-gnu-emacs@gnu.org; Tue, 07 Feb 2023 19:59:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 08 Feb 2023 00:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61340 X-GNU-PR-Package: emacs Original-Received: via spool by 61340-submit@debbugs.gnu.org id=B61340.167581789211738 (code B ref 61340); Wed, 08 Feb 2023 00:59:01 +0000 Original-Received: (at 61340) by debbugs.gnu.org; 8 Feb 2023 00:58:12 +0000 Original-Received: from localhost ([127.0.0.1]:54275 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pPYmq-00033F-AW for submit@debbugs.gnu.org; Tue, 07 Feb 2023 19:58:12 -0500 Original-Received: from mail-ej1-f52.google.com ([209.85.218.52]:42823) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pPYmo-000332-Dg for 61340@debbugs.gnu.org; Tue, 07 Feb 2023 19:58:10 -0500 Original-Received: by mail-ej1-f52.google.com with SMTP id sa10so16949554ejc.9 for <61340@debbugs.gnu.org>; Tue, 07 Feb 2023 16:58:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=IWS7aFxFf/shcN7+OZ4kRA7yPXeymu2ZVTNI2CyvQtA=; b=hia7CZrKm3vH71ubDVkaWEPEu3oyouZFfvGph/zXm76D2nC2qHU3fkQl9L/Snw1zz4 HINbvAQKkr9OZKig5zNJ8HJZi+XB5cI0oIaHLxzlg1DmTQgNuAZRqjS7pntX4e5FJRTw cSJmMNrWBnBRntP6joNreL7mpZIVc/otDXs9nlU6pLpxSZ23CVm8/tDTTW9Cn52GG9Nx wQk08ru47/k/XnpQliqKL9sbkN5OgFAibRrhlSI8CbG2A6FjFetkhvsnsZdvsmlpHn6S ztDd9/OfO6k4Rc6Sg+AfJlhr4dyHLrbDzFmi7qTP35zCiWQEZVRh3aSGfZXfYSurzSgF QO7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=IWS7aFxFf/shcN7+OZ4kRA7yPXeymu2ZVTNI2CyvQtA=; b=wN8PjbMHDxRlxoYn4g2Y+ypaZSM7FlY7yTAVmVq3ot6GBSLQz6EXmgj9ybVb3C2Zzd U6mWSvZA3UPtVvyNRcTwwKe/Q2sl20r7fsRmPqY7FtrqUeFXU5BqINAWmYqS+iQd8UDb ucnjTy4iqG696XJ2tejiD0M9JFtlE7wkn/UFS4i9xnP8o5MKZq7LvEIB5YPgjlQuCDVN lu0DrxtO3guYCpKXCADcRTMX+CzE+qus/w8TvLaPElGLVPc7qQIM7f1ugxol7NKFJIO/ KLQJH3IzyrrjUEtRMA8lf+XgazHFwNL8sUJKfKmbqLjcAI8b0SUAR3tehiZ7zGhP3VBv SNnQ== X-Gm-Message-State: AO0yUKVyNHPBm6TjblrcGFx2pn2cFRwzs2qHA8uXE7pgaEBPVMEgZLNv hLOY+pJjAVzR7GBjlEw/LsA= X-Google-Smtp-Source: AK7set9oInYnpOIyDqe9sCRI8voRUxbT+dS5ayN1HCxH0cpLOSrP0QoEpn5wQxIys6zyVjggAcrbhA== X-Received: by 2002:a17:906:f1d0:b0:86f:b99c:ac8d with SMTP id gx16-20020a170906f1d000b0086fb99cac8dmr5904732ejb.44.1675817884369; Tue, 07 Feb 2023 16:58:04 -0800 (PST) Original-Received: from [192.168.0.2] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id z10-20020a170906240a00b008aabf1d399bsm784476eja.63.2023.02.07.16.58.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 07 Feb 2023 16:58:03 -0800 (PST) Content-Language: en-US In-Reply-To: <868rh9zzws.fsf@mail.linkov.net> 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:255089 Archived-At: Hi! On 07/02/2023 09:40, Juri Linkov wrote: > 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 > ``` This was originally an effort to give the outputted text some "breathing room", and I think it looks a little better. But if it can cause problems sometimes, I don't mind the proposed change. After all, both Grep and Occur don't have this space, and consistency is good.