From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Sebastian Poeplau via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#69657: Missing imenu entries with eglot Date: Sun, 10 Mar 2024 17:15:49 +0100 Message-ID: <87jzmat5qe.fsf@mailbox.org> References: <87frx0ze5n.fsf@mailbox.org> <87a5n8s8jw.fsf@betli.tmit.bme.hu> <87bk7oz6vc.fsf@mailbox.org> <87v85v1io3.fsf@betli.tmit.bme.hu> Reply-To: Sebastian Poeplau Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1241"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 69657@debbugs.gnu.org, Felician Nemeth To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Mar 10 18:01:50 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rjMYW-000098-KA for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 10 Mar 2024 18:01:48 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rjMYE-0006HO-Uw; Sun, 10 Mar 2024 13:01:30 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rjMYD-0006H9-2S for bug-gnu-emacs@gnu.org; Sun, 10 Mar 2024 13:01:29 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rjMYC-00062Z-Pm for bug-gnu-emacs@gnu.org; Sun, 10 Mar 2024 13:01:28 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rjMYj-0007GP-OL for bug-gnu-emacs@gnu.org; Sun, 10 Mar 2024 13:02:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Sebastian Poeplau Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 10 Mar 2024 17:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69657 X-GNU-PR-Package: emacs Original-Received: via spool by 69657-submit@debbugs.gnu.org id=B69657.171009011427902 (code B ref 69657); Sun, 10 Mar 2024 17:02:01 +0000 Original-Received: (at 69657) by debbugs.gnu.org; 10 Mar 2024 17:01:54 +0000 Original-Received: from localhost ([127.0.0.1]:37785 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rjMYb-0007Fw-4B for submit@debbugs.gnu.org; Sun, 10 Mar 2024 13:01:53 -0400 Original-Received: from mout-p-201.mailbox.org ([80.241.56.171]:52372) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rjLzZ-000665-9x for 69657@debbugs.gnu.org; Sun, 10 Mar 2024 12:25:42 -0400 Original-Received: from smtp202.mailbox.org (smtp202.mailbox.org [IPv6:2001:67c:2050:b231:465::202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4Tt4xB002hz9smL; Sun, 10 Mar 2024 17:24:29 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1710087870; 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: in-reply-to:in-reply-to:references:references; bh=nYK+h01rvXGjwyXNGwAq/t/4rwfP6BkDfVZbGnhVsl0=; b=nM6ky1aqbzySMPkC18AeosT5Bg6t59h3mKYsb2IbtO9nKZcTnbg3qW6cfeu9k03RbvvCi/ eCQs3edzz+f9KOS2JvRny9+GocBihIdgiuSX/Vgw2xtH/RwggCd5Zjl2p8LTg48f969R1A CZHS2fOHRhGB0IaQ19+2xndE87ft2iLSwmbHpoD+/sLJPLXSkpI6ExO+VwTUafQ4e6+rrr F9LAZDMLMP0GYzNJ2S7iIsAlnDPlyG3vKjnXbtBghG3WzPGocq5O0MFY31kB0vv0JL/rwe d6E16AmDpUQHTtw6tNalI4saSsVoCQNV2qwia/xwIGYa0opvBEY1WMIpEI9bVg== In-reply-to: X-MBO-RS-META: cq3uq4fkub8oi74a6ij7e14x14r11eha X-MBO-RS-ID: 2de65faf15db06da3b4 X-Mailman-Approved-At: Sun, 10 Mar 2024 13:01:52 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:281409 Archived-At: > I understand Sebastian wants to see an extra top-evel ("Foo" . 1) there > or something, but that leads to two entries with duplicate names and imenu > just doesn't like that (if I apply the patch I just can't go to 'bar' with M > -x imenu), neither do some of its clients. What about naming the separate entry differently, e.g., "Foo (top)"? I'll certainly look into using the breadcrumb metadata instead, but that doesn't help users of plain imenu. > This is way Eglot emits "breadcrumb"-friendly cookies to overcome imenu's > limitations. Using breadcrumb i can jump to Foo and Foo > bar just > fine (using > `M-x breadcrumb-jump`). Thanks for the hint, I didn't know about `breadcrumb-jump'; I'd only used the headline feature before. > Anyway, if users don't like Eglot's imenu function, they can use something > else. Eglot's imenu is different from c++-ts-mode, and afaik c++-ts-mode's is > already different from c++-mode's. I wouldn't install this patch though, > teach other UIs about those optional cookies seems like a better deal that > doesn't break stuff. I wonder why I did get separate entries in consult-imenu with pylsp though. I'll have to give it another look, but it seems to me that in this case (e.g., with SymbolInformation objects) eglot's imenu function returns data that (a) works with plain imenu and (b) gives me what I expect with consult-imenu.