From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Newsgroups: gmane.emacs.bugs Subject: bug#69657: Missing imenu entries with eglot Date: Sun, 10 Mar 2024 01:05:34 +0000 Message-ID: References: <87frx0ze5n.fsf@mailbox.org> <87a5n8s8jw.fsf@betli.tmit.bme.hu> <87bk7oz6vc.fsf@mailbox.org> <87v85v1io3.fsf@betli.tmit.bme.hu> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8515"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 69657@debbugs.gnu.org, Sebastian Poeplau To: Felician Nemeth Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Mar 10 02:07:56 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 1rj7fO-0001zO-NY for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 10 Mar 2024 02:07:54 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rj7f0-0000xV-Fd; Sat, 09 Mar 2024 20:07:30 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rj7ez-0000xI-JM for bug-gnu-emacs@gnu.org; Sat, 09 Mar 2024 20:07:29 -0500 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 1rj7ez-0002KJ-Bc for bug-gnu-emacs@gnu.org; Sat, 09 Mar 2024 20:07:29 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rj7fW-00085k-9C for bug-gnu-emacs@gnu.org; Sat, 09 Mar 2024 20:08:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 10 Mar 2024 01:08:02 +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.171003284931007 (code B ref 69657); Sun, 10 Mar 2024 01:08:02 +0000 Original-Received: (at 69657) by debbugs.gnu.org; 10 Mar 2024 01:07:29 +0000 Original-Received: from localhost ([127.0.0.1]:35016 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rj7ey-000842-Jb for submit@debbugs.gnu.org; Sat, 09 Mar 2024 20:07:28 -0500 Original-Received: from mail-lf1-f50.google.com ([209.85.167.50]:54703) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rj7ev-00083n-Bh for 69657@debbugs.gnu.org; Sat, 09 Mar 2024 20:07:28 -0500 Original-Received: by mail-lf1-f50.google.com with SMTP id 2adb3069b0e04-5131c0691feso4407639e87.1 for <69657@debbugs.gnu.org>; Sat, 09 Mar 2024 17:06:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710032746; x=1710637546; darn=debbugs.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=l03ABOgB1iBmt17n2yy5yh/dpTsws/uS/09bkJ44sS4=; b=GTW8hkNI3XuV5GRvHvy14/qtQ5YnPbJkh8YJb5Jhvp7T5a46A4UHwc6yOrs4GtgAFT k2CcRVSJ6Ttpu36BT2LuBTtrsPY3owiMrPmTn1IdR40VtrmxRkLCNE4nVFuig0F4tNjh 0J0RsKuqy3pB6PPwmgp6tX62b72MR7RVqzJFRiE/3m2mDdlQ5uKzcCsfcgCkVDXVB/96 lKRCSk5YE65Ajynui2d9scg6RUOQcaSWSYRdzNgV/IszoSIIaq013iRILE+vL3hCKrUV BXQoiK9f2c9QzbmrAmosKsDIplzieDnWH40n9GKp4HxJ3ubKPL/cktpxZTAwSv5mQAiS h8Bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710032746; x=1710637546; h=content-transfer-encoding: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=l03ABOgB1iBmt17n2yy5yh/dpTsws/uS/09bkJ44sS4=; b=pRcWOIXdZrV02b4+gExDNdOav0RC5NyddgVZer0Ne+JbW/jdET2OLx11hB4kRvN8dC 2BiBesFELJQitVmtL9z695Tc4DGitQ2ttcQa0Vqv/6B92IBC1BwXfEUKAfKyJ2BIKe5S /O9nyl8aoLteCtsXSU6S53KzMEZdTMLD3prsNyTYgKtzgJdvOBrvG5dd07Sdw/K1Tb4h 0UJmPZO61uNozHjRRXbWEuvLjLREQz98IA0alvcLuM29RCgMpoHJbPTbSJNqhiYgld+9 afLKhoqCUsbX+wkJuBoqs6SRePhB8VEg6V/Azmxq3/SGsfCb3Bx/N7AUJJWs4Pjv9Rxj 5pYw== X-Forwarded-Encrypted: i=1; AJvYcCUSVYEboLx21J2zbpciggeRewDGE7LF9z/MRdzUBs3UGqpndgkS/7WzD4nHQN6raGy9mZpBAYMKNq6dTak1/dLQiZdEWKM= X-Gm-Message-State: AOJu0YzfwiFBXjIamHyWbuw+AiPRSP1hsnnozTWk2G4gzL9MgzLaHCrX sEUVSkGkCi4Ez5hbUXAEvgKKUeiCern+8QAglX1zL09Pr4C7OIgV6X9lNQH0ND/T2Nx7G3K016G pVwP3leWH7G7p604j+hS8X3bTtvo= X-Google-Smtp-Source: AGHT+IFAXqLuyEu2bjLxVAdiKFZAz481tx2glDPqPNGsy3T3jdYgleZuu4BaKpcG0kPGLuS/DsKu3hnre7hHB9gzsNo= X-Received: by 2002:a05:6512:2353:b0:512:fded:e674 with SMTP id p19-20020a056512235300b00512fdede674mr2185920lfu.61.1710032746085; Sat, 09 Mar 2024 17:05:46 -0800 (PST) In-Reply-To: <87v85v1io3.fsf@betli.tmit.bme.hu> 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:281363 Archived-At: On Sat, Mar 9, 2024 at 4:20=E2=80=AFPM Felician Nemeth wrote: > > CC-ing Jo=C3=A3o, the maintainer of breadcrumb-mode. I've made a file with class Foo { void bar() {} }; And the imenu--index-alist calculated by Eglot has what I think is the most sensible way to represent this within the ancient rigid limitations of that variable's format. ((#("Foo" 0 3 (breadcrumb-region (1 . 31) breadcrumb-kind "Class")) (#("bar" 0 3 (breadcrumb-region (15 . 28) breadcrumb-kind "Method")) . 15))) 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. 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`). These cookies are innocuous to anyone else. But I guess if someone took th= e time to consecrate them as imenu things instead of breadcrumb things. Then others UIs could use them. Or someone could invent something much better than imenu and have Eglot write to that idk. Imenu is pretty cursed, but i= t's what was already there so I picked it. 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.