GNU bug report logs - #81592
[PATCH] Implement `xref-location-line' for `xref-buffer-location'

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Roi Martin <jroi.martin@HIDDEN>; Keywords: patch; dated Mon, 10 Aug 2026 21:22:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 81592 <at> debbugs.gnu.org:


Received: (at 81592) by debbugs.gnu.org; 3 Sep 2026 09:45:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Sep 03 05:45:12 2026
Received: from localhost ([127.0.0.1]:51836 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1x240O-0002l0-5J
	for submit <at> debbugs.gnu.org; Thu, 03 Sep 2026 05:45:12 -0400
Received: from fout-a8-smtp.messagingengine.com ([103.168.172.151]:43461)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <dmitry@HIDDEN>) id 1x240L-0002kO-ON
 for 81592 <at> debbugs.gnu.org; Thu, 03 Sep 2026 05:45:10 -0400
Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44])
 by mailfout.phl.internal (Postfix) with ESMTP id 679E9EC0226;
 Thu,  3 Sep 2026 05:45:04 -0400 (EDT)
Received: from phl-frontend-04 ([10.202.2.163])
 by phl-compute-04.internal (MEProxy); Thu, 03 Sep 2026 05:45:04 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc
 :cc:content-transfer-encoding:content-type:content-type:date
 :date:from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to; s=fm2; t=1788428704;
 x=1788515104; bh=/ugF1S740LnvVB+oTMbcTzOSSPBTarqNZda9wjaS42k=; b=
 EFAA7Sbp7zKgCgZlzrbQnwmMfIH7cP4PAr1PI09d7Qtzr2OH++Z/kY3hl6j6PtjE
 e4ZkkxeZEyHOmvG//Rorng8MgRv9Jmb/QIs/0J/cfBStnNsUlb1nXLNBJ5OXRzBx
 KFQL7vjd3RqjLv6xsoIAUaU4m0Kn+sQsRbZo6KGOFM2VPZs1i73ApKUf45s8VBsM
 aYHrKuq7aW7Hbzmv42JccESFiVCC95jbA6DER4J+AlHchC+Cc6dbkIivwf80jI3b
 xSp5A1VOnXFZpQYRNnWS7k4TYcGqNaeq3qfRnNQjQHM/iA6opwwttjCLAIDEHoVr
 ZQhQ+ZO7aVh/y9ZWbKDcsg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:content-type:date:date:feedback-id:feedback-id
 :from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to:x-me-proxy
 :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1788428704; x=
 1788515104; bh=/ugF1S740LnvVB+oTMbcTzOSSPBTarqNZda9wjaS42k=; b=S
 i/ZWIOTrNjeXqIKcXsIRRelTrN9lCSdwSoH7i5pXCj0UhQrvnQKxPRBTh7A5FJhp
 DZEocl1kXpyxPl68Dy+JZCKmFFoyxurvmMRXl+hdavjHtqUxK6ZoGP8f3FnnTJRc
 LIt3tUPlfencfqLQGCdAqGm6U0Eb8lFtLUa+ICzrMzrmyHErXQrJmZqK0f6XMFXe
 M5hFgHy7sWDfxHoxINqNezH8r/6alh/y/BBPs8CQ95ks+VcSOr0ZsTur9RwIuWan
 87jiwcM90PsafWyLXh8YR++T963felOSYi+0alTeM7uaMidbojuub0n01NxzxEY8
 zVcZTOZmvzQ/G/P5UO5yQ==
X-ME-Sender: <xms:oEGZaqgW0XmO4y4TVVE8Dt69oiVkisdwFlhtxx1tkr6AsQKKXqKolQ>
 <xme:oEGZaieNE_3XUma0k_b93LVu86bNPJuCEPUEd-3XgBDJhN8yHXw8fErs6iUuq-x_a
 bKmK88OSbTfK0tFBJxvp6i9vWI75oyQhr6MMakaHbWUczm-k3cqJvRE>
X-ME-Received: <xmr:oEGZavcrlniiqNrbBTlpxgUF9vp44icJppAwOLPdH70rPE6R6zL4He0BGUOhDyDa3o49>
X-ME-Proxy-Cause: dmFkZTF937acVyEb9AJFWJIS2AjQTy0UZpgwfEMaRPCxHePyPBNv9Sew5tuRokpXotXxF3
 W0SSbR3mEC4nfrXskN3TRSPI4RsIW4hSCtWqaFZbJSoekhZeLfp4fsRlXoWDSCzoabWhow
 DvzDOoqj4qpgjLJw0DHf4GRj7/6wrtklgDwAgh2aVO0gApfIMmGtepiWAhY9/HeIXpbh0F
 N6XL0b73BE+m1N9tbgceyRIuFE5fyGHZYcbBnFjhHA8jSWLHsIc/q9PGF8d3BaJ1cr4Ofj
 wIGaqMl0JrxpsMpBjj6ELTVoPChmIVM76OH1SaVUXYYEhn9l+KwDYkL7ofD8QtpH+grSNR
 klxjk7YGRks78XwuBLz66oOMHsPAV5a5PUuQBPDpPHUAnehPayMxNFNaZ3FW0WbsYcKMx+
 F8wANx/FxNQO281ewO8Wj5UvzQ3gOnOAGiBoYokjDTkQzV44mg0l8/pvLXCyZ9aRWKCYYp
 ilj1767S9T2d2hEpM/PGHG23Uwv/cP1lyIfcQo90Wet5cnwudnXoQ8mh8IHlGjZUwMLA/0
 8HhBrByB1IqvtVibYkBAwqU3/OC0YnreRaL51fqHu5ScdN5cvnIhuFup/3usw+IaCwJYVN
 9FIIrJg7m6RwMfw3d74Tx6JjNYIN5JVO+BMt6Hxb83/ECzng892vcHQJhpyQ
X-ME-Proxy: <xmx:oEGZas8l7-WfvAzcwoQVXWQWXFaNFx4FfQIQ-at_aww9xCL0YJ5j3w>
 <xmx:oEGZarmOAIrtZqCK6W6f-5diOSy8au1sujcUvckMUI3Mx_8aZ_7AZQ>
 <xmx:oEGZau97lE0MeC-E5-9rUvYtgEKnFr5pJuSKWby1yKrVs2QxYlSSXg>
 <xmx:oEGZapmIuF8VoKvOaXsx5v3JBzbKfbGFFqPBR_Sr0Ptq2Cy47xD85Q>
 <xmx:oEGZaqJuLvMNGrJNgS_FBa4WsHL05c3bgXpkI_ijX2IO-cYmgqjJzEW2>
Feedback-ID: i07de48aa:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu,
 3 Sep 2026 05:45:03 -0400 (EDT)
Message-ID: <10b3e456-50ea-401d-8d40-06188db6f2f5@HIDDEN>
Date: Thu, 3 Sep 2026 12:45:01 +0300
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#81592: [PATCH] Implement `xref-location-line' for
 `xref-buffer-location'
To: Eli Zaretskii <eliz@HIDDEN>
References: <87zeyt3c4e.fsf@HIDDEN>
 <32bc2779-5602-4417-a265-eb867219a613@HIDDEN> <87mrubzzyu.fsf@HIDDEN>
 <0ee1a099-d4b3-4d7d-bee6-f4d5093100ca@HIDDEN> <86cxuu6g3e.fsf@HIDDEN>
Content-Language: en-US
From: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <86cxuu6g3e.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 81592
Cc: 81592 <at> debbugs.gnu.org, jroi.martin@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

On 03/09/2026 08:47, Eli Zaretskii wrote:
> Also, confusingly, M-. doesn't seem to work, so I cannot jump
> to a heading even if I know its text by heart.  Is it reasonable to
> have an Xref buffer without the Xref commands?

Mechanically, outline-xref is like project-find-regexp: it uses the Xref 
UI but without a backend.

And like that command, it is orthogonal to having an Xref backend defined.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#81592; Package emacs. Full text available.

Message received at 81592 <at> debbugs.gnu.org:


Received: (at 81592) by debbugs.gnu.org; 3 Sep 2026 09:39:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Sep 03 05:39:27 2026
Received: from localhost ([127.0.0.1]:51780 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1x23uo-0002MC-Re
	for submit <at> debbugs.gnu.org; Thu, 03 Sep 2026 05:39:27 -0400
Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:43247)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <jroi.martin@HIDDEN>)
 id 1x23un-0002LX-7q
 for 81592 <at> debbugs.gnu.org; Thu, 03 Sep 2026 05:39:26 -0400
Received: by mail-wr1-x42e.google.com with SMTP id
 ffacd0b85a97d-48431648f33so548284f8f.0
 for <81592 <at> debbugs.gnu.org>; Thu, 03 Sep 2026 02:39:25 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20251104; t=1788428359; x=1789033159; darn=debbugs.gnu.org;
 h=content-type:mime-version:message-id:date:references:in-reply-to
 :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to
 :content-type; bh=2Zgp97MbL80onBlaTi1vT87e00YQINOE0D23lXJGQoI=;
 b=AtRbGmhQqhdJv3GUwRYwW9qbEk/m2iWzAk5O0obSYhcRsSDcsgNUGM61neXd8Umy6N
 /ELBdz7FPoDpm/6Te4X+ykMvEv+xt99nwbea1bN2Np6OgAWhA5jamAgZVWlDNTANPRcQ
 Y8qYIk4N9E2P+I5mVgyadhGq0cuztC7E1jT5wrRVHkFrTkhejyS6N8aDKAtqTQDMz9CV
 WCQfTLdUwGO08/2IFg46JRuMiRsoAiSdowL6QUcdLjjXfxn7yHYMNp23F9iqcWhksFJp
 8TrjNT97FlgO4Bef0uU38uysoYdLYVj+RRhl3ZevpKSPXgr2GwoABeIXrl7usAzKr3ZL
 4CUg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20251104; t=1788428359; x=1789033159;
 h=content-type:mime-version:message-id:date:references:in-reply-to
 :subject:cc:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject
 :date:message-id:reply-to:content-type;
 bh=2Zgp97MbL80onBlaTi1vT87e00YQINOE0D23lXJGQoI=;
 b=XAzR89JPZA4+2YD5UhfUFbk/cHlHK+KiEtX9sPauzHtqztcY6cTC9pERwdCEFf8Mza
 /fnoTHUJnUO/2lrjsUIYhqQRzDu9cx1DWRD3KnZNODVDgQNvb8tsIh/XksqslEN8Bvcn
 ZHHj5yB4+CwgzFKfMkyOvaBkUFgzzaTNW2iePR/fEOhnLS8+wBV8FbRjTwYkvD9svQGb
 33sn+23lGh6GNyqEdoNABBKximDf5rsSQlkzKnAYuVLn/LlfF/XtrTKS5utJmmV1Ql77
 l/MbfNAchR1Z0h6b1p7vxFE53Pui0hwUmMyl5TknhIsGBBbMstQv1uOEI4CCpWw+VoPI
 BmPg==
X-Forwarded-Encrypted: i=1;
 AKwUvBwE18QaTi+/BwQXHP17Fg42uO3G5BUwelwuw+MpKX/hwaIboHBm2rna2FAwaZ46PAE1IRJzVg==@debbugs.gnu.org
X-Gm-Message-State: AFuF++mmijjf+T50SViKJXS7LksxCQL4mOTlA2fzTs3PdPKHOnDREsGZ
 usJ6YL7cjlmyK73gPcworVso2Usrve//qEw3iBb+BoT+dK9swWoDbdTtwf7tIQ==
X-Gm-Gg: AYBFou132y1zIZFqq3GSyxS74xKI+t/FnwxdOLjpew3cCFGeVzwCpP8pH6t93PHtgfe
 NpToOk/5lheqFM6MsWUwFiOPncfPZHRguoDYuFKk9XYl8W8SxUSNcwgCZHUyMss/+0koBbyAP4g
 1hNVeOKVip3YowievYJ8yrckn09j1oh9J1AzTs5TeN27vcdDo+4z2q8CkCsCOF9gGj/Ra6xOzES
 NNeBjo6MJiLo3x3xbXP5U4kaymYGgEhL1DHJf9+l7cPhwBSK+VPkWPCYtfgCHtvwZtJ2DoURl99
 /1S/RjZAx71PWW4O3/KeGCpVkGsU5jN/kO0inA1Wd7Ra+75PdHmYnyKCC+mKJN9BGPq9Okf8gEv
 5frcfLaKr98YLulgrKnKmggVjjPxLMLH1b9k8WrRJfb4QkyYyzk6NCkhbjsMuH2f1TpFjTQGtro
 LK/ng+l1dEs8ekX54DrZ3rY5wpEjF/6MRqbB609x+inomZruErNNf+n8zHZA==
X-Received: by 2002:a05:600c:4812:b0:49c:f259:940c with SMTP id
 5b1f17b1804b1-49cf259948bmr14002055e9.5.1788428358687; 
 Thu, 03 Sep 2026 02:39:18 -0700 (PDT)
Received: from localhost ([149.74.61.246]) by smtp.gmail.com with ESMTPSA id
 ffacd0b85a97d-48448e7315bsm12798444f8f.7.2026.09.03.02.39.17
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Thu, 03 Sep 2026 02:39:18 -0700 (PDT)
From: Roi Martin <jroi.martin@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#81592: [PATCH] Implement `xref-location-line' for
 `xref-buffer-location'
In-Reply-To: <87bjae3cgm.fsf@HIDDEN>
References: <87zeyt3c4e.fsf@HIDDEN>
 <32bc2779-5602-4417-a265-eb867219a613@HIDDEN>
 <87mrubzzyu.fsf@HIDDEN>
 <0ee1a099-d4b3-4d7d-bee6-f4d5093100ca@HIDDEN> <86cxuu6g3e.fsf@HIDDEN>
 <87h5k63hsw.fsf@HIDDEN> <861pba68n2.fsf@HIDDEN>
 <87ecfa3dl2.fsf@HIDDEN> <86y0di4ro8.fsf@HIDDEN>
 <87bjae3cgm.fsf@HIDDEN>
Date: Thu, 03 Sep 2026 11:39:17 +0200
Message-ID: <878q5i3c8q.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 81592
Cc: dmitry@HIDDEN, 81592 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.0 (/)

Roi Martin <jroi.martin@HIDDEN> writes:

> Eli Zaretskii <eliz@HIDDEN> writes:
>
>> So what is this command supposed to provide?  If it's just a
>> convenient way of jumping to some place in a buffer, then why is it
>> based on Xref and not, say, on Occur?
>
> The idea is to provide a quick overview of the current buffer and make
> it easy to jump around relevant sections.  It also allows you to edit
> the headings from the Xref buffer, which I find convenient for some
> refactoring tasks.
>
> Actually, the command was initially named `outline-occur' and used Occur
> internally.  However, it was later reimplemented using Xref and renamed
> to `outline-xref'.  The reason is that Occur is designed around regular
> expressions, while Outline supports both regular expressions and custom
> search functions to find outline headings.  In order to provide a
> navigable outline that matches the headings identified by Outline, both
> search strategies must be supported and Xref is better suited for this
> task, as it provides a generic framework to present "matches" to the
> user.
>
> When I say Outline, I don't mean Outline mode exclusively, but any mode
> that makes use of the Outline machinery.
>
>         Roi

BTW you can check Bug#81579 for additional context:

  https://debbugs.gnu.org/cgi/bugreport.cgi?bug=81579


        Roi




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#81592; Package emacs. Full text available.

Message received at 81592 <at> debbugs.gnu.org:


Received: (at 81592) by debbugs.gnu.org; 3 Sep 2026 09:34:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Sep 03 05:34:47 2026
Received: from localhost ([127.0.0.1]:51741 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1x23qI-0001wB-LJ
	for submit <at> debbugs.gnu.org; Thu, 03 Sep 2026 05:34:46 -0400
Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]:44071)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <jroi.martin@HIDDEN>)
 id 1x23qG-0001vb-Fy
 for 81592 <at> debbugs.gnu.org; Thu, 03 Sep 2026 05:34:45 -0400
Received: by mail-wm1-x335.google.com with SMTP id
 5b1f17b1804b1-495590dde14so23293865e9.0
 for <81592 <at> debbugs.gnu.org>; Thu, 03 Sep 2026 02:34:44 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20251104; t=1788428078; x=1789032878; darn=debbugs.gnu.org;
 h=content-type:mime-version:message-id:date:references:in-reply-to
 :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to
 :content-type; bh=rDnibAurrDUpS1b6vjfo3z6qmj/zjdVpJxdqasyk+Ac=;
 b=i2KFqwjkBE7v/brE6D5/bWT8r6qhhTsIA9YD7bDUFAoL3V5Y0fB4F0EKzraJPLEqVR
 vCbNK8vIH5zV2dr85jEpcuKS6Y/bu0BwoEk1MUORCgw0usg7iBheeMWktZzgiq+Yi+3l
 Xw92jgD2XGjRbQxSkEI4nrbv32wQgf3mr+gJx9GDW/mkDUE9phe8n02VmM5BlLVuQASB
 7MzA3L8gRiJfLHH2VxJIQeibgvpW2VFcti7ZDS7fBgTzR6UbceLaTD7BRCywLswI3YZY
 Kx3KqIP2TylaIiFU5skdYPeiRjk1aXRvYJoE1Vi2QW/Mngxwnh5exA+9QtIYbaj/5DTA
 EF3A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20251104; t=1788428078; x=1789032878;
 h=content-type:mime-version:message-id:date:references:in-reply-to
 :subject:cc:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject
 :date:message-id:reply-to:content-type;
 bh=rDnibAurrDUpS1b6vjfo3z6qmj/zjdVpJxdqasyk+Ac=;
 b=BQXicviLIul/wr/ObSiEDo/kJNAL3oVKEBOMafRDvc9MSouFJLPRuJ6kYwnTsMzM5x
 JyOCXsw+NTuoU+M6tJ5sGzFCnJHRkpO6KfJ3YvNMwXnlNyS8qGn4Ngr68Pn3uGsZVRER
 nzlppA8t3sFI5t3I0L1FiyQC0kHhWU0R/fK4mglmljyRKBMPK2y4qD6m7/IG4RWkKSMV
 A6MEgQjq0diDA/Pg1ODe14D4K+dFUAgPcHjkQIql6Rbfy5CcTCfbIDJTK2BbQXg6czeq
 wBh0nuquGUDssIzi28Ros+0/fHQPGOoQWZ5bPzlOA4voi0EtNV++6apS7LHXvFKJIcQl
 Xpdw==
X-Forwarded-Encrypted: i=1;
 AKwUvByzi+xyfcv9qD5GQ7v/RPlGQNYWvHw/YlcH1m8/J8eGPRyen0SHAUkKWffmO6Hx10DWFFTtow==@debbugs.gnu.org
X-Gm-Message-State: AFuF++lhElQOD6r31/pKu8IPFiT9gUEQYH6wcVwywWghvLGElP4IlCfi
 x/jTpw+B/zZer/T+9NNytbH2/rE8zoov/4BzU8aqAJNoJb4HMtyMB30D
X-Gm-Gg: AYBFou3TyxpiTEWoOKL0bUlYkvIgUyQDpahQxjM2cFiy4BGhvjzlntuquhU/s3ADmJX
 D85OciwyXbtDrGwldY21j9uWwsbd3bxLhspKj5CnMFaXHZYuQqeuUrLs1LGlIfncOh+trDF3UdD
 +Q0Hm/rL/DKoZDCKXtK2PUbhDbQtb9zB06tbO0NF77LBGIOsDNzd5TbHUQmQzlD/1BtsVXJgD+v
 +lhK7zOtXu0FYflGJgShw5gH0Umvirprr/otJPu2VhYH947Zs+ONDoy13EpZfbRucuXfIFsI5A5
 R4B9HCo8pNh+u8x9Qzu0HMttUCzAV4ZGYGfVNld5Ik1T0o3MGZCpyof5ONVGrUCNrlcVdzuuD/0
 vp1EpRT5vfBsia36+VCGff5P/18nMhD/gZEMldhOXYN/OD3DvciXUqrHRXNyqm8CoNn1ngPpJJH
 kZeMvRYp4CmN0eboktJtYsTvC50EUnXGIPiafI7566leWXBN0IzTndxY3YmxTWbarciRh3
X-Received: by 2002:a05:600c:5653:b0:49c:ed94:cdd8 with SMTP id
 5b1f17b1804b1-49ced94cdf3mr98166935e9.6.1788428077978; 
 Thu, 03 Sep 2026 02:34:37 -0700 (PDT)
Received: from localhost ([149.74.61.246]) by smtp.gmail.com with ESMTPSA id
 5b1f17b1804b1-49cee5d5d12sm55563195e9.5.2026.09.03.02.34.37
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Thu, 03 Sep 2026 02:34:37 -0700 (PDT)
From: Roi Martin <jroi.martin@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#81592: [PATCH] Implement `xref-location-line' for
 `xref-buffer-location'
In-Reply-To: <86y0di4ro8.fsf@HIDDEN>
References: <87zeyt3c4e.fsf@HIDDEN>
 <32bc2779-5602-4417-a265-eb867219a613@HIDDEN>
 <87mrubzzyu.fsf@HIDDEN>
 <0ee1a099-d4b3-4d7d-bee6-f4d5093100ca@HIDDEN> <86cxuu6g3e.fsf@HIDDEN>
 <87h5k63hsw.fsf@HIDDEN> <861pba68n2.fsf@HIDDEN>
 <87ecfa3dl2.fsf@HIDDEN> <86y0di4ro8.fsf@HIDDEN>
Date: Thu, 03 Sep 2026 11:34:33 +0200
Message-ID: <87bjae3cgm.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 81592
Cc: dmitry@HIDDEN, 81592 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.0 (/)

Eli Zaretskii <eliz@HIDDEN> writes:

> So what is this command supposed to provide?  If it's just a
> convenient way of jumping to some place in a buffer, then why is it
> based on Xref and not, say, on Occur?

The idea is to provide a quick overview of the current buffer and make
it easy to jump around relevant sections.  It also allows you to edit
the headings from the Xref buffer, which I find convenient for some
refactoring tasks.

Actually, the command was initially named `outline-occur' and used Occur
internally.  However, it was later reimplemented using Xref and renamed
to `outline-xref'.  The reason is that Occur is designed around regular
expressions, while Outline supports both regular expressions and custom
search functions to find outline headings.  In order to provide a
navigable outline that matches the headings identified by Outline, both
search strategies must be supported and Xref is better suited for this
task, as it provides a generic framework to present "matches" to the
user.

When I say Outline, I don't mean Outline mode exclusively, but any mode
that makes use of the Outline machinery.

        Roi




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#81592; Package emacs. Full text available.

Message received at 81592 <at> debbugs.gnu.org:


Received: (at 81592) by debbugs.gnu.org; 3 Sep 2026 09:20:50 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Sep 03 05:20:50 2026
Received: from localhost ([127.0.0.1]:51625 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1x23co-0000rf-1J
	for submit <at> debbugs.gnu.org; Thu, 03 Sep 2026 05:20:50 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:35704)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1x23cl-0000r0-17
 for 81592 <at> debbugs.gnu.org; Thu, 03 Sep 2026 05:20:47 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1x23cf-0008NB-Ly; Thu, 03 Sep 2026 05:20:41 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=AzGVEavvqmjS432OV9oYFodKC1vaqY5H1Ick1hlgh3M=; b=OR2TaUJCnyvL
 G4BTwoFv+SMAdUO/WwsYtqqib7GHfTs+iEYI2hj07RQp6dW7uEGG+MYvAcVF3/iYEiFKIgwNPMxfL
 qMSEcGgrNMNHQ398X43LgTnJJGneXzKKW2z2Fx9s9NCeolM1saQ/0Yd42l8MBXE8NzbIKL9caU/BQ
 0q4SUf7iY6XPhizlphe0YLZwe/qaFnMrg7Qh1jrc9TNmqh/mtGESMZuXSxE+K+Qq8ds571+x6l+Hr
 bx2CqA+AtAuS3yf0OUc2KxI4X/LMyyxdNPb22IeMcICHeYiN6x9htiuuzMdwWttvqbsO1erRNvIFr
 hNY0tVSj83xlnDV31cvTTQ==;
Date: Thu, 03 Sep 2026 12:20:39 +0300
Message-Id: <86y0di4ro8.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Roi Martin <jroi.martin@HIDDEN>
In-Reply-To: <87ecfa3dl2.fsf@HIDDEN> (message from Roi Martin on Thu, 03
 Sep 2026 11:10:17 +0200)
Subject: Re: bug#81592: [PATCH] Implement `xref-location-line' for
 `xref-buffer-location'
References: <87zeyt3c4e.fsf@HIDDEN>
 <32bc2779-5602-4417-a265-eb867219a613@HIDDEN>
 <87mrubzzyu.fsf@HIDDEN>
 <0ee1a099-d4b3-4d7d-bee6-f4d5093100ca@HIDDEN> <86cxuu6g3e.fsf@HIDDEN>
 <87h5k63hsw.fsf@HIDDEN> <861pba68n2.fsf@HIDDEN> <87ecfa3dl2.fsf@HIDDEN>
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 81592
Cc: dmitry@HIDDEN, 81592 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> From: Roi Martin <jroi.martin@HIDDEN>
> Cc: dmitry@HIDDEN, 81592 <at> debbugs.gnu.org
> Date: Thu, 03 Sep 2026 11:10:17 +0200
> 
> Eli Zaretskii <eliz@HIDDEN> writes:
> 
> >> The attached patch should fix this.
> >
> > Thanks, installed (with a tiny rewording to avoid past tense).
> 
> Thanks!
> 
> > I used it from the original buffer under Outline mode, like we use
> > M-. in other cases.
> 
> I guess it is up to outline.el to provide an Xref backend.  However, it
> seems tricky.  For instance, how would you handle finding the definition
> of the "identifier" at point if you are working with headings?
> 
> Keep in mind that `outline-xref' works not only with Outline mode
> buffers but with any major mode that sets `outline-search-function' or
> `outline-regexp'.  That includes, for instance, all tree-sitter modes,
> Org mode, several text and prog modes, etc.
> 
> A quick (and not very accurate) search shows:
> 
>   $ grep -l '(set.*\(outline-regexp\|outline-search-function\)' lisp/{text,prog}modes/*.el
>   textmodes/bibtex.el
>   textmodes/bibtex-style.el
>   textmodes/conf-mode.el
>   textmodes/emacs-authors-mode.el
>   textmodes/nroff-mode.el
>   textmodes/sgml-mode.el
>   textmodes/texinfo.el
>   textmodes/tex-mode.el
>   progmodes/antlr-mode.el
>   progmodes/bat-mode.el
>   progmodes/cc-mode.el
>   progmodes/cfengine.el
>   progmodes/cperl-mode.el
>   progmodes/elisp-mode.el
>   progmodes/grep.el
>   progmodes/gud.el
>   progmodes/perl-mode.el
>   progmodes/python.el
>   progmodes/ruby-mode.el
>   progmodes/scheme.el
>   progmodes/sh-script.el
>   progmodes/tcl.el
>   progmodes/xref.el

So what is this command supposed to provide?  If it's just a
convenient way of jumping to some place in a buffer, then why is it
based on Xref and not, say, on Occur?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#81592; Package emacs. Full text available.

Message received at 81592 <at> debbugs.gnu.org:


Received: (at 81592) by debbugs.gnu.org; 3 Sep 2026 09:10:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Sep 03 05:10:31 2026
Received: from localhost ([127.0.0.1]:51526 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1x23So-0008QD-Sq
	for submit <at> debbugs.gnu.org; Thu, 03 Sep 2026 05:10:31 -0400
Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]:56514)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <jroi.martin@HIDDEN>)
 id 1x23Sn-0008Pg-CO
 for 81592 <at> debbugs.gnu.org; Thu, 03 Sep 2026 05:10:29 -0400
Received: by mail-wr1-x42f.google.com with SMTP id
 ffacd0b85a97d-4843e9c5960so2057007f8f.0
 for <81592 <at> debbugs.gnu.org>; Thu, 03 Sep 2026 02:10:29 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20251104; t=1788426623; x=1789031423; darn=debbugs.gnu.org;
 h=content-type:mime-version:message-id:date:references:in-reply-to
 :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to
 :content-type; bh=0qrauyi4RT32cjz7OBGQgaNKD96JhkEWggaQCQj+WcA=;
 b=QZQ3RH7X5cvL9CuI78cFMYrEqJmidnBlEm200KtHo5WcqNZQQnNBiiO1kUTQu13i4n
 0qsrDlb55xfr/jRIq27yChLuGqcFy3X3CQt28H4+Z6oT/+gtEVwgU0Bxi4MN0aZ/tTvd
 0vOTeO+8ZPpdIMP1RJWndrrotKyLm0l2lxCq1TFy6AyIQUMmCHymhNH3+9cSsU6R2AJu
 aBnhbMR76b14TSz1Ls/DMrBIvmxDxu/EOXMBuXKCGJbSDIqdhdI013DSboq3Dn3qDBqq
 /qtzmxkxG/Futm3d7rAdty28liXHHRZoG8u29MXeDjJoLpUnBReKoICmYOn8gZ9A2QZd
 MsYQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20251104; t=1788426623; x=1789031423;
 h=content-type:mime-version:message-id:date:references:in-reply-to
 :subject:cc:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject
 :date:message-id:reply-to:content-type;
 bh=0qrauyi4RT32cjz7OBGQgaNKD96JhkEWggaQCQj+WcA=;
 b=oivP1Wpn3ZeyjW2bk/oc8OqH9aP7XNY1PngMdJNEPpDXFFvRyin8s27HsM/pJKZZqw
 u16rdOsCjvYex5Scctd0G1v4x5bj8IzGRNNaPDJt8sqvuXygWR64bDgwfb5PTh4o6hKq
 5DmzFsFfeQeMqgZMIExVD7C4uHBw7B1QJ+m8Bx00t2JwZN7ZOA9E7xKaZwlLLhgOTDru
 qzoOdHOVqsT07Bhqa+HHAzq3q4DhI102dVbXc6mpSH8S56gMm6vRsS7g2KtPrDFtVZwr
 M1ae7LVVKLz0rgmeOBuk5CJWKUQ0kvPs1mrlUaeh0hoK0Llir3az2SNa85i+172W+reg
 nA4A==
X-Forwarded-Encrypted: i=1;
 AKwUvBzTZmJIqIFiyxx6l6ZUnwUv693WqqDlvdkvd6ZmBscoEMB59WGLmZRF9ua6Yzum+PI1dNKMfA==@debbugs.gnu.org
X-Gm-Message-State: AFuF++kIQgIRG2PzmcWv+CPBG3GPwGxTBzz74wNhWOwRbuf2W8/3hHqj
 9EUeFG5/gx3LWy0J773UEMLM1BwT7uzvwosY/OAZxLSAt6xd7+q4a/Os
X-Gm-Gg: AYBFou29UWFFkpW0TPhDOBfcvyMT7cowpV46hGj/eqjJ6GxwDl5IjxyjNpFDup7MslB
 IByRaSG38ZDraji6Vq2FHXbFsba6oBy6kpENGd2+CG0AdDVaEtosaqmjTDB2OWG60CZbZI918x/
 EtxSFrE54Nca/cuRxMVLOT8jmz4suB90STgXh424IsOz1JTBGuJRpPpLwnwrL1tjt/LUF1olU8k
 JCD9lqOHEjYkfnwfvXMi9uK+LKCdYRXGKfQjAegnMa1JGYsKRw4p3ttUVNiEk5/XdwYhgqJ+Nhe
 AmkTsg+oqmfRZS32GPToKC4fAeIU19wrCyRznq7kIrEK9UFECJtPkZtH+L397zuHgzmupXPYNQW
 JqGvwjlDFm981LoZPcQ7azGRl6oEPM77dau0c9Rhc+J1oykG8MUJ3diVHjvOV2jz6JYo+yUOFfC
 7OT3b0ShlvjEONkO6XawlDhq7/q34tXH+1so5HfVRk8F2xewPTqB1FU/Z1ww==
X-Received: by 2002:a05:6000:4912:b0:484:3313:fd87 with SMTP id
 ffacd0b85a97d-484914e640dmr22624726f8f.28.1788426622832; 
 Thu, 03 Sep 2026 02:10:22 -0700 (PDT)
Received: from localhost ([149.74.61.246]) by smtp.gmail.com with ESMTPSA id
 ffacd0b85a97d-48448eea961sm12435558f8f.28.2026.09.03.02.10.21
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Thu, 03 Sep 2026 02:10:22 -0700 (PDT)
From: Roi Martin <jroi.martin@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#81592: [PATCH] Implement `xref-location-line' for
 `xref-buffer-location'
In-Reply-To: <861pba68n2.fsf@HIDDEN>
References: <87zeyt3c4e.fsf@HIDDEN>
 <32bc2779-5602-4417-a265-eb867219a613@HIDDEN>
 <87mrubzzyu.fsf@HIDDEN>
 <0ee1a099-d4b3-4d7d-bee6-f4d5093100ca@HIDDEN> <86cxuu6g3e.fsf@HIDDEN>
 <87h5k63hsw.fsf@HIDDEN> <861pba68n2.fsf@HIDDEN>
Date: Thu, 03 Sep 2026 11:10:17 +0200
Message-ID: <87ecfa3dl2.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 81592
Cc: dmitry@HIDDEN, 81592 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.0 (/)

Eli Zaretskii <eliz@HIDDEN> writes:

>> The attached patch should fix this.
>
> Thanks, installed (with a tiny rewording to avoid past tense).

Thanks!

> I used it from the original buffer under Outline mode, like we use
> M-. in other cases.

I guess it is up to outline.el to provide an Xref backend.  However, it
seems tricky.  For instance, how would you handle finding the definition
of the "identifier" at point if you are working with headings?

Keep in mind that `outline-xref' works not only with Outline mode
buffers but with any major mode that sets `outline-search-function' or
`outline-regexp'.  That includes, for instance, all tree-sitter modes,
Org mode, several text and prog modes, etc.

A quick (and not very accurate) search shows:

  $ grep -l '(set.*\(outline-regexp\|outline-search-function\)' lisp/{text,prog}modes/*.el
  textmodes/bibtex.el
  textmodes/bibtex-style.el
  textmodes/conf-mode.el
  textmodes/emacs-authors-mode.el
  textmodes/nroff-mode.el
  textmodes/sgml-mode.el
  textmodes/texinfo.el
  textmodes/tex-mode.el
  progmodes/antlr-mode.el
  progmodes/bat-mode.el
  progmodes/cc-mode.el
  progmodes/cfengine.el
  progmodes/cperl-mode.el
  progmodes/elisp-mode.el
  progmodes/grep.el
  progmodes/gud.el
  progmodes/perl-mode.el
  progmodes/python.el
  progmodes/ruby-mode.el
  progmodes/scheme.el
  progmodes/sh-script.el
  progmodes/tcl.el
  progmodes/xref.el


        Roi




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#81592; Package emacs. Full text available.

Message received at 81592 <at> debbugs.gnu.org:


Received: (at 81592) by debbugs.gnu.org; 3 Sep 2026 08:28:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Sep 03 04:28:59 2026
Received: from localhost ([127.0.0.1]:51159 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1x22od-0004yz-4R
	for submit <at> debbugs.gnu.org; Thu, 03 Sep 2026 04:28:59 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:55096)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1x22ob-0004yn-GF
 for 81592 <at> debbugs.gnu.org; Thu, 03 Sep 2026 04:28:58 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1x22oW-0003eg-07; Thu, 03 Sep 2026 04:28:52 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From:
 Date; bh=hD6IRqFvdtHKWw7MnJUETJJzS/HQ/fJvFVce8JxuniM=; b=jQcpppmaWyIWlfrrenJq
 KkAp9XdV8ZB2fV5SveA56LEikz3h2WwkToOYI1m1Wpn1J++zN6mAWBC9fFdGAWg3og/bmqS1ZrIXP
 1as0tG+dCfZYwTwfWjzHdg2h6H1gEHNorCk9ll9GcEV62l4mC57tJvN1ftQqqXyI+t8SalGhKX31f
 x4pt6y/zP3QmOkNpXTfe6X5khrDpYlyN+IVUBlGvgsaBYYIPiT7mPUQaj61viUReNS8yG8ojcoKza
 Y33AitmytNPvg5BkN/02EU+riWGZfrJFYvciHT8Nnhf28YWn73KbXd9Sy9ZjJSNjlQrOuY0tMLHFs
 6DMtrPrB37otRg==;
Date: Thu, 03 Sep 2026 11:28:49 +0300
Message-Id: <861pba68n2.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Roi Martin <jroi.martin@HIDDEN>
In-Reply-To: <87h5k63hsw.fsf@HIDDEN> (message from Roi Martin on Thu, 03
 Sep 2026 09:39:11 +0200)
Subject: Re: bug#81592: [PATCH] Implement `xref-location-line' for
 `xref-buffer-location'
References: <87zeyt3c4e.fsf@HIDDEN>
 <32bc2779-5602-4417-a265-eb867219a613@HIDDEN>
 <87mrubzzyu.fsf@HIDDEN>
 <0ee1a099-d4b3-4d7d-bee6-f4d5093100ca@HIDDEN> <86cxuu6g3e.fsf@HIDDEN>
 <87h5k63hsw.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 81592
Cc: dmitry@HIDDEN, 81592 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> From: Roi Martin <jroi.martin@HIDDEN>
> Cc: 81592 <at> debbugs.gnu.org
> Date: Thu, 03 Sep 2026 09:39:11 +0200
> 
> Eli Zaretskii <eliz@HIDDEN> writes:
> 
> > Can we please improve the doc string?  It now hides more than it
> > reveals:
> >
> >   Navigate the current buffer’s outline using Xref.
> >   If ‘outline-search-function’ is defined, it is used to find the outline
> >   headings.  Otherwise, the ‘outline-regexp’ variable is used.
> >
> > IMO, it should at least say that it pops up an Xref buffer with the
> > outline headings, and allows navigation using Xref commands in that
> > buffer.
> 
> The attached patch should fix this.

Thanks, installed (with a tiny rewording to avoid past tense).

> > Also, confusingly, M-. doesn't seem to work, so I cannot jump to a
> > heading even if I know its text by heart.  Is it reasonable to have an
> > Xref buffer without the Xref commands?
> 
> All the commands referenced by `xref--xref-buffer-mode-map' and
> `xref-edit-mode-map' should work.  These are the maps used by Xref Mode
> and Xref-Edit Mode.  So using an Xref buffer to navigate/edit an outline
> feels quite natural to me.
> 
> Regarding `M-.', where are you trying to use it?  As far as I can tell,
> it does not work from an Xref buffer.

I used it from the original buffer under Outline mode, like we use
M-. in other cases.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#81592; Package emacs. Full text available.

Message received at 81592 <at> debbugs.gnu.org:


Received: (at 81592) by debbugs.gnu.org; 3 Sep 2026 07:39:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Sep 03 03:39:27 2026
Received: from localhost ([127.0.0.1]:50806 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1x222h-0001I1-8Y
	for submit <at> debbugs.gnu.org; Thu, 03 Sep 2026 03:39:27 -0400
Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]:53594)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <jroi.martin@HIDDEN>)
 id 1x222e-0001HX-Ku
 for 81592 <at> debbugs.gnu.org; Thu, 03 Sep 2026 03:39:25 -0400
Received: by mail-wm1-x333.google.com with SMTP id
 5b1f17b1804b1-4995b0343c1so22439095e9.3
 for <81592 <at> debbugs.gnu.org>; Thu, 03 Sep 2026 00:39:24 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20251104; t=1788421158; x=1789025958; darn=debbugs.gnu.org;
 h=content-type:mime-version:message-id:date:references:in-reply-to
 :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to
 :content-type; bh=oJru9JVDSCdl5+w4wbGccbCAL7WWXtMfZ0keH4qeGKU=;
 b=PcqeISpLPKTnewDEAPT4kLyafwWhaVzNpoqh2gWSyO1QZy/9IfzWU8dmwVMCMen47n
 vopW/Q/Hkh0nRTiA4LHOWUNdb7Y/96dPc8fasadPXTmPshhWqZGV0vVerwetjVbKCAhj
 zhaXVSFWwmXLQIMjM3LuMvDkZ4eHY0e4sJEgIJxZ6bSKFE7Ccn0rHekCjzuB6eXUgq6Q
 Xo5Qg9B7g8E/o0gJHjRz7kILhh6vKtVZKkC/XkwaoYXH7MfWKYRclaTXrTh3yKdXoUYa
 F+tR3qMmwAtvntQkcXg/rkpw0DobznnMi2HKAgA7s2qIWee6hY59WksrxuDRhBbaXCNc
 K1Ug==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20251104; t=1788421158; x=1789025958;
 h=content-type:mime-version:message-id:date:references:in-reply-to
 :subject:cc:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject
 :date:message-id:reply-to:content-type;
 bh=oJru9JVDSCdl5+w4wbGccbCAL7WWXtMfZ0keH4qeGKU=;
 b=ab806qfsfeyoEqUKj2fY6tnHptSNCogCeJWD8WlappXHNxnu+L/6UVqFFD1GwtUNcX
 BofyVlxGtkSsgCUfntFAdqixtMRBH6g7WtqMN2n0dczhRfpon4d/CXRgDZb26jxnQh7s
 tFwuiwbe9R3N3tf9O8zMTgy4h9PHv2Nkkk+DTBRHcDvdKUfsb3ufjiDKbFPxTPEub/jf
 vOFPtgXpLAZ8jeDrHlvcc4gwkVE0h+trjfVL1aszpJwuuuZ0lr5EbX/5/sxlJeaE1yrA
 o0opEmC5jjvqgjUH2wFevHfTlzq4Eh5nJ1fRbuM9WyHOj4wROXfBEd+A4UiNu/Ev2+lp
 HDDQ==
X-Gm-Message-State: AFuF++kJqygHcbILhu+l2oyTTvkh7VkXV33V7xYdv2yeoHe1GlVUcMPz
 hjL5Dw8HVhwg8XqJeeGMmPCmgZPQCcwGwLXaJr5GWWKTZYF9+hpsK10aJm1vcw==
X-Gm-Gg: AYBFou3EbZIiL8iY6kCarLgS3IPoWfLTcMM/fiHJrhyPrDeGR3t8Rp0pxoWyZgMshos
 ItBnfxcXJpC0jybRWHQovdbPZ0SP3OxroVowfW9ATjRNLQPxJdJSkYu3iamBhMBD3DE3QFDuGtL
 brnGkEJrRS+QAxMd+eQimzP8S8FqoF/ESxRn7Sfu3Fys//JYXu7liM5Zd7DcJMcJgRTGzv12N7F
 uzjrkQX9L0ueViDrSY1UCjlrllmwcal/TA92Z+3wS/9l4fjrseMtYqLNn2ZP7oKlFhr0G4WEggz
 BxpENEcIXPy4IAhrE75k9uGascGDw20I5fXVGvh0GMqGpCXB6ezZacNJ3tWNx4g85D5P8aoNPhm
 UMOPDYe4m6p9QmCPuDHipl9Q5McFNX0Pp4T6J6aDsBFJAp1i5Bv2K9+2NyRuRko6MotiIKv++6E
 HUseAascJS/a85zbxkFdUxFj02eVTAtmEeT4yeJpayP0dvkjAvd1yyxdl68kVJ
X-Received: by 2002:a05:600c:468b:b0:49c:d019:70c5 with SMTP id
 5b1f17b1804b1-49ce55d1fe3mr135954625e9.0.1788421157733; 
 Thu, 03 Sep 2026 00:39:17 -0700 (PDT)
Received: from localhost ([178.139.170.194]) by smtp.gmail.com with ESMTPSA id
 5b1f17b1804b1-49cee5d9db2sm50378085e9.8.2026.09.03.00.39.16
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Thu, 03 Sep 2026 00:39:17 -0700 (PDT)
From: Roi Martin <jroi.martin@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>, Dmitry Gutov <dmitry@HIDDEN>
Subject: Re: bug#81592: [PATCH] Implement `xref-location-line' for
 `xref-buffer-location'
In-Reply-To: <86cxuu6g3e.fsf@HIDDEN>
References: <87zeyt3c4e.fsf@HIDDEN>
 <32bc2779-5602-4417-a265-eb867219a613@HIDDEN>
 <87mrubzzyu.fsf@HIDDEN>
 <0ee1a099-d4b3-4d7d-bee6-f4d5093100ca@HIDDEN> <86cxuu6g3e.fsf@HIDDEN>
Date: Thu, 03 Sep 2026 09:39:11 +0200
Message-ID: <87h5k63hsw.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 81592
Cc: 81592 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.0 (/)

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Eli Zaretskii <eliz@HIDDEN> writes:

> Can we please improve the doc string?  It now hides more than it
> reveals:
>
>   Navigate the current buffer=E2=80=99s outline using Xref.
>   If =E2=80=98outline-search-function=E2=80=99 is defined, it is used to =
find the outline
>   headings.  Otherwise, the =E2=80=98outline-regexp=E2=80=99 variable is =
used.
>
> IMO, it should at least say that it pops up an Xref buffer with the
> outline headings, and allows navigation using Xref commands in that
> buffer.

The attached patch should fix this.

> Also, confusingly, M-. doesn't seem to work, so I cannot jump to a
> heading even if I know its text by heart.  Is it reasonable to have an
> Xref buffer without the Xref commands?

All the commands referenced by `xref--xref-buffer-mode-map' and
`xref-edit-mode-map' should work.  These are the maps used by Xref Mode
and Xref-Edit Mode.  So using an Xref buffer to navigate/edit an outline
feels quite natural to me.

Regarding `M-.', where are you trying to use it?  As far as I can tell,
it does not work from an Xref buffer.

        Roi


--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment;
 filename=0001-lisp-outline.el-outline-xref-Improve-doc-string.-Bug.patch

From 31824a5863e99a8caedf579639f260e231764cd6 Mon Sep 17 00:00:00 2001
From: Roi Martin <jroi.martin@HIDDEN>
Date: Thu, 3 Sep 2026 09:23:56 +0200
Subject: [PATCH] ; * lisp/outline.el (outline-xref): Improve doc string. 
 (Bug#81592)

---
 lisp/outline.el | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lisp/outline.el b/lisp/outline.el
index e3373368c20c..965fa9db53d4 100644
--- a/lisp/outline.el
+++ b/lisp/outline.el
@@ -2368,7 +2368,11 @@ outline-xref--show-xrefs
 ;;;###autoload
 (defun outline-xref ()
   "Navigate the current buffer's outline using Xref.
-If `outline-search-function' is defined, it is used to find the outline
+Display an Xref buffer with the outline headings found in the current
+buffer.  Xref commands can be used from this buffer to navigate and edit
+the outline.
+
+If `outline-search-function' is non-nil, it is used to find the outline
 headings.  Otherwise, the `outline-regexp' variable is used."
   (interactive)
   (cond
-- 
2.55.0


--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#81592; Package emacs. Full text available.

Message received at 81592 <at> debbugs.gnu.org:


Received: (at 81592) by debbugs.gnu.org; 3 Sep 2026 07:11:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Sep 03 03:11:23 2026
Received: from localhost ([127.0.0.1]:50627 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1x21bX-0007jg-3V
	for submit <at> debbugs.gnu.org; Thu, 03 Sep 2026 03:11:23 -0400
Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]:61715)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <jroi.martin@HIDDEN>)
 id 1x21bT-0007jS-VR
 for 81592 <at> debbugs.gnu.org; Thu, 03 Sep 2026 03:11:20 -0400
Received: by mail-wm1-x32a.google.com with SMTP id
 5b1f17b1804b1-49ccfae359fso14136235e9.3
 for <81592 <at> debbugs.gnu.org>; Thu, 03 Sep 2026 00:11:19 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20251104; t=1788419474; x=1789024274; darn=debbugs.gnu.org;
 h=content-type:mime-version:message-id:date:references:in-reply-to
 :subject:to:from:from:to:cc:subject:date:message-id:reply-to
 :content-type; bh=yfnF0fIqp/3AbFgjLy8NhjyKQkQ4oZorrsO7wnNqAkc=;
 b=nahMrQTPQJdRzEzycq8ZJOTxrgf5taU7W1jCX3S6Oi9HO0Cz3FvJ6U5A94xzNzTnxt
 twYYmxkTpIc2dwUIRRcSNZoiRIiWiRlDtfiCEQIi4X1SaH9P3rhlv7uPJoTNLhnuw8Kp
 WTBjkjgBODDoKtsEssFmRIBV3yelCB/xwDSEaRKz0pSJIyoW7KsJUnaTNlaCsyY3y1MV
 2Cc0RcsAnrxmoYkeULYiVJclVfFzlhoonWoPtVW2/Iw0bLpUgSlq2DjUW2dU9WAeAqUN
 40wcymsRuyNy/dP5wM+5OpbOeO3xOTJ1kByesOD/BFPVRLSg9G8GoEGHhPQdTLwRAQHP
 vZrA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20251104; t=1788419474; x=1789024274;
 h=content-type:mime-version:message-id:date:references:in-reply-to
 :subject:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date
 :message-id:reply-to:content-type;
 bh=yfnF0fIqp/3AbFgjLy8NhjyKQkQ4oZorrsO7wnNqAkc=;
 b=CiLzQBtFyCP1ZikEfoqsIXTF7XFD2W4xxgFmmJuo+/FUttnCfEdCPWCuE4hH83cccq
 bpwm/tiRH4Cb7ntlY/IP8xcNQauoMhgWRiC/WvTpPe7xO0w8D6730QhP73HAn6zWzAZu
 LWEZSah1bEvOraciMW/FhGn5xIGnnBeNqMx5SeCLJ/4MrT+CAqdbBNrzgoxfzyTetZtP
 hs/UkwVObda4EYKRRvw5bRYUWgqrYnv+mlnIO3PMRXFFfbvLvNw76kvLfFNPMrN8h892
 Dri2m25V88WuVpuO03+wov/hw+ga+o3HCwqzsUHx/uNEOtZdpEKKCMCIEQqwrbAmr9om
 67KQ==
X-Forwarded-Encrypted: i=1;
 AKwUvBw/EqIfduLA36uSR9UZRAggXjRaqyAfIubJXyih6doYIehzpsbUROX/yqoE46WvWNx9/qkWDg==@debbugs.gnu.org
X-Gm-Message-State: AFuF++kR11mzf16H2u6pabhxqRm6XOVGaL9sGw5uo21SOmvLXld6vjOF
 D5oVCGpRRpdGL+wVNVPYf5mZ6awjyWcrTz0aGejpljwMJSSFGKFD6S5T
X-Gm-Gg: AYBFou2N4eKSB08wADJejcCpuSHL2nT+glT0PWWWwnyoTUu+0g37IdJAtGGmdvGnZX5
 pnue7SNqFOVR+01VYvjxJHBNF4Ml3l9OgN33dJg4WDjmh8ZkhguZrqs1GWnG5IRQb+kkjBOb/xM
 a6oMRPO5OLiD2jT6nqjg9QqH4v4HyBC5GUnuK9UUe81niBpFEIgTTmPJPi30BCMaG/AisyonR2e
 Dn7wixLEfEBAU0at0rA+IB0osnWfeBBSFWjJuEIgyl5hd3eVj7Q3xQI8YKfqNpuHw0A7loN6xbw
 r3U7WPEViphJ+fhzqB67gXpMEnmHCXWxao1gMwPh+esane0ZqOEnhUO58td8NeWXMUMYFZDln+C
 blhJRip8WhV12pd0aJGIr/dES3iwK/vsnv+lbURckDieFRZOA1I6/uboUJjw2pkSPdJ2jOS6jCf
 SptwZfr5dLgQkBgjg/rsSxoOgWa31gEJuJsQwGf/M8CBm8yFxLZdoWoW10/m8t
X-Received: by 2002:a05:600c:45c4:b0:499:79b9:e220 with SMTP id
 5b1f17b1804b1-49ce5816186mr173427415e9.10.1788419473426; 
 Thu, 03 Sep 2026 00:11:13 -0700 (PDT)
Received: from localhost ([178.139.170.194]) by smtp.gmail.com with ESMTPSA id
 5b1f17b1804b1-49cee5d9db2sm48580515e9.8.2026.09.03.00.11.12
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Thu, 03 Sep 2026 00:11:12 -0700 (PDT)
From: Roi Martin <jroi.martin@HIDDEN>
To: Dmitry Gutov <dmitry@HIDDEN>, 81592 <at> debbugs.gnu.org
Subject: Re: bug#81592: [PATCH] Implement `xref-location-line' for
 `xref-buffer-location'
In-Reply-To: <0ee1a099-d4b3-4d7d-bee6-f4d5093100ca@HIDDEN>
References: <87zeyt3c4e.fsf@HIDDEN>
 <32bc2779-5602-4417-a265-eb867219a613@HIDDEN>
 <87mrubzzyu.fsf@HIDDEN>
 <0ee1a099-d4b3-4d7d-bee6-f4d5093100ca@HIDDEN>
Date: Thu, 03 Sep 2026 09:11:10 +0200
Message-ID: <87jyp23j3l.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 81592
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.0 (/)

Dmitry Gutov <dmitry@HIDDEN> writes:

> To preface the below, your patch in installed in master, commit 
> 85e8054a09c. Thanks!

Thanks!

> Here's some numbers.
>
> Using 'M-x outline-xref', a good test example is etc/NEWS.31: 4000 
> lines, 800 outlines entries. With that buffer visited:
>
>    (benchmark-run 10 (save-window-excursion (outline-xref)))
>
> Before the patch, it shows ~300ms here. After the change: ~800ms. With 
> the code-byte compiled in both cases.
>
> To illustrate where the time is spent, evaluate at eob of etc/NEWS.31:
>
>    (benchmark-run 800
>      (with-current-buffer (current-buffer)
>        (line-number-at-pos (point))))
>
> - here it's 50ms. The math is off by 2x, but this is approximate anyway.
>
> In any case, 80ms per command is still below the "instant" threshold, so 
> it should be fine for most cases. But improvements welcome.

Thanks a lot for the analysis and for letting me know the details!  I'll
run similar tests before proposing future changes that could affect
performance.

        Roi




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#81592; Package emacs. Full text available.

Message received at 81592 <at> debbugs.gnu.org:


Received: (at 81592) by debbugs.gnu.org; 3 Sep 2026 05:48:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Sep 03 01:48:00 2026
Received: from localhost ([127.0.0.1]:49917 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1x20Ip-00017q-He
	for submit <at> debbugs.gnu.org; Thu, 03 Sep 2026 01:47:59 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:45436)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1x20In-00017R-JD
 for 81592 <at> debbugs.gnu.org; Thu, 03 Sep 2026 01:47:58 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1x20Ii-0005hr-4P; Thu, 03 Sep 2026 01:47:52 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From:
 Date; bh=eBWLR8YHX+4KtrpMP5g3zrged9En6BdrUQwUzLe4dXM=; b=nYV3FSIU7bjQKGV/06RX
 5f9zw0iDf4T9rpRGcqfLI+w2pjMzs7XUroLxnfQOUzWECgFGdFkchFccnJPmOiw7+s1QIqCHRQ3m9
 f7Lj8pYA2ptTZHAg7XVjmxdJady4vKpSQ8y6bMBGpIPrrgxDFjnqlor8H/gr3lUxRhrmXTiITQDD4
 b6qZ0Yf3N7RsQugC+smVh9hJLztffIDOiZ/sdq0VPn4BXrP4vMUsjckJnX1/t8PIzCThwhcpcj4mH
 bVXOHEdzezqFi3gYAdz+sfkNoa6+++BR906a7B5MOWmcgRdJ3rFjfVmYlcpKumtDPs4YvGAu5Ollq
 pHqKwYMOuOCe5w==;
Date: Thu, 03 Sep 2026 08:47:49 +0300
Message-Id: <86cxuu6g3e.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <0ee1a099-d4b3-4d7d-bee6-f4d5093100ca@HIDDEN> (message from
 Dmitry Gutov on Thu, 3 Sep 2026 02:32:52 +0300)
Subject: Re: bug#81592: [PATCH] Implement `xref-location-line' for
 `xref-buffer-location'
References: <87zeyt3c4e.fsf@HIDDEN>
 <32bc2779-5602-4417-a265-eb867219a613@HIDDEN> <87mrubzzyu.fsf@HIDDEN>
 <0ee1a099-d4b3-4d7d-bee6-f4d5093100ca@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 81592
Cc: 81592 <at> debbugs.gnu.org, jroi.martin@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> Date: Thu, 3 Sep 2026 02:32:52 +0300
> From: Dmitry Gutov <dmitry@HIDDEN>
> 
> On 24/08/2026 11:26, Roi Martin wrote:
> > Dmitry Gutov <dmitry@HIDDEN> writes:
> > 
> >> Could you mention the feature that you are using these locations from?
> >> Is it for Xref-from-Outline buffers?
> > 
> > Yes, I'm using Xref for the `outline-xref' command.
> 
> I've re-read that submission now, solid change. Even just scanning the 
> NEWS file (with navigation) works pretty well!
> 
> >> I'm asking because the performance characteristics of line-number-at-pos
> >> are linear to the line number; if there are really a lot of matches
> >> sometimes, it might need some sort of cache.
> > 
> > Strictly speaking, line numbers are not a hard requirement for
> > `outline-xref', though they would provide additional context, and I
> > don't expect the command's output to be huge.  Also, IMHO it feels more
> > consistent to show line numbers for both `xref-make-file-location' and
> > `xref-make-buffer-location'.
> 
> You are quite right, but my question was about performance.
> 
> To preface the below, your patch in installed in master, commit 
> 85e8054a09c. Thanks!

Can we please improve the doc string?  It now hides more than it
reveals:

  Navigate the current buffer’s outline using Xref.
  If ‘outline-search-function’ is defined, it is used to find the outline
  headings.  Otherwise, the ‘outline-regexp’ variable is used.

IMO, it should at least say that it pops up an Xref buffer with the
outline headings, and allows navigation using Xref commands in that
buffer.  Also, confusingly, M-. doesn't seem to work, so I cannot jump
to a heading even if I know its text by heart.  Is it reasonable to
have an Xref buffer without the Xref commands?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#81592; Package emacs. Full text available.

Message received at 81592 <at> debbugs.gnu.org:


Received: (at 81592) by debbugs.gnu.org; 2 Sep 2026 23:33:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 02 19:33:04 2026
Received: from localhost ([127.0.0.1]:45911 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1x1uS0-0000ab-0T
	for submit <at> debbugs.gnu.org; Wed, 02 Sep 2026 19:33:04 -0400
Received: from fhigh-a2-smtp.messagingengine.com ([103.168.172.153]:53065)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <dmitry@HIDDEN>) id 1x1uRx-0000Zp-26
 for 81592 <at> debbugs.gnu.org; Wed, 02 Sep 2026 19:33:02 -0400
Received: from phl-compute-07.internal (phl-compute-07.internal [10.202.2.47])
 by mailfhigh.phl.internal (Postfix) with ESMTP id 8CD781400054;
 Wed,  2 Sep 2026 19:32:55 -0400 (EDT)
Received: from phl-frontend-04 ([10.202.2.163])
 by phl-compute-07.internal (MEProxy); Wed, 02 Sep 2026 19:32:55 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc
 :content-transfer-encoding:content-type:content-type:date:date
 :from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to; s=fm2; t=1788391975;
 x=1788478375; bh=H8Y+zNhtqHqurFGTX/AFfIIEWYV6cGhvCtNfcKGAZbI=; b=
 dXFp4FtPvGwOwJHc191UW4ySPtiF3NWaMMMmmXc2vqOSkB8BFLvE1fQHt8Gu8vST
 c9HCHJNVjzkSUWlEeTOqzX0uruJoDPP0FiXUZVEA7DSSsUkc35rnZEZkbIGdS/W8
 gLTffLRgn+9HBNitCCgKMG884LPYhnIG4FryWVUC+czZ/A7gFYCRjJdF/NmGcm03
 yfVhMGCVX1hjbBNkbaSBMXCBrMfQQW1Edgnprqh6RzI4fVlpSiCJHjkasM+3lYWd
 OaosKfhg9SSLcs+0IHSKRJXzVNxWT/XMrl5J0KHEkxUiYN3d0pTvPCxtZcfb/Ka2
 7bhrhrqd908Pe89WbqZHbw==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-transfer-encoding:content-type
 :content-type:date:date:feedback-id:feedback-id:from:from
 :in-reply-to:in-reply-to:message-id:mime-version:references
 :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender
 :x-me-sender:x-sasl-enc; s=fm1; t=1788391975; x=1788478375; bh=H
 8Y+zNhtqHqurFGTX/AFfIIEWYV6cGhvCtNfcKGAZbI=; b=mrMX6l7pfSQKVpFM8
 ip+7Kl8C4wCtkNZH8j6M5OEgnIQs3kgSfWBy6ZkgG7apT7+xzAvaHr6uJk024J7F
 3nI3BH+auth8VBrqEzwDUf6OsGOnQOX3r+7nUzyyAZtTvd5IJ4Z+FjLdrHOVvAYK
 55c9dmwWlMZjLvz4Oi/p2SR+5yuxatA7w3dFIMGLW8wqdsUGlr5z8A42Zga8uWf3
 hLUr7emhxoiuYWIasVkt5byMrLBDt5JTfIlX/o8dRVAqTtDVMiWcEeIoLx971iST
 wYfjjv+R9QN2gWtSPyXvyZLAZrJzOTkpSR+3ipcRNrER0Vfyan2bkq1Pwg0A24Y/
 oy2hg==
X-ME-Sender: <xms:J7KYakZ1zIs8JBP7Dl_V0sKwT67cP00jz5SZ9dGdUOfZykeJd6ohRw>
 <xme:J7KYalZyhuCvNfWw8rXO5KSdB3hh8wfqI5LucwbQxV2_-WuUqcA1Y_-puS0JWq7vd
 ZrInWqt2yKFVrRBrAiN31XDVVqEjWv1ujs34EzNw_81iXxXVTDuq9ht>
X-ME-Received: <xmr:J7KYasnoiJP5iM2q0HVq9iBs2cgAl5Yhztj_lSjgkQe0vGNzrw9X4_m24HSdd0afuqyN>
X-ME-Proxy-Cause: dmFkZTEf0M97n6yWEpMCofCLijiTjPLHb++4eonsUMpAP1WodaZt/SOVow5ppZJQhTLgtl
 5Vj6LTJ6jSS8llfsXjuTVijdxUKbc2CnEL0ckglyd+uy2uUnltQ58WOaINkAYM2CNW1IFz
 CO5NyKd7VBmRxCuad8T5e19AOqeCBShPGl1vQf6RoNHRv9g7fyKuGZc/T3FB2l9z8eoXY7
 aoY7mfNwdOq08Uuy15U3RgPdUgGnIOutgpA4AKHPOVsbJ7pLKJM96oN81KzefCzd6/6wuT
 TXFcsB+GcaVwiESAC9CX+Zt0PYpkC0E37+a25Brs/V9DpgAGYDnsrqhkSpi8WdE/Q0QWps
 VN/2+/q6uau6VAH4EK71UUSWUwFGlrViXwIXnN/8byc38Q0GLI2dvt/n/FTHiJk3b943gU
 wSl4aSIUrqiB4YlDuT3XHYoMTZv5uoWhLYJ8yeG8NBkJjOdh7MvEg5tFMKeo4PbHDgQYAr
 scq3rngmpXGllAeyMNyybOaBzPccJOW9/q02jxw/OhqzVQuTUwRTJGakw6AqbManGN9gD3
 yJKLCsZ9047aIp/bojkxG70rQw3qFNIhkRN2P4kT2fICjzA6jyO+JkmSVvUkuXUDTuOdQ4
 Cn3SViMR/Rd6Z1kmXkdlreIZLrsQG1ryXYDZbZ//2Kn5k1N7vD1cvRQaJL2g
X-ME-Proxy: <xmx:J7KYapz8leEuD_Q9hyD1Oaf_5yH1kTbK1zvzkeKe-iiE12GvFSVHBA>
 <xmx:J7KYaiM0Z98-cRb9Fl1mrZPxBJJCKSj9wWt8RopJ1LAwY_EbO_QsSg>
 <xmx:J7KYalSQpN9hASLuH-ekPZM7KfEF3edvuY6BQwpgpV3hFOs75-Glrw>
 <xmx:J7KYaoaewdN-K4UF3W0HcqwV8jgnqQ_cXcaExP845W4GMQPCpixohA>
 <xmx:J7KYat1AJOgOLS_NUAJeacisz4hQkoPUkR51MGIBu2DGL-yCeGM8xKmg>
Feedback-ID: i07de48aa:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed,
 2 Sep 2026 19:32:54 -0400 (EDT)
Message-ID: <0ee1a099-d4b3-4d7d-bee6-f4d5093100ca@HIDDEN>
Date: Thu, 3 Sep 2026 02:32:52 +0300
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#81592: [PATCH] Implement `xref-location-line' for
 `xref-buffer-location'
To: Roi Martin <jroi.martin@HIDDEN>, 81592 <at> debbugs.gnu.org
References: <87zeyt3c4e.fsf@HIDDEN>
 <32bc2779-5602-4417-a265-eb867219a613@HIDDEN> <87mrubzzyu.fsf@HIDDEN>
Content-Language: en-US
From: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <87mrubzzyu.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 81592
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

On 24/08/2026 11:26, Roi Martin wrote:
> Dmitry Gutov <dmitry@HIDDEN> writes:
> 
>> Could you mention the feature that you are using these locations from?
>> Is it for Xref-from-Outline buffers?
> 
> Yes, I'm using Xref for the `outline-xref' command.

I've re-read that submission now, solid change. Even just scanning the 
NEWS file (with navigation) works pretty well!

>> I'm asking because the performance characteristics of line-number-at-pos
>> are linear to the line number; if there are really a lot of matches
>> sometimes, it might need some sort of cache.
> 
> Strictly speaking, line numbers are not a hard requirement for
> `outline-xref', though they would provide additional context, and I
> don't expect the command's output to be huge.  Also, IMHO it feels more
> consistent to show line numbers for both `xref-make-file-location' and
> `xref-make-buffer-location'.

You are quite right, but my question was about performance.

To preface the below, your patch in installed in master, commit 
85e8054a09c. Thanks!

Here's some numbers.

Using 'M-x outline-xref', a good test example is etc/NEWS.31: 4000 
lines, 800 outlines entries. With that buffer visited:

   (benchmark-run 10 (save-window-excursion (outline-xref)))

Before the patch, it shows ~300ms here. After the change: ~800ms. With 
the code-byte compiled in both cases.

To illustrate where the time is spent, evaluate at eob of etc/NEWS.31:

   (benchmark-run 800
     (with-current-buffer (current-buffer)
       (line-number-at-pos (point))))

- here it's 50ms. The math is off by 2x, but this is approximate anyway.

In any case, 80ms per command is still below the "instant" threshold, so 
it should be fine for most cases. But improvements welcome.

> Besides that, Xref-Edit mode requires line numbers because
> `occur-after-change-function' and `xref-edit--before-change-function'
> require lines to start with the `occur-prefix' text property, which is
> set by `xref-edit--prepare-buffer' if the line starts with " *[0-9]+:".
> Just out of curiosity, why is that? Is it to avoid editing
> `xref-make-bogus-location'?
IIRC I just followed the conditions which occur-after-change-function 
sets: it expects the prefix to be available, and Xref-Edit still uses it 
in after-change-functions. And Xref doesn't add any prefix if line 
numbers are missing, so there's nowhere to put the 'occur-prefix' text 
property at.

Not insurmountable, but since Xref is distributed separately as well, 
much easier to go along: then its works in earlier Emacs too.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#81592; Package emacs. Full text available.

Message received at 81592 <at> debbugs.gnu.org:


Received: (at 81592) by debbugs.gnu.org; 24 Aug 2026 08:31:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Aug 24 04:31:31 2026
Received: from localhost ([127.0.0.1]:41438 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wyQ5a-0002Ob-Op
	for submit <at> debbugs.gnu.org; Mon, 24 Aug 2026 04:31:31 -0400
Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]:49361)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <jroi.martin@HIDDEN>)
 id 1wyQ5W-0002OJ-Hd
 for 81592 <at> debbugs.gnu.org; Mon, 24 Aug 2026 04:31:28 -0400
Received: by mail-wm1-x336.google.com with SMTP id
 5b1f17b1804b1-4996f1ee4a4so20873195e9.2
 for <81592 <at> debbugs.gnu.org>; Mon, 24 Aug 2026 01:31:26 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20251104; t=1787560280; x=1788165080; darn=debbugs.gnu.org;
 h=content-type:mime-version:message-id:date:references:in-reply-to
 :subject:to:from:from:to:cc:subject:date:message-id:reply-to
 :content-type; bh=+CPYwWREkcSgS/XTdZhJSZgdeugMNFfFPGUjvAXPiFw=;
 b=MFXghmmbWMvrvqo/Ii8yXyE/u+Ge5cQA9UYKQ79fNeb85RgypOPRCd57E8/Nz4TbG/
 gueJHninrbfHztxD+/70V4BOHJNrf07JQAGmORmjDwjjDmkEpKp5q9HE1q7k9ymvaPPH
 881r9P375B6SbgWgh1EsQUcCxMfl+djXJY5jFSYk9vwHpdtQfjdFd5mg/0JTZpAEuA8U
 UQG3TKQ+otojUaz6S718R1vY9xR4SAY05QVxXZoyRUdEsOOoJTzx+PmjvRZ+EDrT/rzg
 vnDypy3/8WX2eFD2FgW995/aDPfBNSKwC0zgYMp2U9Mj4/vVmqTmUIsEyyxP0uhTSz7n
 74SA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20251104; t=1787560280; x=1788165080;
 h=content-type:mime-version:message-id:date:references:in-reply-to
 :subject:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date
 :message-id:reply-to:content-type;
 bh=+CPYwWREkcSgS/XTdZhJSZgdeugMNFfFPGUjvAXPiFw=;
 b=YVZAkNaH9DEKpeW8c9xBdjL6Yg+s+qh/3U91zQzvaw695CqlpVvX3wde1W9rzi+/W9
 RQgOU8998VAsUcViz6E7rUEEF6IM84IKDGeFmVRqzwe8g1eL9jl3p2G7KPWetNjNQsBH
 hBSjgAQLhdbtdQrEUIatyTE7eUgYSDs4cHSW8r6LbHZHcaO1RpQ3+UNgqJ1qsZ54faKd
 ddDiVsT4ZuG8hZGX619A9LrLDPm3dk2AcOTgmT27ZmqF4t7wUPgpLkv05eUUFjc4aq2y
 F57RYBjTTUCmdKNiiWIz5EtaeaxkVvXZ2qsWW0l6DZq4kC3zSVHm5U+Sf1C74BLCCnR7
 AA9g==
X-Forwarded-Encrypted: i=1;
 AHgh+RouBSOWylU7lhi8JdDonYzi1aO6vIYL29nwEQUPFydWDYaHDDRTwv75qDHFrOp98cG1Pr0Edw==@debbugs.gnu.org
X-Gm-Message-State: AFuF++nYRzTRxGgzS1dZIxNJD1Vxa/JjWkDwIGnueEp9NqOX6R1iJKhv
 iujKyjx+cvE9rXIZUxB9KuJjJpWta4vTYJYAHMkUByqUeboF4FdWkD9C
X-Gm-Gg: AR+sD12/8lY6LocGFjS9YFEjOu+3lsL+mvnTtkZZNlxZuCKxLPv8wzjh0QAoIdMkCNB
 5fN9EPAZSZienli6rnF+B8Epo/GfsaLqkNNEPLg1E4XbXJgcpktvCEIT6IY629BkdaJlg2CH4MW
 C0yFhx54GB+oNbHBmxdgUjsFGKO7GFEYXsjjuiVXSvhc4Hhr05Fnnia3VnO4tnIYvKqw9BpX05P
 Zc4aazRPmj+aioMp8BkP9NJxnQbe4yACPBpEJEDW5uf/0uVxy854bA19tBordUvOvvUPvHGiLnf
 osS37EOmAQ6oy9ak7Jfi8+pyMO02CnfEsJJtgVp6XDvY1z3Gwrt/pe4f/uENz3o+iygYuIS/rDV
 XiJH+Ujt20lE8ZiSOksXUw3esI5WAGZ91SNKGkOL3X8kB9DnLUnbBg5TOF9oS71KyJ64JSI1bEN
 PBmQs4NocksaNbxOwCoaquLNvZ/EIFUfNPIWJiMimLpo7d3ieiSVnEtAJJg+c=
X-Received: by 2002:a05:600c:1548:b0:499:841c:2016 with SMTP id
 5b1f17b1804b1-499b8273456mr293363855e9.0.1787560279330; 
 Mon, 24 Aug 2026 01:31:19 -0700 (PDT)
Received: from localhost ([149.74.61.246]) by smtp.gmail.com with ESMTPSA id
 5b1f17b1804b1-499d1015373sm16380415e9.14.2026.08.24.01.31.18
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 24 Aug 2026 01:31:18 -0700 (PDT)
From: Roi Martin <jroi.martin@HIDDEN>
To: Dmitry Gutov <dmitry@HIDDEN>, 81592 <at> debbugs.gnu.org
Subject: Re: bug#81592: [PATCH] Implement `xref-location-line' for
 `xref-buffer-location'
In-Reply-To: <87mrubzzyu.fsf@HIDDEN>
References: <87zeyt3c4e.fsf@HIDDEN>
 <32bc2779-5602-4417-a265-eb867219a613@HIDDEN>
 <87mrubzzyu.fsf@HIDDEN>
Date: Mon, 24 Aug 2026 10:31:17 +0200
Message-ID: <87jypfzzqi.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 81592
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.0 (/)

Roi Martin <jroi.martin@HIDDEN> writes:

> Dmitry Gutov <dmitry@HIDDEN> writes:
>
>> Could you mention the feature that you are using these locations from? 
>> Is it for Xref-from-Outline buffers?
>
> Yes, I'm using Xref for the `outline-xref' command.
>
>> I'm asking because the performance characteristics of line-number-at-pos 
>> are linear to the line number; if there are really a lot of matches 
>> sometimes, it might need some sort of cache.
>
> Strictly speaking, line numbers are not a hard requirement for
> `outline-xref', though they would provide additional context, and I
> don't expect the command's output to be huge.  Also, IMHO it feels more
> consistent to show line numbers for both `xref-make-file-location' and
> `xref-make-buffer-location'.
>
> Besides that, Xref-Edit mode requires line numbers because
> `occur-after-change-function' and `xref-edit--before-change-function'
> require lines to start with the `occur-prefix' text property, which is
> set by `xref-edit--prepare-buffer' if the line starts with " *[0-9]+:".
> Just out of curiosity, why is that? Is it to avoid editing
> `xref-make-bogus-location'?
>
>         Roi

Sorry, I meant `xref-file-location', `xref-buffer-location' and
`xref-bogus-location'.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#81592; Package emacs. Full text available.

Message received at 81592 <at> debbugs.gnu.org:


Received: (at 81592) by debbugs.gnu.org; 24 Aug 2026 08:26:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Aug 24 04:26:42 2026
Received: from localhost ([127.0.0.1]:41393 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wyQ0v-0001wg-Nn
	for submit <at> debbugs.gnu.org; Mon, 24 Aug 2026 04:26:42 -0400
Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]:50390)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <jroi.martin@HIDDEN>)
 id 1wyQ0s-0001wJ-5u
 for 81592 <at> debbugs.gnu.org; Mon, 24 Aug 2026 04:26:39 -0400
Received: by mail-wm1-x32f.google.com with SMTP id
 5b1f17b1804b1-4954df200ddso17335705e9.0
 for <81592 <at> debbugs.gnu.org>; Mon, 24 Aug 2026 01:26:38 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20251104; t=1787559991; x=1788164791; darn=debbugs.gnu.org;
 h=content-type:mime-version:message-id:date:references:in-reply-to
 :subject:to:from:from:to:cc:subject:date:message-id:reply-to
 :content-type; bh=yZRfA5nwrmG6thOa4jsN1zBgl0aEX78fWhwlxHw7LJ4=;
 b=kmzV88sBxxfgxkCWdQGBIueNtDbK+9ppSa24g76n+k4HCp+GEwghuhGVXOhd7+LHB/
 0NvL5nwHJ+1W9eKVCKjFasKkcbE1SZQ2uNPvr7hYyePwgUy9jH22QkFWfce8lywogdOV
 gnlPCcnWj+HToOj9b9KO0BWuXTIg41zNUgQ/AVhJRMumm2aLiWubwmZczIxTHxyvp+s0
 SDuKetG0RbouPL4KS1QusaoOhsIcaD2KD4guJMEY/LpD0QQlLddY/0OzE4iQOTPokR5k
 W+JVa2HcLRP9NorMZ35Mb2Amxh9B7GYDuF9/9RQH+AN6gTEPh9JpUCATPMKovd7oQNs5
 EWhg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20251104; t=1787559991; x=1788164791;
 h=content-type:mime-version:message-id:date:references:in-reply-to
 :subject:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date
 :message-id:reply-to:content-type;
 bh=yZRfA5nwrmG6thOa4jsN1zBgl0aEX78fWhwlxHw7LJ4=;
 b=hBctCpfz+KdhCGKPFhp7Qcx4PvNZ8npnINyXzAeS0WP0M4DshCBtc3FPLIjF72gcwH
 Yzu8HHQmmqDEDqR4CgmnunEu25FCDamfhLziDWeDvoVGHnnqueyCIjQUuUFqo9uPWtj1
 Lso4EmFZObvTWg8iAq+AlChbdNIUzHlFaOqSfguAS5a+nHK6IJIM7PJAKLYbfEEZBIvG
 TblZ39+iDDkdAV3Gjg/sTd/XZigZ6XmNCp+oqYy1+VWl5GTsRrfLxXlfTrLRPut5bif7
 XdxR9kdmG56UBg9rs2FduUdKBVWpwaQiuXwo+VEPYUBwITYOh96VYZ3Cqnk9CdgkusAz
 X0aQ==
X-Forwarded-Encrypted: i=1;
 AHgh+RoN24pjMt0ZX9iW3rO4l9HDdrQqxIkoa8w1d0Vy4EsiByBo/hEmgUh5ye/gSReW5+Wc0R9ijQ==@debbugs.gnu.org
X-Gm-Message-State: AFuF++lr+ZwmBwJA9LFWZZDbsKUUapgE5HmCan86FOD2dxVqRHVIS7/E
 hoCBAFoVRstWayrLMz/G4PlEtqrZIrjdsu37sbLhqi1g0P/pM3P9YjRk
X-Gm-Gg: AR+sD10t8dPRhGk6GfEPzokt2pkQmWwhw+Rt5Brl6o7qv7gSbEVP+cMRpnB/wC83hxb
 aLVnNFZbWpwEwGR7zoYqqybHk58h3nD4WLHoXs1mmrE3MbRcXR+t/Y8IniWCFX+mnNI1vtNg8Ax
 1IWaotvMbzXMCb/1rsW0C4yavkG9U1Y0X7tjY5djpgJO/a+TJAzkpOMnrs+v5mUjsKXrY2JOv38
 hnaI3Zfum0ORfYhAOH6ZeWcViLihw6jMW8wy+aaZbzP4hCcBDye/3zZp9lpfqeRZd/GOnyC+3W4
 hRuCOD60krlzrdYzyPZ/WYH3cjbSy/kIEVRV79BznO99GVzFXAQZBZd4slF33WdhCmAmKxFA7kI
 iglgc7uJSrKIYPBjjNefNtXt9bM0nlAjMeaHDPtZ3uJ9001hHxNk3aCurzCtPiSEr2Mn4IZB5NW
 ocGwdDxaIY8ohTzKy9446eeKU8b3VPk9AyHoYdsjXPFxw9V4WhdUCK6ZNUB4/Q78rboSw7rw==
X-Received: by 2002:a05:600c:34c7:b0:499:5210:c537 with SMTP id
 5b1f17b1804b1-499c19bfdaemr178335025e9.1.1787559991210; 
 Mon, 24 Aug 2026 01:26:31 -0700 (PDT)
Received: from localhost ([149.74.61.246]) by smtp.gmail.com with ESMTPSA id
 5b1f17b1804b1-499b90e747esm123810305e9.4.2026.08.24.01.26.29
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 24 Aug 2026 01:26:30 -0700 (PDT)
From: Roi Martin <jroi.martin@HIDDEN>
To: Dmitry Gutov <dmitry@HIDDEN>, 81592 <at> debbugs.gnu.org
Subject: Re: bug#81592: [PATCH] Implement `xref-location-line' for
 `xref-buffer-location'
In-Reply-To: <32bc2779-5602-4417-a265-eb867219a613@HIDDEN>
References: <87zeyt3c4e.fsf@HIDDEN>
 <32bc2779-5602-4417-a265-eb867219a613@HIDDEN>
Date: Mon, 24 Aug 2026 10:26:17 +0200
Message-ID: <87mrubzzyu.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 81592
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.0 (/)

Dmitry Gutov <dmitry@HIDDEN> writes:

> Could you mention the feature that you are using these locations from? 
> Is it for Xref-from-Outline buffers?

Yes, I'm using Xref for the `outline-xref' command.

> I'm asking because the performance characteristics of line-number-at-pos 
> are linear to the line number; if there are really a lot of matches 
> sometimes, it might need some sort of cache.

Strictly speaking, line numbers are not a hard requirement for
`outline-xref', though they would provide additional context, and I
don't expect the command's output to be huge.  Also, IMHO it feels more
consistent to show line numbers for both `xref-make-file-location' and
`xref-make-buffer-location'.

Besides that, Xref-Edit mode requires line numbers because
`occur-after-change-function' and `xref-edit--before-change-function'
require lines to start with the `occur-prefix' text property, which is
set by `xref-edit--prepare-buffer' if the line starts with " *[0-9]+:".
Just out of curiosity, why is that? Is it to avoid editing
`xref-make-bogus-location'?

        Roi




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#81592; Package emacs. Full text available.

Message received at 81592 <at> debbugs.gnu.org:


Received: (at 81592) by debbugs.gnu.org; 22 Aug 2026 10:50:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Aug 22 06:50:23 2026
Received: from localhost ([127.0.0.1]:54011 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wxjIs-00048d-Fm
	for submit <at> debbugs.gnu.org; Sat, 22 Aug 2026 06:50:22 -0400
Received: from fout-b5-smtp.messagingengine.com ([202.12.124.148]:51031)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <dmitry@HIDDEN>) id 1wxjIq-00045p-5o
 for 81592 <at> debbugs.gnu.org; Sat, 22 Aug 2026 06:50:20 -0400
Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44])
 by mailfout.stl.internal (Postfix) with ESMTP id 77EAD1D000E8;
 Sat, 22 Aug 2026 06:50:14 -0400 (EDT)
Received: from phl-frontend-03 ([10.202.2.162])
 by phl-compute-04.internal (MEProxy); Sat, 22 Aug 2026 06:50:14 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc
 :content-transfer-encoding:content-type:content-type:date:date
 :from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to; s=fm2; t=1787395814;
 x=1787482214; bh=uo1QOfpjzlcFcQ6byqPRtUGD11DJaAYD+s0kJKJc6jY=; b=
 UJOqwrO4IELUIVvUBYtCcL0moHK7wkgmXB2MUB8+8/5bhu9dUtFEKVrInGI86Otj
 BFtXOxLF87lbqfx2j3qENXE13GUsVM4t/rXU7whlbivkHg0ecNSQh+GFPK7O5K4A
 QQDrLTC38ot3pQ16x1T0++e2psYCU7/7ZfVGdajqety1MJyhHOd7ykhB6VTb+yRV
 cjJYu9H8XBKwUdQL/ULguNu2mH68224XfZLgwdd3zTHaZbGF+ppT1BrAPgD5fosQ
 wfexbt5mtLwf3Y3Gk8xorR6SWQvzcVdNVtzO0rZjkijQ+2Cc0tcxdFUwGEcTngiS
 /ZdDAwNsGy4clvV0xDge5w==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-transfer-encoding:content-type
 :content-type:date:date:feedback-id:feedback-id:from:from
 :in-reply-to:in-reply-to:message-id:mime-version:references
 :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender
 :x-me-sender:x-sasl-enc; s=fm3; t=1787395814; x=1787482214; bh=u
 o1QOfpjzlcFcQ6byqPRtUGD11DJaAYD+s0kJKJc6jY=; b=XkTT01CYo8ArxEI32
 kUBuOh5l/cRxbL8tOrM/Ck1qCUuZ4IiaTNYGxJm0xG/pB2DQrcbd0XmvCCXimNV8
 PX66eGtjeEutVGhXXk0GUXkKuLWHikLqAtqAPjBzsK8Sn4azMsAMeZtmFVO/LbmH
 6O1pi1wMJ4SJIa6KTUWlTHz82sOkwHLSDjQad8tVmUubptkFiIlZBxMWNFEB84lf
 GGZHSd+snTGJ5j9S+ypQ9/NMRB4I+o4ds8hznruhkVxRaQt+QapnkShJ0MRVCO45
 IJgVcUNgdjEmDDcnu67e97M77buG+CiEt93c1xaJqTuH9qLRH/Qoc4PMXxbiXAkw
 ncC5g==
X-ME-Sender: <xms:5X6JaghnrFbVPZnYUVAFlvoisTJbEkQlOUt3cq5cZCnravpvmmfuSA>
 <xme:5X6JavCt7I9ZEGrc5IB7AWJpaTiDWcTYkDq94YXUB_lynxlpjHMeFdsM401oUtkUw
 jPJd78X2-WPygkmIwCaFjtu5kQW1Gp4z0wkmP9Np5ZnF9NYEz2XSQ>
X-ME-Received: <xmr:5X6JalullJlEKdgxzZZmIuyYFJXmHdpd-FUFjiq09Q7x1crqaKA_zbvx9vyztlLH-5lv>
X-ME-Proxy-Cause: dmFkZTETH6jTP7caTvbVMbVATpsm9k6KUrtxbMqmK0v6of/B4zmojkTyRjEVGZzTeSqDOm
 tHUuUpv9kjTXva1dvaTwE6l8Sw5pnexkLAcxS4zhl1VF0RlZ5pPczQMVwuwRssg7Q75Z6Y
 4GB3N+eoY2ydf/loBLBg5QuOkN0dV7EUU6gOqMSadjO8D0ZOoJOXharHiywbbl4MWoUuJv
 k8FcJhNhGbRYFAzGXmcvDkzkSzDRKDmSZ80g9OKyuhrzodq3CfrW2IqEY/esCGtYw6WYeC
 T9rFKYzQ0sV/TsH2XacVsqqt2gVJYAtazXbsckfaIiVifbIyR5i/ZB1wDd5kJ4a9XM8tp8
 yqwGgAJ1EMy3leBPwY5Qj/VS+HgwUtbVsOsGlLmEeR7Uu9DJ1If16WyXYYj+mrvsrxerd6
 zJpmEg+kgaWgjXa+tHCoVZpH86X0yXA/V06DJuUnBWo5QHmcwNLPvnLBaXgPfodn+eM8ei
 IMFlRc2TZW/svXsZc5nWUtCRadgbd9F5NrQ0hvd/Kq/uHyhd5SiLbE2sW8+PikPWCn/FYQ
 Dpmrjc/oIfHSm1T7Zcq4WOjlwqJYt3nB1ZVkbixJ/zzMDhfSqXzD7FVBuE3NSIoYfXFJ28
 xgPxgtUpR6qPv6Cn+Upa8ynhAN8sRKWZc0hvpkSIiUFS+LuApg98dkC8Edow
X-ME-Proxy: <xmx:5X6JasZymHJp8oC98mbbKAmw6nh7Ioej3YepxwHXo8k1CY-kcOpF6A>
 <xmx:5X6JagVAVS4J_cS40fOAV6G3o8D3f8sRJYswZmCxxwxyYzABQ8xv3g>
 <xmx:5X6Jao6rBErtzn-62sdOyE0SuJWCCV7xZeFSqUyJqYMXIjDYNJ6j6A>
 <xmx:5X6JajhSm9xGKO9EqNxUTlQ2bQJirW9pwDnM6wB2kgDptOE1loS0jw>
 <xmx:5n6Jam_fY2ZxJ_RGDT84Nn20TUuZaDaK3e9dMiN7it-_mNiND32dCZyC>
Feedback-ID: i07de48aa:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat,
 22 Aug 2026 06:50:13 -0400 (EDT)
Message-ID: <32bc2779-5602-4417-a265-eb867219a613@HIDDEN>
Date: Sat, 22 Aug 2026 13:50:11 +0300
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#81592: [PATCH] Implement `xref-location-line' for
 `xref-buffer-location'
To: Roi Martin <jroi.martin@HIDDEN>, 81592 <at> debbugs.gnu.org
References: <87zeyt3c4e.fsf@HIDDEN>
Content-Language: en-US
From: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <87zeyt3c4e.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 81592
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Hi!

On 11/08/2026 00:21, Roi Martin wrote:
> This patch implements the `xref-location-line' method for the
> `xref-buffer-location' struct.  After this change, Xref buffers will
> prefix Xref objects whose location is an `xref-buffer-location' with
> their corresponding line number.
> 
> Xref-Edit mode depends on this prefix to work.  So, this patch also
> enables Xref-Edit mode for this type of reference.
> 
> Dmitry, I'm CCing you because, as far as I know, you are the main
> xref.el contributor.

Thanks for the patch.

Could you mention the feature that you are using these locations from? 
Is it for Xref-from-Outline buffers?

I'm asking because the performance characteristics of line-number-at-pos 
are linear to the line number; if there are really a lot of matches 
sometimes, it might need some sort of cache.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#81592; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 10 Aug 2026 21:21:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Aug 10 17:21:55 2026
Received: from localhost ([127.0.0.1]:47134 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wtXRS-0006Se-LD
	for submit <at> debbugs.gnu.org; Mon, 10 Aug 2026 17:21:55 -0400
Received: from lists1p.gnu.org ([2001:470:142::17]:60160)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <jroi.martin@HIDDEN>)
 id 1wtXRQ-0006SQ-G1
 for submit <at> debbugs.gnu.org; Mon, 10 Aug 2026 17:21:52 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <jroi.martin@HIDDEN>)
 id 1wtXRL-0001T6-1K
 for bug-gnu-emacs@HIDDEN; Mon, 10 Aug 2026 17:21:47 -0400
Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <jroi.martin@HIDDEN>)
 id 1wtXRJ-0006YC-G5
 for bug-gnu-emacs@HIDDEN; Mon, 10 Aug 2026 17:21:46 -0400
Received: by mail-wm1-x32d.google.com with SMTP id
 5b1f17b1804b1-495437bb891so2314375e9.1
 for <bug-gnu-emacs@HIDDEN>; Mon, 10 Aug 2026 14:21:44 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20251104; t=1786396903; x=1787001703; darn=gnu.org;
 h=content-type:mime-version:message-id:date:subject:to:from:from:to
 :cc:subject:date:message-id:reply-to:content-type;
 bh=z+6jmnNUYKET8AMHhqMWPyjAH2C+D8lxsAe6lCbq+OQ=;
 b=geRRc4SfQhR+hZQ/7T8rKCAt9FTekNtRK/BuAm0oynJxSf0lg4DHV84KrjHMEXpaZt
 kCSSdJFejXTopz/LDQ/Q/i5y0RkV4PoqLI/czX1qdtNa3ZX2/e28xF2F37YxwiqFy24U
 IIdWIq1EAYu9SatyKZzPqXiwGhbKI1J7L8k9PKW9eOO2sui1Og6xWwuuRkf0RF4aJQzZ
 CEZdpUqys/k7S/uujc+IEaQ1RJF4VuWI+GK+znNpAtIPG3KJ813FTE8dP0mJKOSubvNW
 FxAlIPWzC+AqOwyaB/rrH7IxTB5li4YMOHW17GaNTTO1tEZfDATzmNdMOzZuPKAdYhdq
 pkUA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20251104; t=1786396903; x=1787001703;
 h=content-type:mime-version:message-id:date:subject:to:from:x-gm-gg
 :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to
 :content-type;
 bh=z+6jmnNUYKET8AMHhqMWPyjAH2C+D8lxsAe6lCbq+OQ=;
 b=IStgguDvbgsXhVnlVNl0gnqgZ2wUqMt4ZRTINbRVDPDEM03rqjJqT90qU+GXIwASwx
 0oYsx6KVt4RnNf78ZTJxMiv4HoDU6Mjdevrf8IxI0THa4XbLmE5q6e+DumsSEHfTTEyP
 gp5zwGTSj7/FBThgwDV/YCq5nSU3eAkul5YbH0KshzEE3JwziGDCpKQj7XxBxXa+s8rz
 Bb6e2Y5ZY5J+Hyk5vg8jLBdOTQwhF2JG5D6jT39WRnsiqlHl1OTx0Me4SwksDeE9QJSK
 0SjdPPsW5BX9Q+T6TTzec+mFgQ07nFh9Vzh3lvW+ygH5F3znIynAYgJAS+0GwU6OObvY
 SwKw==
X-Gm-Message-State: AOJu0Yycf7WXMUsv3RqRC+3eS/4D5Nc9A6dnsTn6WXF4TT6ErIJh+Lfs
 UAN2j4yOc+bkPoCxp1QOrW/lGL2309bf8XKGR8Sx4csNkxQzwrfOdHeLJWvrSg==
X-Gm-Gg: AR+sD10xgIHD58TGfpgsnAoz23MC6p27jExp1/fsKh+KOUseUuirm/KPn55bFdB94SJ
 dlfZk8sPjrQxDPmV207elFv9sTaBD8mURrk16pbm6GHrSxmPIIKLmLGxR5P3GmZdtksnOfAN5cC
 ucWhMjYn93TWK/f01EOX9xpwyJXhks6l80n2MRBAB/cdP59BPNCAyDXI8N/HOPt7qEC/0z7XRj0
 BClFD66eBsNvaaODZc3xt0hVh6wXYDjtIbS2HF17R0lEwT2nHKFwxWfEoyTXW6My0v/LwiOhdXl
 8bhyUxGtky6CBU3jJJaPLpWgaQPczDqzbxmep0GrjxRDlcubgIvSmqyAP/410+PyB8LhWkNll/2
 UrIFTZRx+xOXiud4HC0hkAyYrXQNu0I+2m8xvLL4Ib8ZrPtm8hHnARiATxHZZPSviWV4x8lEocH
 p3Nht2h26yhVzXPLC5NPa+nvSau/gSi4+Pxk2EG67zfrdv+6mWWXBE11EiyG4=
X-Received: by 2002:a05:600c:2154:b0:493:f783:c46a with SMTP id
 5b1f17b1804b1-499746492e0mr8145045e9.6.1786396903402; 
 Mon, 10 Aug 2026 14:21:43 -0700 (PDT)
Received: from localhost ([149.74.61.246]) by smtp.gmail.com with ESMTPSA id
 5b1f17b1804b1-499740a58afsm16819855e9.3.2026.08.10.14.21.42
 for <bug-gnu-emacs@HIDDEN>
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 10 Aug 2026 14:21:42 -0700 (PDT)
From: Roi Martin <jroi.martin@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: [PATCH] Implement `xref-location-line' for `xref-buffer-location'
X-Debbugs-Cc: Dmitry Gutov <dmitry@HIDDEN>
Date: Mon, 10 Aug 2026 23:21:37 +0200
Message-ID: <87zeyt3c4e.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
Received-SPF: pass client-ip=2a00:1450:4864:20::32d;
 envelope-from=jroi.martin@HIDDEN; helo=mail-wm1-x32d.google.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 2.0 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  Tags: patch This patch implements the `xref-location-line'
 method for the `xref-buffer-location' struct. After this change, Xref buffers
 will prefix Xref objects whose location is an `xref-buffer-location' with
 t [...] Content analysis details:   (2.0 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 1.0 SPF_SOFTFAIL           SPF: sender does not match SPF record (softfail)
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
 no trust [2001:470:142:0:0:0:0:17 listed in] [list.dnswl.org]
 -0.0 SPF_HELO_PASS          SPF: HELO matches SPF record
 0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
 provider (jroi.martin[at]gmail.com)
 1.0 FORGED_GMAIL_RCVD      'From' gmail.com does not match 'Received'
 headers
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.0 (+)

--=-=-=
Content-Type: text/plain

Tags: patch

This patch implements the `xref-location-line' method for the
`xref-buffer-location' struct.  After this change, Xref buffers will
prefix Xref objects whose location is an `xref-buffer-location' with
their corresponding line number.

Xref-Edit mode depends on this prefix to work.  So, this patch also
enables Xref-Edit mode for this type of reference.

Dmitry, I'm CCing you because, as far as I know, you are the main
xref.el contributor.

Thanks!

        Roi


--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment;
 filename=0001-Implement-xref-location-line-for-xref-buffer-locatio.patch

From 0db46dc95c3362dddd573b37927bb397b5dc9e76 Mon Sep 17 00:00:00 2001
From: Roi Martin <jroi.martin@HIDDEN>
Date: Mon, 10 Aug 2026 04:01:19 +0200
Subject: [PATCH] Implement `xref-location-line' for `xref-buffer-location'

* lisp/progmodes/xref.el (xref-location-line): New method.
---
 lisp/progmodes/xref.el | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el
index 2c21d08d4488..f73ede69f17e 100644
--- a/lisp/progmodes/xref.el
+++ b/lisp/progmodes/xref.el
@@ -175,6 +175,11 @@ xref-location-marker
     (let ((m (make-marker)))
       (move-marker m position buffer))))
 
+(cl-defmethod xref-location-line ((l xref-buffer-location))
+  (pcase-let (((cl-struct xref-buffer-location buffer position) l))
+    (with-current-buffer buffer
+      (line-number-at-pos position))))
+
 (cl-defmethod xref-location-group ((l xref-buffer-location))
   (pcase-let (((cl-struct xref-buffer-location buffer) l))
     (or (buffer-file-name buffer)
-- 
2.55.0


--=-=-=--




Acknowledgement sent to Roi Martin <jroi.martin@HIDDEN>:
New bug report received and forwarded. Copy sent to dmitry@HIDDEN, bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to dmitry@HIDDEN, bug-gnu-emacs@HIDDEN:
bug#81592; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Thu, 3 Sep 2026 10:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.