GNU bug report logs - #58431
29.0.50; [Eglot] Add "breadcrumb.el" feature based on imenu.el/project.el services

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; Severity: wishlist; Reported by: João Távora <joaotavora@HIDDEN>; dated Tue, 11 Oct 2022 09:17:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

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


Received: (at 58431) by debbugs.gnu.org; 18 Apr 2023 18:24:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 18 14:24:38 2023
Received: from localhost ([127.0.0.1]:60376 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1poq0L-0000bF-WD
	for submit <at> debbugs.gnu.org; Tue, 18 Apr 2023 14:24:38 -0400
Received: from mail-oa1-f53.google.com ([209.85.160.53]:62527)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <joaotavora@HIDDEN>) id 1poq0J-0000ay-Nu
 for 58431 <at> debbugs.gnu.org; Tue, 18 Apr 2023 14:24:36 -0400
Received: by mail-oa1-f53.google.com with SMTP id
 586e51a60fabf-187b70ab997so5363980fac.0
 for <58431 <at> debbugs.gnu.org>; Tue, 18 Apr 2023 11:24:35 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20221208; t=1681842270; x=1684434270;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=Mk990RgsQwyB8Oy8zR54tKZAgwVoCe8GhK5yEx7KcQM=;
 b=Muih4BxcnMP4st+105K+dtJf3/39iCNXqzVtX3V1WITEXB7sCR3MYhbY1QV95dxe5o
 /9F9YtLbKY8ZuRdKAeyCY28D7cSEuK2i4OVc0BIGsTeALt0ZXV5B2USLqz5CgxujEK0S
 BmNdB0WAR+OWQZiQfLN5HNblBWk4O+wdrM0xCZEaZMrHn3MeDKlO47KSY/sD+d+GPFOe
 /Dn0TcumTuVjS5rTuExKbQw9xp/8qo7JjSn9ByFHe1t5yhb1Ev2eXOMz6JBUFxPH8aj2
 Dw9bqmUFypIJ2YgLAZl4Mg5916iw6XwM/n4R6H2s37Es1n3bYjmTDUukyY5/MO7CYgwA
 6UVA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20221208; t=1681842270; x=1684434270;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=Mk990RgsQwyB8Oy8zR54tKZAgwVoCe8GhK5yEx7KcQM=;
 b=hbmDaY4OJl+5QYINMaHE8SvQr3d8z3oIw2AFYHXWu/uCpuu3FNXrc4JwbLYgreydkn
 DI93Wg2J06+VtjYAVKrwTpqS9La1vO8KQBkoV6PI8vdWruoLH37419skvXRxwWQtPIzj
 hWIc9ES0SPMkoSjSTQoUW/+l/HV2pRD6Druzm99kuu5ltC/qNsMKBB4gyjPzH0/zpHsP
 /WFs4cv8VAOXqzMNIH8D2we8dPPlg/q9El8WqzMVvwPwf7h72/q/sZQiGZuprgDBqJkV
 D7ICQ+IwcGbY3/UzR1245fxMJHBIkiVYuYSc53i61vSuXHkyLg/M0Jb3meah095FZeBU
 F0yQ==
X-Gm-Message-State: AAQBX9dN0Di0aLjEHt9uGdsqNQDWnf2FnD+ATN5Nhxjkv/wZyWGSdod9
 D0aAgnLrMk2pebs6wWYQiEsO0cFs63Hz7QStnFA=
X-Google-Smtp-Source: AKy350ZTCAZakCsHvYTmKutzAlGEV6uSVgQELYZ9ekeI8m5SdQKeKe0nL1CN3creU7h1OzEAMgjC69B0Hm9eHnuA+rk=
X-Received: by 2002:a05:6871:724:b0:188:a53:394a with SMTP id
 f36-20020a056871072400b001880a53394amr1313019oap.5.1681842270025; Tue, 18 Apr
 2023 11:24:30 -0700 (PDT)
MIME-Version: 1.0
References: <f8dda4be-42e6-2fdd-9a6a-5e3e49ea2b98@HIDDEN>
In-Reply-To: <f8dda4be-42e6-2fdd-9a6a-5e3e49ea2b98@HIDDEN>
From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= <joaotavora@HIDDEN>
Date: Tue, 18 Apr 2023 19:26:26 +0100
Message-ID: <CALDnm50URjQWpyvYKHXNESCfb7UQ45y28qQRFmGfSaKEMu+kzA@HIDDEN>
Subject: Re: bug#58431: 29.0.50; [Eglot] Add "breadcrumb.el" feature based, on
 imenu.el/project.el services
To: Adam Porter <adam@HIDDEN>
Content-Type: multipart/mixed; boundary="00000000000012d2e305f9a06bd1"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 58431
Cc: Eli Zaretskii <eliz@HIDDEN>, 58431 <at> debbugs.gnu.org,
 =?UTF-8?Q?Daniel_Mart=C3=ADn?= <mardani29@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.0 (-)

--00000000000012d2e305f9a06bd1
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Tue, Apr 18, 2023 at 7:10=E2=80=AFPM Adam Porter <adam@HIDDEN> wr=
ote:

> FWIW, this sounds similar to the topsy.el library I published on MELPA a
> couple of years ago.  It aims to provide similar (or better)
> functionality than semantic-stickyfunc-mode without using Semantic.

Had a look, but doesn't seem to work with Imenu directly.  That's a goal
here, because it makes this work for Eglot and also any other non-Eglot
client that already defines an imenu.

Also seems to have a slightly different goal.  The goal here, is for
the headerline to show the current position in terms of the intervals
it intersects in the imenu tree, which may be a deep hierarchical
tree in some languages.

Here's what I've come up with: it's fresh out of the oven :-)

(meaning probably buggy, but hopefully hot)

Jo=C3=A3o

--00000000000012d2e305f9a06bd1
Content-Type: text/x-emacs-lisp; charset="UTF-8"; name="breadcrumb.el"
Content-Disposition: attachment; filename="breadcrumb.el"
Content-Transfer-Encoding: base64
Content-ID: <f_lgmlisgw0>
X-Attachment-Id: f_lgmlisgw0

Ozs7IGJyZWFkY3J1bWIuZWwgLS0tIGltZW51LWJhc2VkIGJyZWFkY3J1bWIgcGF0aHMgICAtKi0g
bGV4aWNhbC1iaW5kaW5nOiB0OyAtKi0KCjs7IENvcHlyaWdodCAoQykgMjAyMyAgSm/Do28gVMOh
dm9yYQoKOzsgQXV0aG9yOiBKb8OjbyBUw6F2b3JhIDxqb2FvdGF2b3JhQGdtYWlsLmNvbT4KOzsg
VmVyc2lvbjogMC4wLjFhbHBoYQo7OyBLZXl3b3JkczoKCjs7IFRoaXMgcHJvZ3JhbSBpcyBmcmVl
IHNvZnR3YXJlOyB5b3UgY2FuIHJlZGlzdHJpYnV0ZSBpdCBhbmQvb3IgbW9kaWZ5Cjs7IGl0IHVu
ZGVyIHRoZSB0ZXJtcyBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgYXMgcHVibGlz
aGVkIGJ5Cjs7IHRoZSBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIGVpdGhlciB2ZXJzaW9uIDMg
b2YgdGhlIExpY2Vuc2UsIG9yCjs7IChhdCB5b3VyIG9wdGlvbikgYW55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gICAgICAgICAgICAgICAgICAgICAgICAgZm9yIG1pZCA9ICgvICgrIGZyb20gdG8p
IDIpCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IgcDEgPSAoZWx0IGEgbWlkKQogICAg
ICAgICAgICAgICAgICAgICAgICAgICAgZm9yIHAyID0gLChpZiBrZXkgYChmdW5jYWxsIGtleSBw
MSkgYHAxKQogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCwoaWYgZnJvbS1lbmQgJzwg
Jzw9KSB4IHAyKQogICAgICAgICAgICAgICAgICAgICAgICAgICAgZG8gKHNldHEgdG8gbWlkKSBl
bHNlIGRvIChzZXRxIGZyb20gKDErIG1pZCkpCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBm
aW5hbGx5IHJldHVybiBmcm9tKSkpCiAgICAoaWYgZnJvbS1lbmQgKGlmIGtleSAoc2VhcmNoIHQg
a2V5KSAoc2VhcmNoIHQgbmlsKSkKICAgICAgKGlmIGtleSAoc2VhcmNoIG5pbCBrZXkpIChzZWFy
Y2ggbmlsIG5pbCkpKSkpCgooZGVmdW4gYmMtLXBhdGgtMSAoaW5kZXgtYWxpc3QgcG9zKQogIChj
bC1sYWJlbHMKICAgICAgKChzZWFyY2ggKG5vZGVzICZvcHRpb25hbCBwYXRoKQogICAgICAgICAo
Y2wtbG9vcAogICAgICAgICAgZm9yIG4gaW4gbm9kZXMKICAgICAgICAgIGZvciByZWcgPSAoZ2V0
LXRleHQtcHJvcGVydHkgMCAnYnJlYWRjcnVtYi1yZWdpb24gKGNhciBuKSkKICAgICAgICAgIHdo
ZW4gKDw9IChjYXIgcmVnKSBwb3MgKGNkciByZWcpKQogICAgICAgICAgcmV0dXJuIChzZWFyY2gg
KGNkciBuKSAoY29ucyAoY2FyIG4pIHBhdGgpKQogICAgICAgICAgZmluYWxseSAoY2wtcmV0dXJu
IHBhdGgpKSkpCiAgICAobnJldmVyc2UgKHNlYXJjaCBpbmRleC1hbGlzdCkpKSkKCihkZWZ2Y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UxJU1QuIgogIChpZiAoZ2V0LXRleHQtcHJvcGVydHkg
MCAnYnJlYWRjcnVtYi1yZWdpb24gKGNhYXIgaW5kZXgtYWxpc3QpKQogICAgICAoYmMtLXBhdGgt
MSBpbmRleC1hbGlzdCBwb3MpCiAgICAoYmMtLXBhdGgtMiBpbmRleC1hbGlzdCBwb3MpKSkKCihk
ZWZ2YXItbG9jYWwgYmMtLWxhc3QtdXBkYXRlLXRpY2sgMCkKCihkZWZ2YXIgYmMtLWhlYWRlci1s
aW5lLWtleSBbaGVhZGVyLWxpbmUgbW91c2UtMV0pCgooZGVmdW4gYmMtLWZvcm1hdC1ub2RlIChw
KQogIChsZXQgKChyZWcgKGdldC10ZXh0LXByb3BlcnR5IDAgJ2JyZWFkY3J1bWItcmVnaW9uIHAp
KSkKICAgIChpZiByZWcKICAgICAgICAocHJvcGVydGl6ZSBwCiAgICAgICAgICAgICAgICAgICAg
J21vdXNlLWZhY2UgJ2hlYWRlci1saW5lLWhpZ2hsaWdodAogICAgICAgICAgICAgICAgICAgICdo
ZWxwLWVjaG8gIkdvIGhlcmUiCiAgICAgICAgICAgICAgICAgICAgJ2tleW1hcCAobGV0ICgobSAo
bWFrZS1zcGFyc2Uta2V5bWFwKSkpCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChkZWZp
bmUta2V5IG0gYmMtLWhlYWRlci1saW5lLWtleQogICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAobGFtYmRhICgmcmVzdCBfZSkKICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAoaW50ZXJhY3RpdmUpCiAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgKHB1c2gtbWFyaykKICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAoZ290by1jaGFyIChjYXIgcmVnKSkpKQogICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICBtKSkKICAgICAgcCkpKQoKKGRlZnZhciBiYy1pZGxlLXRpbWUgMQog
ICJDb250cm9sIGlkbGUgdGltZSBiZWZvcmUgcmVxdWVzdGluZyBuZXcgYnJlYWRjcnVtYnMuIikK
CihkZWZ2YXItbG9jYWwgYmMtLWlkbGUtdGltZXIgbmlsKQoKKGRlZnVuIGJjLS1hbGlzdCAoKQog
IChsZXQgKChub2NoYW5nZXAgKD0gKGJ1ZmZlci1jaGFycy1tb2RpZmllZC10aWNrKSBiYy0tbGFz
dC11cGRhdGUtdGljaykpCiAgICAgICAgKGJ1ZiAoY3VycmVudC1idWZmZXIpKSkKICAgIChjb25k
ICgoYW5kIG5vY2hhbmdlcCBpbWVudS0taW5kZXgtYWxpc3QpIGltZW51LS1pbmRleC1hbGlzdCkK
ICAgICAgICAgICh0CiAgICAgICAgICAgKHNldHEgYmMtLWxhc3QtdXBkYXRlLXRpY2sgKGJ1ZmZl
ci1jaGFycy1tb2RpZmllZC10aWNrKSkKICAgICAgICAgICAod2hlbiBiYy0taWRsZS10aW1lciAo
Y2FuY2VsLXRpbWVyIGJjLS1pZGxlLXRpbWVyKSkKICAgICAgICAgICAoc2V0cSBiYy0taWRsZS10
aW1lcgogICAgICAgICAgICAgICAgIChydW4td2l0aC1pZGxlLXRpbWVyCiAgICAgICAgICAgICAg
ICAgIGJjLWlkbGUtdGltZSBuaWwKICAgICAgICAgICAgICAgICAgKGxhbWJkYSAoKQogICAgICAg
ICAgICAgICAgICAgICh3aGVuIChidWZmZXItbGl2ZS1wIGJ1ZikKICAgICAgICAgICAgICAgICAg
ICAgICh3aXRoLWN1cnJlbnQtYnVmZmVyIGJ1ZgogICAgICAgICAgICAgICAgICAgICAgICAoc2V0
cSBiYy0tbGFzdC11cGRhdGUtdGljayAoYnVmZmVyLWNoYXJzLW1vZGlmaWVkLXRpY2spKQogICAg
ICAgICAgICAgICAgICAgICAgICAobGV0ICgobm9uLWVzc2VudGlhbCB0KQogICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAoa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QogICAgICAgICAgIChtYXBj
b25jYXQgIydpZGVudGl0eSBzdHJzICIgPiAiKSkKICAgICAgICAgKGRmcyAobm9kZXMgJm9wdGlv
bmFsIHBhdGgpCiAgICAgICAgICAgKGNsLWxvb3AKICAgICAgICAgICAgZm9yIG4gaW4gbm9kZXMK
ICAgICAgICAgICAgZm9yIG5ld3BhdGggPSAoY29ucyAoY2FyIG4pIHBhdGgpCiAgICAgICAgICAg
IGZvciBwb3MgPSAob3IgKGNhciAoZ2V0LXRleHQtcHJvcGVydHkgMCAnYnJlYWRjcnVtYi1yZWdp
b24gKGNhciBuKSkpCiAgICAgICAgICAgICAgICAgICAgICAgICAgKGFuZCAobnVtYmVyLW9yLW1h
cmtlci1wIChjZHIgbikpIChjZHIgbikpKQogICAgICAgICAgICB3aGVuIHBvcyBkbyAocHVzaCAo
Y29ucyAoZm10IChyZXZlcnNlIG5ld3BhdGgpKSBwb3MpCiAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgIGNhbmRzKQogICAgICAgICAgICBkbyAoZGZzIChjZHIgbikgbmV3cGF0aCkpKSkKICAg
ICAgKGltZW51LS1tYWtlLWluZGV4LWFsaXN0KQogICAgICAoZGZzIGltZW51LS1pbmRleC1hbGlz
dCkKICAgICAgKHVubGVzcyBjYW5kcyAodXNlci1lcnJvciAiU29ycnksIG5vIGJyZWFkY3J1bWIg
aXRlbXMgdG8ganVtcCB0by4iKSkKICAgICAgKHNldHEgY2hvaWNlIChjZHIgKGFzc29jIChjb21w
bGV0aW5nLXJlYWQgIkluZGV4IGl0ZW0/ICIgY2FuZHMgbmlsIHQpCiAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICBjYW5kcyAjJ3N0cmluZz0pKSkKICAgICAgKHB1c2gtbWFyaykKICAgICAg
KGdvdG8tY2hhciBjaG9pY2UpKSkpCgoocHJvdmlkZSAnYnJlYWRjcnVtYikKOzs7IGJyZWFkY3J1
bWIuZWwgZW5kcyBoZXJlCgo7OyBMb2NhbCBWYXJpYWJsZXM6Cjs7IHJlYWQtc3ltYm9sLXNob3J0
aGFuZHM6ICgoImJjLSIgLiAiYnJlYWRjcnVtYi0iKSkKOzsgRW5kOgo=
--00000000000012d2e305f9a06bd1--




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

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


Received: (at 58431) by debbugs.gnu.org; 18 Apr 2023 18:11:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 18 14:11:01 2023
Received: from localhost ([127.0.0.1]:60350 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1popnA-0006G8-Ro
	for submit <at> debbugs.gnu.org; Tue, 18 Apr 2023 14:11:01 -0400
Received: from bee.birch.relay.mailchannels.net ([23.83.209.14]:13262)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <adam@HIDDEN>) id 1popn7-0006Fy-JT
 for 58431 <at> debbugs.gnu.org; Tue, 18 Apr 2023 14:10:59 -0400
X-Sender-Id: dreamhost|x-authsender|adam@HIDDEN
Received: from relay.mailchannels.net (localhost [127.0.0.1])
 by relay.mailchannels.net (Postfix) with ESMTP id 3FCA06423C9;
 Tue, 18 Apr 2023 18:10:55 +0000 (UTC)
Received: from pdx1-sub0-mail-a232.dreamhost.com (unknown [127.0.0.6])
 (Authenticated sender: dreamhost)
 by relay.mailchannels.net (Postfix) with ESMTPA id BB855641823;
 Tue, 18 Apr 2023 18:10:54 +0000 (UTC)
ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1681841454; a=rsa-sha256;
 cv=none;
 b=aGOdWBbSSYOev1upK1xTBFkYUECEhhrPU5HbFU98tnMu9OUO9xnbMiVrpnVqFqekY0gQx+
 laBL+Ip+ke3b3LOjVa2X1VEjkJtVcIAvRD4qZZiu43kcLg/aDQetymxsR/44jgW6Ie80Dp
 QaXbKJdpH0SQmdrnyz/eZW0OmosULgeSyqh7JuNvG25wFC8dtlQaqPBTN0pA+tVvK+oxi9
 AyNylWhqrR6yx5t8WqcKN0yd2yYzLZUbF8YUQhgRnYkKP/sGBEyNmhjCctFRynqCyDoF6Z
 XHVRCN93891r7sXh11fEUAEmHM3KscMUJ6QGRwJVIEXdxVKjcGxHxxjkAjE/XA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed;
 d=mailchannels.net; s=arc-2022; t=1681841454;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding:dkim-signature;
 bh=l9IHVBYlMlizfgo+/fc4wTwqHNM1PqWoswBcyKsyqDU=;
 b=Su5ikrGFNtoMlZobQgSim9QgZqtxnPSwrz3Y6vooI489WO9omfkEwvsmEyvxZzIRvYSkON
 OoZ+JmvKiE5+53SzzOatI2rDill4pfW+MzkJs+FIDBXYqD0M9Dy5wwsuS/t8NyKzrXw4R3
 JKoXJrdQn62Kgx/lXlwg3MILlihfS52+gtJDUwirHBBjNPDcJjl6OAdhhE4Fvetr9KIINM
 KFpAjO0p1G+qPyARPN6csh0l+JBV1UBks5WoyoRbMhMSagFm1jgeeYg4o6tqXzJfN/SIFT
 uiT6Mct2b3qRharPKDJJKt6oO/Qc8jEqD2djLQW6/FySVemHirPtU9JfRaWsCg==
ARC-Authentication-Results: i=1; rspamd-7f66b7b68c-k66cl;
 auth=pass smtp.auth=dreamhost smtp.mailfrom=adam@HIDDEN
X-Sender-Id: dreamhost|x-authsender|adam@HIDDEN
X-MC-Relay: Neutral
X-MailChannels-SenderId: dreamhost|x-authsender|adam@HIDDEN
X-MailChannels-Auth-Id: dreamhost
X-Daffy-Drop: 753203e437cd2042_1681841455021_3697038017
X-MC-Loop-Signature: 1681841455021:4041950862
X-MC-Ingress-Time: 1681841455020
Received: from pdx1-sub0-mail-a232.dreamhost.com (pop.dreamhost.com
 [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384)
 by 100.114.243.1 (trex/6.7.2); Tue, 18 Apr 2023 18:10:55 +0000
Received: from [10.66.0.114] (unknown [91.193.232.98])
 (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256)
 (No client certificate requested)
 (Authenticated sender: adam@HIDDEN)
 by pdx1-sub0-mail-a232.dreamhost.com (Postfix) with ESMTPSA id 4Q1Bmt0WFdz7K; 
 Tue, 18 Apr 2023 11:10:53 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alphapapa.net;
 s=dreamhost; t=1681841454;
 bh=l9IHVBYlMlizfgo+/fc4wTwqHNM1PqWoswBcyKsyqDU=;
 h=Date:To:Cc:From:Subject:Content-Type:Content-Transfer-Encoding;
 b=siE61tcZ09IL2ELUXqeTyFGLhE8A5Wg/Y07OY/LQZSUZMCdCvapGYUdm55aI/ffue
 KFSOKceXx0WScyayAdUyS2HrEOvDhJvVtbo1jr2prs1i3gL6IrrwXYrb6+qiprUYRR
 qJCcPxoJDWeg+jDygyxY6IpTUr2m6AzdMurcO2Gm+CfxLNUA81IqcjkyvgeDgB+4KV
 ALDuyWzr4Or1QmMOyGNJlT9BqcxytoutKd0jttJeiX/fbnEIjKRL5S9IDeUc2Vu9QR
 6MplIax+XOIZIHMnW/GO4pNvU0ETTzTCYx5k6ysWtuiFqwDPgmV4TViibddqqnWrom
 NjJBbyCNpR2sw==
Message-ID: <f8dda4be-42e6-2fdd-9a6a-5e3e49ea2b98@HIDDEN>
Date: Tue, 18 Apr 2023 13:10:57 -0500
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
 Thunderbird/102.9.0
Content-Language: en-US
To: 58431 <at> debbugs.gnu.org
From: Adam Porter <adam@HIDDEN>
Subject: Re: bug#58431: 29.0.50; [Eglot] Add "breadcrumb.el" feature based, on
 imenu.el/project.el services
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.7 (/)
X-Debbugs-Envelope-To: 58431
Cc: Eli Zaretskii <eliz@HIDDEN>,
 =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= <joaotavora@HIDDEN>,
 =?UTF-8?Q?Daniel_Mart=c3=adn?= <mardani29@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: -0.3 (/)

Daniel Martín <mardani29 <at> yahoo.es> writes:

>> This is similar to which-func.el, which displays the trailing element of
>> the breadcrumb in the headerline.  Perhaps the breadcrumb feature can be
>> thought of as an augmentation of which-func.el's functionality.  I don't
>> have a strong opinion there.
> 
> I see this feature as an augmentation of which-func.el.  The purpose is
> to show what is the current defun, but the how and where (mode line or
> header line) is a configuration option.
> 
> In recent versions of IDEs and text editors another header line UI to
> show the current function is getting popular, something like our old
> Sticky Function mode.  As with this breadcrumb UI, I think its logic
> belongs more to which-func-mode.el and shouldn't be coupled to Semantic.

FWIW, this sounds similar to the topsy.el library I published on MELPA a 
couple of years ago.  It aims to provide similar (or better) 
functionality than semantic-stickyfunc-mode without using Semantic.

https://github.com/alphapapa/topsy.el

If any of its code would be helpful, I'd be glad to "donate" it to 
ELPA/Emacs.




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

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


Received: (at 58431) by debbugs.gnu.org; 8 Apr 2023 19:47:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 08 15:47:52 2023
Received: from localhost ([127.0.0.1]:59630 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1plEXQ-0002Ut-Ai
	for submit <at> debbugs.gnu.org; Sat, 08 Apr 2023 15:47:52 -0400
Received: from sonic307-54.consmr.mail.ir2.yahoo.com ([87.248.110.31]:42709)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mardani29@HIDDEN>) id 1plEXO-0002U4-QO
 for 58431 <at> debbugs.gnu.org; Sat, 08 Apr 2023 15:47:51 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.es; s=s2048;
 t=1680983264; bh=4M0hCCVr9j9VrJSHlNPRT6S0lbi6QsORUUdlM5Slimk=;
 h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To;
 b=H/dPXI1e3UQKYp6aO7g9VofP1H8Z/6Uekujbq29Jh9+GDWJewUZEm0iv2P9kVULhDqThiKGtAqhzEfycz+SNJv9kjeL+5Jk8AtjZydnBZctehKuFwTCiQzgbh8aveIOxKkU7n1gvhy7sgA1rAUMmHOSm/SItdLYNsiHCfiBlN5oSo25VGqd8DOyh8ECCyycD99YBroqyJJfKDMo7LjiXCDH3dRWy71TatkM2q8U65rwECzA/dRL2leonxbRp0hZbb/kS0MoktrhrwtzP9SyGbq5G7FD6sbUlKCioTrZmTpVydEwWw/JyUnTWT5ThhTzMj5qf6YRXwMJyLnQqJoydfw==
X-SONIC-DKIM-SIGN: v=1; a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tOWoRwGOQo1yVo1lMKN2gqxsuC.oQhw4AXRUitALg7hqqRJr6uytHL.S1B
 wklrogOg1Ip5DYuqkVgqPRsD8RoYrIRRc7dBPmoXhT6yMBoTaSe5gd.XJAehgY4lvCZA.sDO_i_5
 cwdmJySG75oUSa_Xcr010pwmEMey1aQ2dE2vsvsZXqZDpphT0EHBI6GcVi2Id4dvHoILGbhHrZr5
 qaF38wGM.w1beV3V.fQCiaSz5uA7iDQ0QPDerWDbkkTEwISYleWJIBSYibiuiULYQKYEPhmQnm24
 wXWIWlMYCAR0.KDLOuydUo._cKkOfGec4pQ4qWqBl_8RMltQWZFoNEf_ZMaMIaGqkyjhverbGzJW
 YNrPAl89Vb9e7zsOZpdI4BOwx7BrBdO3zd9ON_3BwJOVOIwk6kC8ofjruZCGH7iPa96_ha.5RB2W
 vOhqLMUtaYZKo0rnUr716Iyk.yZxhOP35IdfT1dK8T13YQMN1eFeYipujqAyQ6L9ABBB0GkSmpd9
 xxvk2mVPOT1izGZAr4jWtfUHy7qarObNTo0J5XF4aCU3YyULLDJ0hFIM9mpemxIUdY2SAIFGPu8P
 XPHCzeWujpeewPvATegomHDrZLCCTPImcJQ3yPKg22iwf1shNR4ZH9mGaSVsnSsVTPR92EMWfhwT
 Rk__Y_GkZZZAkgwboAzBUlsW09UYhF8ZxaAi5RdfOgl1c9u_NtA--
X-Sonic-MF: <mardani29@HIDDEN>
X-Sonic-ID: a5228e30-9f22-477b-b693-a0630b77a9ea
Received: from sonic.gate.mail.ne1.yahoo.com by
 sonic307.consmr.mail.ir2.yahoo.com with HTTP; Sat, 8 Apr 2023 19:47:44 +0000
Received: by hermes--production-ir2-74cd8fc864-jl5bm (Yahoo Inc. Hermes SMTP
 Server) with ESMTPA ID c89caa4addc270e584a55467f7bee5b9; 
 Sat, 08 Apr 2023 19:47:41 +0000 (UTC)
From: =?utf-8?Q?Daniel_Mart=C3=ADn?= <mardani29@HIDDEN>
To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= <joaotavora@HIDDEN>
Subject: Re: bug#58431: 29.0.50; [Eglot] Add "breadcrumb.el" feature based
 on imenu.el/project.el services
References: <87czayra73.fsf@HIDDEN>
Date: Sat, 08 Apr 2023 21:47:40 +0200
In-Reply-To: <87czayra73.fsf@HIDDEN> (=?utf-8?Q?=22Jo=C3=A3o_T=C3=A1vor?=
 =?utf-8?Q?a=22's?= message of "Tue, 11 Oct 2022 10:17:20 +0100")
Message-ID: <m1mt3i2m1v.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (darwin)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Mailer: WebService/1.1.21365
 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo
Content-Length: 778
X-Spam-Score: 0.3 (/)
X-Debbugs-Envelope-To: 58431
Cc: eliz@HIDDEN, 58431 <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.7 (/)

Jo=C3=A3o T=C3=A1vora <joaotavora@HIDDEN> writes:

>
> This is similar to which-func.el, which displays the trailing element of
> the breadcrumb in the headerline.  Perhaps the breadcrumb feature can be
> thought of as an augmentation of which-func.el's functionality.  I don't
> have a strong opinion there.

I see this feature as an augmentation of which-func.el.  The purpose is
to show what is the current defun, but the how and where (mode line or
header line) is a configuration option.

In recent versions of IDEs and text editors another header line UI to
show the current function is getting popular, something like our old
Sticky Function mode.  As with this breadcrumb UI, I think its logic
belongs more to which-func-mode.el and shouldn't be coupled to Semantic.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#58431; Package emacs. Full text available.
Severity set to 'wishlist' from 'normal' Request was from Stefan Kangas <stefankangas@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

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


Received: (at 58431) by debbugs.gnu.org; 12 Oct 2022 08:29:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Oct 12 04:29:01 2022
Received: from localhost ([127.0.0.1]:55631 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oiX6q-00085Q-Tw
	for submit <at> debbugs.gnu.org; Wed, 12 Oct 2022 04:29:01 -0400
Received: from mail-wr1-f52.google.com ([209.85.221.52]:45025)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <joaotavora@HIDDEN>) id 1oiX6n-00085A-EO
 for 58431 <at> debbugs.gnu.org; Wed, 12 Oct 2022 04:28:59 -0400
Received: by mail-wr1-f52.google.com with SMTP id r13so25097117wrj.11
 for <58431 <at> debbugs.gnu.org>; Wed, 12 Oct 2022 01:28:57 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=content-transfer-encoding:mime-version:user-agent:message-id:date
 :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=wOGi+ruYhWtvz2Icp9xbHseweM/SozpWwmGQaxaOlk4=;
 b=ERvxrb1WsH/U2F9E6ubUE9q+MtYoA12PAkiXW+8rttzz00eb7Ffxb7wp7IbBjwUtC0
 /pJvaLFOGgyx7DF/C2wQGr4at6lmUFlaSAX9Pws/QLDgRywWR3bhs6HTBCF0t4KPd5j6
 aJmH5MOacu6UoonZVBYO6+dG+r3zNq1vWlkzU1wY4WTrQqAWR8ys2vQWSdJCJlFZDqOF
 ipKMMDTkFIFaEsKDMqzBzXXxDqIfnEzMEerwf89Re+GKo/bYv65Ln1KHXg01Lr6WuHcZ
 uJvdZfylZjJySBN0gOmD9Vq05IIqQ3qGF796Yqhdt5vTCL6ZIe+PIiTwvGtdOYKv90OD
 52cA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=content-transfer-encoding:mime-version:user-agent:message-id:date
 :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from
 :to:cc:subject:date:message-id:reply-to;
 bh=wOGi+ruYhWtvz2Icp9xbHseweM/SozpWwmGQaxaOlk4=;
 b=Sl89lBTr4qKvRCFm3Ra0D2IJiVYnMvBwkR2k8qA49Vq43e7OU/4/64a1UoA5qu2fNT
 ZtaDyknp1Xuh3j3a/8Y2zPkrs063pI/LIzNRKxMJUa/922g3UX8e3fFn4qv6VcMkhTVt
 ctwWDy3RpczMkGAjoXbOXKmzGn2HE1n9oDKnrXHTf/IzUeIIzDuIj9mDl/eMpQqmMzn1
 Omn+ggSxLRwhHFz6z1SU3NNMn46xAdB8/sb0ouY60eWNR4Y1BOw7CliXhZ1zrgEqltWa
 8zc5DCWdUQ/SMyDawRgLYKrOZ8igNQzFruXLXp3UswxELYc/9jY979Gt/Pqg4j7JmCOk
 aDLw==
X-Gm-Message-State: ACrzQf2A3orr9LTKLNdI3R510naZFT2XvfhUgU+e8IZrwLZQGdd/bQaY
 njbWl7YT0snokrxYUhQJqiU=
X-Google-Smtp-Source: AMsMyM77Ix+DhKuzdd+6sCDzuqOYhkNKriZWlYO6HOULIEGFkQ4yOMs8xacciY/wq78dVyRDSIF7+Q==
X-Received: by 2002:adf:f804:0:b0:22e:5a9a:15d9 with SMTP id
 s4-20020adff804000000b0022e5a9a15d9mr17471045wrp.390.1665563331501; 
 Wed, 12 Oct 2022 01:28:51 -0700 (PDT)
Received: from krug (87-196-72-225.net.novis.pt. [87.196.72.225])
 by smtp.gmail.com with ESMTPSA id
 i6-20020a5d5586000000b00228a6ce17b4sm13068430wrv.37.2022.10.12.01.28.50
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Wed, 12 Oct 2022 01:28:50 -0700 (PDT)
From: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= <joaotavora@HIDDEN>
To: Yuan Fu <casouri@HIDDEN>
Subject: Re: bug#58431: 29.0.50; [Eglot] Add "breadcrumb.el" feature based
 on imenu.el/project.el services
In-Reply-To: <F0219975-55A7-423E-BD9F-3E1778F83854@HIDDEN> (Yuan Fu's
 message of "Tue, 11 Oct 2022 23:22:48 -0700")
References: <87czayra73.fsf@HIDDEN>
 <21C0D090-6EE1-45EB-B23A-8BECDD5A9447@HIDDEN>
 <87ilkpq5se.fsf@HIDDEN>
 <F0219975-55A7-423E-BD9F-3E1778F83854@HIDDEN>
Date: Wed, 12 Oct 2022 09:30:01 +0100
Message-ID: <87bkqhphpy.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 58431
Cc: eliz@HIDDEN, 58431 <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.0 (-)

Yuan Fu <casouri@HIDDEN> writes:

> Thanks for your explanation! I didn=E2=80=99t know which-func can just use
> imenu--index-alist. I already have support for imenu, just need to let
> which-func do its thing.

Yup.

> What you said for breakcumb.el makes total sense. It sounds pretty
> straightforward, just get file path from project.el and function path
> from imenu and put them together.

Yes, that's exactly it.  It should be reasonably straightforward yes.

Maybe, to make a fancy breadcrumb, with icons like lsp-mode's we will
need some small augmentations to imenu--index-alist, but I don't see
that as a big difficulty.

> I can work on it later if no one
> come around and adopt it, I=E2=80=99ve got a lot of stuff on my plate alr=
eady
> ;-)

Same here.  Drop a line a line if start working on this, so we don't
duplicate each other's work.

Jo=C3=A3o




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

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


Received: (at 58431) by debbugs.gnu.org; 12 Oct 2022 06:23:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Oct 12 02:23:01 2022
Received: from localhost ([127.0.0.1]:55405 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oiV8u-0004ox-F7
	for submit <at> debbugs.gnu.org; Wed, 12 Oct 2022 02:23:00 -0400
Received: from mail-pj1-f47.google.com ([209.85.216.47]:46966)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <casouri@HIDDEN>) id 1oiV8p-0004og-Ni
 for 58431 <at> debbugs.gnu.org; Wed, 12 Oct 2022 02:22:58 -0400
Received: by mail-pj1-f47.google.com with SMTP id
 t12-20020a17090a3b4c00b0020b04251529so1099845pjf.5
 for <58431 <at> debbugs.gnu.org>; Tue, 11 Oct 2022 23:22:55 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=to:references:message-id:content-transfer-encoding:cc:date
 :in-reply-to:from:subject:mime-version:from:to:cc:subject:date
 :message-id:reply-to;
 bh=eBIuxBPm4ZVWLfLu3OOZpPvSZwJhYTJ0UBE/ve4EMy0=;
 b=T8yWyp7WKYwIRtKLjbI+oXrfG7gi9XOfS6pH9F8aHsNGY3DigBYBGDLIzsiq0XxSE+
 HpDHYOvjF6WJtvmFcbMA6kVjiSOReOyQjXYQnAgWgJeFrk5DZxOTqDaXBEYr0TLQd6fO
 0aGfc9FwtPuDTY9My6+5EpcUd4i5u+oH4xFkLic/VrEY/ke74b9V7HFWe6vRP6Tkks4N
 UTALJ6H9ju9XyvHwrSbm3hOL4GbOsnLsfwmqwXedewioOAtyClvfD0b61Y0R2EIOzugo
 quL8mH/RtA4J0VgwBVHQQSL6APJoTaDWysXTem2VIOuOMWFd/uJbeSbtrGJik/LF/E1o
 EiZQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=to:references:message-id:content-transfer-encoding:cc:date
 :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=eBIuxBPm4ZVWLfLu3OOZpPvSZwJhYTJ0UBE/ve4EMy0=;
 b=ACFOyih+tOiQDwonhfFIIBbMlLO1Gn+99KAgIxEVA/C2bbJmkgdBowZ1qjoZ4wHS+O
 Nq9259TKrslh0AeR3F3wdtcDog7o9UxTIB5dJCADgRxjr9oRH4HffRTCTz43xFvRGMaz
 /B8dbis2oaCeoKXhUKFA8rTMtC5cxdA9N3IeZeRpRORAiWjgw0RG2JmYNoxn7fl2eZGu
 AYhPrN0IdRYq57rsUiL4AoQAJTAO7Je5ILNFodieboaj6H+k5Fdsa1PgO5DXGygiPC/L
 3L4SKvgokA2RsexFMGKFMp63rIbj0x9nc4eXZcAC7CXJcTrtX6XcvR7p0B3KtZt8R3IW
 N+KQ==
X-Gm-Message-State: ACrzQf1EX6cGPMP4ihjP9OE4Pk29L72EWnVGKDBT9aBNpvTIpgoazQb4
 N5dbLNrZQrjU36oEtTWQbi3xaRIXP6l/eQ==
X-Google-Smtp-Source: AMsMyM6VmP8Rwo/IESmJIgeQa2aY79gZh+5vC4JAdlcbs6B/IiAqRYDv7yQtJ4EP6D0B0qnmaDJ4Mg==
X-Received: by 2002:a17:903:2284:b0:178:349b:d21b with SMTP id
 b4-20020a170903228400b00178349bd21bmr28290586plh.49.1665555769717; 
 Tue, 11 Oct 2022 23:22:49 -0700 (PDT)
Received: from smtpclient.apple (cpe-172-117-161-177.socal.res.rr.com.
 [172.117.161.177]) by smtp.gmail.com with ESMTPSA id
 j6-20020a170903024600b00178a9b193cfsm9781404plh.140.2022.10.11.23.22.48
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Tue, 11 Oct 2022 23:22:49 -0700 (PDT)
Content-Type: text/plain;
	charset=utf-8
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\))
Subject: Re: bug#58431: 29.0.50; [Eglot] Add "breadcrumb.el" feature based on
 imenu.el/project.el services
From: Yuan Fu <casouri@HIDDEN>
In-Reply-To: <87ilkpq5se.fsf@HIDDEN>
Date: Tue, 11 Oct 2022 23:22:48 -0700
Content-Transfer-Encoding: quoted-printable
Message-Id: <F0219975-55A7-423E-BD9F-3E1778F83854@HIDDEN>
References: <87czayra73.fsf@HIDDEN>
 <21C0D090-6EE1-45EB-B23A-8BECDD5A9447@HIDDEN> <87ilkpq5se.fsf@HIDDEN>
To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= <joaotavora@HIDDEN>
X-Mailer: Apple Mail (2.3696.120.41.1.1)
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 58431
Cc: eliz@HIDDEN, 58431 <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.0 (-)



> On Oct 11, 2022, at 4:50 PM, Jo=C3=A3o T=C3=A1vora =
<joaotavora@HIDDEN> wrote:
>=20
> Yuan Fu <casouri@HIDDEN> writes:
>=20
>>> In the original Eglot request, users are requesting this UI feature =
for
>>> the Eglot LSP client.  But this doesn't have any LSP-specific
>>> interactions.  It can and should be done entirely by using the =
services
>>> provided by imenu.el and project.el.
>>>=20
>>> Eglot already integrates with Imenu, so as soon as this hypothetical
>>> breadcrumb.el is in place, then Eglot users can take advantage of =
it.
>>>=20
>>> This is similar to which-func.el, which displays the trailing =
element of
>>> the breadcrumb in the headerline.  Perhaps the breadcrumb feature =
can be
>>> thought of as an augmentation of which-func.el's functionality.  I =
don't
>>> have a strong opinion there.
>>=20
>> I think which-func is closer to breadcrumb conceptually and api-wise:
>> Both which-func and breadcrumb are about the current function, while
>> imenu is about a list of _all_ functions/sections.
>=20
> I think there is a slight misunderstanding here.
>=20
> The information stored in imenu is what which-func.el uses by default.
> See this comment in which-func.el
>=20
>   ;; This package prints name of function where your current point is
>   ;; located in mode line.  It assumes that you work with the imenu
>   ;; package and `imenu--index-alist' is up to date.
>=20
> Moreover, imenu--index-alist is not a list, but a tree (of which a =
flat
> list is a particular case).
>=20
> M-x which-function-mode works for any Eglot-managed buffer, but Eglot
> doesn't have any code specific to which-func.el.  How can this be?
> Well, Eglot stores the tree information is gets from LSP in Imenu's
> imenu--index-alist and that information serves many Imenu frontends --
> which-func.el being just one of them.
>=20
> Moreover, the breadcrumb that the Eglot user is requesting -- and =
which
> I am describing in detail -- also needs information that is owned by
> project.el, namely the project root.
>=20
> Let's use some M-x artist-mode magic to explain what is in place
> and what I am proposing.
>=20
> +---+----+   +---------+     +----------+
> |eglot.el|   |python.el|     | ruby.el  |
> +---+----+   +---+-----+     +----+-----+
>    |            |                |
>    |            |                |
>    |            v                |
>    |        +----------+         |
>    +------->| imenu.el |<--------+
>             +-+--------+
>               |
> +--------------+
> |
> |  +-------------------+
> \->|which-func.el      |
> |  |(already working)  |
> |  +-------------------+
> |
> |  +-------------------+
> \->|speedbar.el        |
> |  |(also working)     |
> |  +-------------------+
> |
> |  +-------------------+
> \->|...                |
> |  +-------------------+         +--------------+
> |                                |  project.el  |
> |  o-------------------o         +--------------+
> \->|breadcrumb.el      |             /
>   |(proposed addition)|<------------=20
>   o-------------------o
>=20
> So, Eglot already stores its LSP-gathered information "inside" imenu's
> data structures using imenu-create-index-function.  As does the =
current
> python.el, ruby.el, antlr-mode.el, cc-mode and many others when they =
are
> used without Eglot.
>=20
> which-func.el get this information from imenu and uses it for the =
limited
> purpose of showing only the leaf of the tree where the point is at.
>=20
> breadcrumb.el would function similarly, but instead use it to show the
> _full path_ of that tree up until the leaf of the tree where the point
> is at.  It would then prepend the path to the file by getting it from
> project.el.
>=20
>> which-func-function to accept a list of function names. In fact, the
>> which-func function of tree-sitter powered python.el already =
generates
>> a breadcrumb, I just joined all the function names along the path =
with
>> =E2=80=9C/=E2=80=9C.
>=20
> You can use that strategy in your new Python mode, but it seems
> misguided to me.  You'll be supporting which-func.el directly instead =
of
> indirectly, thus missing out on other imenu-using client frontends =
like
> speedbar, "treemacs", M-x imenu or others.  They will not work
> out-of-the-box with your new mode.
>=20
> Therefore, my advice is that you keep the tree structure you get from
> tree-sitter intact and stored in imenu--index-alist via
> imenu-create-index-function -- see the docstring imenu--index-alist --
> then let the imenu clients compose a breadcrumb iff they so desire.
>=20
> breadcrumb.el would be such a client, that would work in your
> tree-sitter powered python mode and in many other contexts.
>=20
> Jo=C3=A3o

Thanks for your explanation! I didn=E2=80=99t know which-func can just =
use imenu--index-alist. I already have support for imenu, just need to =
let which-func do its thing.=20

What you said for breakcumb.el makes total sense. It sounds pretty =
straightforward, just get file path from project.el and function path =
from imenu and put them together. I can work on it later if no one come =
around and adopt it, I=E2=80=99ve got a lot of stuff on my plate already =
;-)

Yuan





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

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


Received: (at 58431) by debbugs.gnu.org; 11 Oct 2022 23:49:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Oct 11 19:49:14 2022
Received: from localhost ([127.0.0.1]:55099 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oiOzp-0000b1-SZ
	for submit <at> debbugs.gnu.org; Tue, 11 Oct 2022 19:49:14 -0400
Received: from mail-wr1-f47.google.com ([209.85.221.47]:46046)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <joaotavora@HIDDEN>) id 1oiOzm-0000aj-BQ
 for 58431 <at> debbugs.gnu.org; Tue, 11 Oct 2022 19:49:12 -0400
Received: by mail-wr1-f47.google.com with SMTP id a10so23802613wrm.12
 for <58431 <at> debbugs.gnu.org>; Tue, 11 Oct 2022 16:49:10 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=content-transfer-encoding:mime-version:user-agent:message-id:date
 :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=rdZCFfxyC7UP6VQV1fWodDoH4yUjcYVikhT0CliBLeA=;
 b=dO8BpvxccEIsnVkjBch9nrw0/P000kL9h0QDf8oPg3gOsTkGi2VykVaiEpoKpf36Dc
 w1B5TBgoRn1iKNo6YgDSpXpCUWVAIzYoXFaDd+IG4P4YPeNgBL6r5IpXgvhOJbR8wK8c
 +J9EFdIbqPr/tgAIzYCkn8Nn9y1k/K+257qZoDW/fXVmmbYwawBF012MEj69LiTQcEXJ
 NWC6InTwjpkIC4JQGBIfm33v+pjICwP+sGWZpMYiTuWu/dJoApdWAU2IdHRwGHaTOXU5
 6zp0jXKDow1xCsCZ3lpR9Vwts4PlqVeFDOFOUdNvvkMzrEMqTj3ADj7HTlIvTG2YFYO3
 /9CA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=content-transfer-encoding:mime-version:user-agent:message-id:date
 :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from
 :to:cc:subject:date:message-id:reply-to;
 bh=rdZCFfxyC7UP6VQV1fWodDoH4yUjcYVikhT0CliBLeA=;
 b=WQQW2ifAZmGxzFAwkMF47geJ6oKnrxRpNUohUg5EY1EC7k9yclmM6eqLtXx98Q4goD
 YpGR4QRsn1YMmjX0vjO8xK+xxklYQlzWMS/aoKuDLeblESfPYP3U9DzXn7vEycs8ErG5
 e/Y+hnZ3DhjR3HXHkGGNQPpqZIZnn7bU3Ldt8cLD51hN1sylGBS6nbGfV/HwsQtd3P9a
 Sc1vyb7L+Tt1dXHJTCWDquRk9HBE8PsvbMx2w/mEyMR2iLuQPZhyU4HEEeSvddoPFNb8
 s5KIefTRTQ2XpraOms0iGT0NBsf6rBbWNp+UVEg8kZm9NJ8ZTtAW7RnZPlarZLh7y+p9
 d62w==
X-Gm-Message-State: ACrzQf2xD7yKRIW5hcEi0cT4CQr/OgHny+SOjX2RYkt3EMY8fH1FzqF3
 ptFdD66KwyqKVuFqSnKW9iE=
X-Google-Smtp-Source: AMsMyM4+EatvOviu/ofH2cPtHbA+Q6JmsKg8/3RgZ7sjJlrfj+queDSNGU5rzFQIJrTCKjUGw5u7vw==
X-Received: by 2002:adf:ee0a:0:b0:22f:6a2a:92ab with SMTP id
 y10-20020adfee0a000000b0022f6a2a92abmr11428673wrn.545.1665532143237; 
 Tue, 11 Oct 2022 16:49:03 -0700 (PDT)
Received: from krug (87-196-72-225.net.novis.pt. [87.196.72.225])
 by smtp.gmail.com with ESMTPSA id
 g11-20020a5d488b000000b00228d7078c4esm12238021wrq.4.2022.10.11.16.49.02
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Tue, 11 Oct 2022 16:49:02 -0700 (PDT)
From: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= <joaotavora@HIDDEN>
To: Yuan Fu <casouri@HIDDEN>
Subject: Re: bug#58431: 29.0.50; [Eglot] Add "breadcrumb.el" feature based
 on imenu.el/project.el services
In-Reply-To: <21C0D090-6EE1-45EB-B23A-8BECDD5A9447@HIDDEN> (Yuan Fu's
 message of "Tue, 11 Oct 2022 08:38:30 -0700")
References: <87czayra73.fsf@HIDDEN>
 <21C0D090-6EE1-45EB-B23A-8BECDD5A9447@HIDDEN>
Date: Wed, 12 Oct 2022 00:50:09 +0100
Message-ID: <87ilkpq5se.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 58431
Cc: eliz@HIDDEN, 58431 <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.0 (-)

Yuan Fu <casouri@HIDDEN> writes:

>> In the original Eglot request, users are requesting this UI feature for
>> the Eglot LSP client.  But this doesn't have any LSP-specific
>> interactions.  It can and should be done entirely by using the services
>> provided by imenu.el and project.el.
>>
>> Eglot already integrates with Imenu, so as soon as this hypothetical
>> breadcrumb.el is in place, then Eglot users can take advantage of it.
>>
>> This is similar to which-func.el, which displays the trailing element of
>> the breadcrumb in the headerline.  Perhaps the breadcrumb feature can be
>> thought of as an augmentation of which-func.el's functionality.  I don't
>> have a strong opinion there.
>
> I think which-func is closer to breadcrumb conceptually and api-wise:
> Both which-func and breadcrumb are about the current function, while
> imenu is about a list of _all_ functions/sections.

I think there is a slight misunderstanding here.

The information stored in imenu is what which-func.el uses by default.
See this comment in which-func.el

   ;; This package prints name of function where your current point is
   ;; located in mode line.  It assumes that you work with the imenu
   ;; package and `imenu--index-alist' is up to date.

Moreover, imenu--index-alist is not a list, but a tree (of which a flat
list is a particular case).

M-x which-function-mode works for any Eglot-managed buffer, but Eglot
doesn't have any code specific to which-func.el.  How can this be?
Well, Eglot stores the tree information is gets from LSP in Imenu's
imenu--index-alist and that information serves many Imenu frontends --
which-func.el being just one of them.

Moreover, the breadcrumb that the Eglot user is requesting -- and which
I am describing in detail -- also needs information that is owned by
project.el, namely the project root.

Let's use some M-x artist-mode magic to explain what is in place
and what I am proposing.

+---+----+   +---------+     +----------+
|eglot.el|   |python.el|     | ruby.el  |
+---+----+   +---+-----+     +----+-----+
    |            |                |
    |            |                |
    |            v                |
    |        +----------+         |
    +------->| imenu.el |<--------+
             +-+--------+
               |
+--------------+
|
|  +-------------------+
\->|which-func.el      |
|  |(already working)  |
|  +-------------------+
|
|  +-------------------+
\->|speedbar.el        |
|  |(also working)     |
|  +-------------------+
|
|  +-------------------+
\->|...                |
|  +-------------------+         +--------------+
|                                |  project.el  |
|  o-------------------o         +--------------+
\->|breadcrumb.el      |             /
   |(proposed addition)|<------------=20
   o-------------------o

So, Eglot already stores its LSP-gathered information "inside" imenu's
data structures using imenu-create-index-function.  As does the current
python.el, ruby.el, antlr-mode.el, cc-mode and many others when they are
used without Eglot.

which-func.el get this information from imenu and uses it for the limited
purpose of showing only the leaf of the tree where the point is at.

breadcrumb.el would function similarly, but instead use it to show the
_full path_ of that tree up until the leaf of the tree where the point
is at.  It would then prepend the path to the file by getting it from
project.el.

> which-func-function to accept a list of function names. In fact, the
> which-func function of tree-sitter powered python.el already generates
> a breadcrumb, I just joined all the function names along the path with
> =E2=80=9C/=E2=80=9C.

You can use that strategy in your new Python mode, but it seems
misguided to me.  You'll be supporting which-func.el directly instead of
indirectly, thus missing out on other imenu-using client frontends like
speedbar, "treemacs", M-x imenu or others.  They will not work
out-of-the-box with your new mode.

Therefore, my advice is that you keep the tree structure you get from
tree-sitter intact and stored in imenu--index-alist via
imenu-create-index-function -- see the docstring imenu--index-alist --
then let the imenu clients compose a breadcrumb iff they so desire.

breadcrumb.el would be such a client, that would work in your
tree-sitter powered python mode and in many other contexts.

Jo=C3=A3o




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

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


Received: (at 58431) by debbugs.gnu.org; 11 Oct 2022 15:38:50 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Oct 11 11:38:50 2022
Received: from localhost ([127.0.0.1]:54655 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oiHLG-0000b1-Cp
	for submit <at> debbugs.gnu.org; Tue, 11 Oct 2022 11:38:50 -0400
Received: from mail-oa1-f43.google.com ([209.85.160.43]:33289)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <casouri@HIDDEN>) id 1oiHLE-0000al-Hp
 for 58431 <at> debbugs.gnu.org; Tue, 11 Oct 2022 11:38:49 -0400
Received: by mail-oa1-f43.google.com with SMTP id
 586e51a60fabf-131dda37dddso16390635fac.0
 for <58431 <at> debbugs.gnu.org>; Tue, 11 Oct 2022 08:38:48 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=to:references:message-id:content-transfer-encoding:cc:date
 :in-reply-to:from:subject:mime-version:from:to:cc:subject:date
 :message-id:reply-to;
 bh=ZEiW9XaG3wVKmf5LDPt7v+8fMV5P+3lvHQ00uyR5kmo=;
 b=PwmzAvXbFeSEPZA31TST8UinT81NCGgiLsmJE4zPtyPNP5XYEsA5CwaD9hUjQ4/nLb
 Yl1ENFk6vDmqUumMP9CKifqeHc6RVKt1449krbR+CUuIi0UHCzgQnUMsW+sn/xWM/Ezh
 SYznV9zQR+llAvi8SBHCbEorPCLognUY5ixlSVZ2JmUn1lRv1Efk77oojYz5sX3/YmB2
 DNp0akNq7KILk95LpGrKvJocgTLU12q0sCmt5wun5JgbA7ROLcq5/iSCi2JJiFyGsASw
 MOeaYJg4cPkhCjXmi3J3pCJU/upr3hDrOHkh4msmPvsaINDC8/7kvKCrm+exGYpF5ckH
 tLnA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=to:references:message-id:content-transfer-encoding:cc:date
 :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=ZEiW9XaG3wVKmf5LDPt7v+8fMV5P+3lvHQ00uyR5kmo=;
 b=sUJA8/ADrUyJab0nAvjpNt/vOVGCP6ufaoFncBRmyXEC31DTKSYJabY3/VAiIeDFAo
 QaOjuw+Wn8lZ895T8w+CM1n1LzIdiN6EKA6UzLKlP5F3AyB9jRxP2Ut9lSyJ8Ow2cm62
 FFgqmcR+L2wHTCFDr6kXUMG32krHhXTmGBROHjejvFbgl8QZ1cDLjyFeBw1Sr1GktyXu
 JgvXjHtANNGUVBFbTLxUcTXWaCdW1JZjp8jeEFBzNfkRSBacu0/0yT/Ndjhj4Q6b3eii
 zu6MiD0JlDV8tpapwzBKJtBcnFHS+r6oAppCDDPyH0A0U4FjU+h37NpOBSvTSQUkGyXk
 4o5A==
X-Gm-Message-State: ACrzQf0UIznMjjMO+AMjHhH6J+sChJwLEAwUDKFPSYOjZ6lmzUMlswjI
 DJC8OORnOboaGZrAN2onmvbrXykvXuVf3Q==
X-Google-Smtp-Source: AMsMyM5mTovwPi8x46GaQvUekvD2m93Mbaeskv8XsLv4SFNVVhSPU1RCGA7AQsP+kZNM+sDNDyd6Fw==
X-Received: by 2002:a17:90b:4b0e:b0:20d:213b:1083 with SMTP id
 lx14-20020a17090b4b0e00b0020d213b1083mr18876893pjb.208.1665502712274; 
 Tue, 11 Oct 2022 08:38:32 -0700 (PDT)
Received: from smtpclient.apple (cpe-172-117-161-177.socal.res.rr.com.
 [172.117.161.177]) by smtp.gmail.com with ESMTPSA id
 w4-20020a170902ca0400b0017eea4a3979sm8689091pld.154.2022.10.11.08.38.31
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Tue, 11 Oct 2022 08:38:31 -0700 (PDT)
Content-Type: text/plain;
	charset=utf-8
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\))
Subject: Re: bug#58431: 29.0.50; [Eglot] Add "breadcrumb.el" feature based on
 imenu.el/project.el services
From: Yuan Fu <casouri@HIDDEN>
In-Reply-To: <87czayra73.fsf@HIDDEN>
Date: Tue, 11 Oct 2022 08:38:30 -0700
Content-Transfer-Encoding: quoted-printable
Message-Id: <21C0D090-6EE1-45EB-B23A-8BECDD5A9447@HIDDEN>
References: <87czayra73.fsf@HIDDEN>
To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= <joaotavora@HIDDEN>
X-Mailer: Apple Mail (2.3696.120.41.1.1)
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 58431
Cc: eliz@HIDDEN, 58431 <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.0 (-)


> In the original Eglot request, users are requesting this UI feature =
for
> the Eglot LSP client.  But this doesn't have any LSP-specific
> interactions.  It can and should be done entirely by using the =
services
> provided by imenu.el and project.el.
>=20
> Eglot already integrates with Imenu, so as soon as this hypothetical
> breadcrumb.el is in place, then Eglot users can take advantage of it.
>=20
> This is similar to which-func.el, which displays the trailing element =
of
> the breadcrumb in the headerline.  Perhaps the breadcrumb feature can =
be
> thought of as an augmentation of which-func.el's functionality.  I =
don't
> have a strong opinion there.

I think which-func is closer to breadcrumb conceptually and api-wise: =
Both which-func and breadcrumb are about the current function, while =
imenu is about a list of _all_ functions/sections. We could just allow =
which-func-function to accept a list of function names. In fact, the =
which-func function of tree-sitter powered python.el already generates a =
breadcrumb, I just joined all the function names along the path with =
=E2=80=9C/=E2=80=9C.=20

>=20
> Jo=C3=A3o
>=20
> PS: Eli, I'm CCing you to underline this as just an example of a UI
> feature that is requested for Eglot, but belongs somewhere else.  In
> this case, I believe there is 0 additional integration needed in
> eglot.el: it can be realized independently of the backend which feeds
> into Imenu (perhaps tree-sitter?) and project.el.

I agree, Emacs provides the framework/UI, and tree-sitter/eglot/future =
magic plug in.

Yuan=




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

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


Received: (at submit) by debbugs.gnu.org; 11 Oct 2022 09:16:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Oct 11 05:16:17 2022
Received: from localhost ([127.0.0.1]:50896 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oiBN3-0002Dd-1T
	for submit <at> debbugs.gnu.org; Tue, 11 Oct 2022 05:16:17 -0400
Received: from lists.gnu.org ([209.51.188.17]:37768)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <joaotavora@HIDDEN>) id 1oiBN1-0002DW-7a
 for submit <at> debbugs.gnu.org; Tue, 11 Oct 2022 05:16:15 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:33940)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <joaotavora@HIDDEN>)
 id 1oiBN0-0001aa-W8
 for bug-gnu-emacs@HIDDEN; Tue, 11 Oct 2022 05:16:15 -0400
Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]:40909)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <joaotavora@HIDDEN>)
 id 1oiBMz-0006IE-68; Tue, 11 Oct 2022 05:16:14 -0400
Received: by mail-wr1-x42f.google.com with SMTP id w18so20606237wro.7;
 Tue, 11 Oct 2022 02:16:12 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=content-transfer-encoding:mime-version:message-id:date:subject:cc
 :to:from:from:to:cc:subject:date:message-id:reply-to;
 bh=I0IkWyea3/I7voMsROabyNheve9wRvtXbacErCrnWZk=;
 b=hJrpA2x342yB0svnZN/I1tjF4Gm2d/vAg92WY8oun0UY3yAqawQzU6voswoVOzKc/y
 c5kxATS8DNXMpkgVnNqOn817CJVVrtKgE8gpWLVimVeUcN8pgku7gxHQRrEmQfNt5WrX
 ICZr0h96yboZsSC0qblQKUkHav0ERyPRZNIAn7I2AtjEOpnlBIbmqPvMiPODa39Sb4ZP
 wP8ekC7h8cMgQdR1NM3RXQyJk9J5i0CbQZioVNdAhCkWJicDd6MErYk171QbtntzvGkL
 SPljAnhxPlxxfHDtp6BUAl0KqECm476iy2mleTV1VzTGJwFHpwey166aRusV8gmQJk08
 8+6w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=content-transfer-encoding:mime-version:message-id:date:subject:cc
 :to:from:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=I0IkWyea3/I7voMsROabyNheve9wRvtXbacErCrnWZk=;
 b=lHYmq2YPHSdS1GEdPsaClKtQgGFtOz2HVbh/rV9CKFj62gT7AaqDVf8Lx1u9LvTtzC
 1MMy747igmylJQ3ouAprixkp3HLoQDWkfhirhL2eDDMSEufe7QcrfBin/nnIrWUVFQbv
 p6XItlpPOaMbYCZRCNmMITtlkYYhcMUSXZ355KNFlg2TmH7tbPBvokLaSCLFOXwW5Rrd
 HivwU+N5kKWwzkPw+EkciUUvSQYVDNr5rnBhTmGwiqSXtssRreWNhr5UYcYS4U0vwkCr
 uYvkeN7spGFg9FoaXRyUDZ90SHqnhXTkSD24R2egWY733LhrSnWqDkuogT9xyT2QF2Gu
 u+bg==
X-Gm-Message-State: ACrzQf3EM/z8+E/kVMNspYr+gGCOeKtI4TLHfpUaZ+ZYl50qt+1/4FaE
 yoEEaHaHpOBrReFhWf48Rf/l/Aevi38=
X-Google-Smtp-Source: AMsMyM7ANj6wK1r/urAbNi9HZDgmEzDF6JYUgyZ0RCMudrS2AJv/Fu9lzGiq1ekswzW4o+60KRAFyg==
X-Received: by 2002:adf:8bc5:0:b0:22e:3873:276d with SMTP id
 w5-20020adf8bc5000000b0022e3873276dmr13954800wra.402.1665479770430; 
 Tue, 11 Oct 2022 02:16:10 -0700 (PDT)
Received: from krug (87-196-72-225.net.novis.pt. [87.196.72.225])
 by smtp.gmail.com with ESMTPSA id
 j10-20020a05600c190a00b003c6b7f5567csm2459927wmq.0.2022.10.11.02.16.09
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Tue, 11 Oct 2022 02:16:09 -0700 (PDT)
From: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= <joaotavora@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 29.0.50; [Eglot] Add "breadcrumb.el" feature based on
 imenu.el/project.el services
Date: Tue, 11 Oct 2022 10:17:20 +0100
Message-ID: <87czayra73.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Received-SPF: pass client-ip=2a00:1450:4864:20::42f;
 envelope-from=joaotavora@HIDDEN; helo=mail-wr1-x42f.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: -1.3 (-)
X-Debbugs-Envelope-To: submit
Cc: eliz@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: -2.3 (--)

Hello,

This request for a "breadcrumb" feature started in Eglot's bug tracker:
=20=20=20
   https://github.com/joaotavora/eglot/discussions/988

Put it short, a breadcrumb is a summarized indication of the full path
to the current location of point within a source file.  So if I have a
file 'baz.cpp' inside a directory 'bars' of a project directory 'foo'
and that file contains:

    class Baz {
          int quux() {
              return 42; // point here
          }

          // or here
    };

Then the breadcrumb would read:

    foo > bars > baz.cpp > Baz > quux

If I move my point to outside quux(), the breadcrumb should now read:

    foo > bars > baz.cpp > Baz

The preferred location of this breadcrumb readout should be the
headerline.

In the original Eglot request, users are requesting this UI feature for
the Eglot LSP client.  But this doesn't have any LSP-specific
interactions.  It can and should be done entirely by using the services
provided by imenu.el and project.el.

Eglot already integrates with Imenu, so as soon as this hypothetical
breadcrumb.el is in place, then Eglot users can take advantage of it.

This is similar to which-func.el, which displays the trailing element of
the breadcrumb in the headerline.  Perhaps the breadcrumb feature can be
thought of as an augmentation of which-func.el's functionality.  I don't
have a strong opinion there.

Jo=C3=A3o

PS: Eli, I'm CCing you to underline this as just an example of a UI
feature that is requested for Eglot, but belongs somewhere else.  In
this case, I believe there is 0 additional integration needed in
eglot.el: it can be realized independently of the backend which feeds
into Imenu (perhaps tree-sitter?) and project.el.













Acknowledgement sent to João Távora <joaotavora@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#58431; 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: Tue, 18 Apr 2023 18:30:02 UTC

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