From unknown Tue Jun 17 01:47:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#69683: 28.2; eglot overrides imenu without fallback even when unsupported by server Resent-From: Phil Hagelberg Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 09 Mar 2024 23:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 69683 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 69683@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.171002641120341 (code B ref -1); Sat, 09 Mar 2024 23:21:02 +0000 Received: (at submit) by debbugs.gnu.org; 9 Mar 2024 23:20:11 +0000 Received: from localhost ([127.0.0.1]:34966 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rj5z8-0005I0-1Q for submit@debbugs.gnu.org; Sat, 09 Mar 2024 18:20:11 -0500 Received: from lists.gnu.org ([209.51.188.17]:44988) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rj5z5-0005Hr-6L for submit@debbugs.gnu.org; Sat, 09 Mar 2024 18:20:09 -0500 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 1rj5yX-00073F-E2 for bug-gnu-emacs@gnu.org; Sat, 09 Mar 2024 18:19:33 -0500 Received: from hedgehog.birch.relay.mailchannels.net ([23.83.209.81]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rj5yU-0004C4-GH for bug-gnu-emacs@gnu.org; Sat, 09 Mar 2024 18:19:33 -0500 X-Sender-Id: dreamhost|x-authsender|phil@hagelb.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 5A70F5416A5 for ; Sat, 9 Mar 2024 23:19:27 +0000 (UTC) Received: from pdx1-sub0-mail-a233.dreamhost.com (unknown [127.0.0.6]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 02B1F542330 for ; Sat, 9 Mar 2024 23:19:27 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1710026367; a=rsa-sha256; cv=none; b=Z2wJpd5Jb0ufwPFKdlt7ri3XLWIJ28sxAcQFxdoVMlXtGeDKJg3TyKyhXvPmO6VOsvSRGl DZP/6hz8Jx1OSWitJMPtW0jadaycAEADqSlF7wY6ik/QbQFsH4XzaZSDp1tFEm55HBRAgo H8/QL7pAyU8fVdL8XKiyCcSSC0gOusfkwOKQE5yCpUVwmVhlDV6A923OMeJ7MaQj+YZbZl weHwmExDUbq+1jbci+2AUinOcZQxiyYJUDcRIkxAAPYQ285izzxF4CnbGZ4N2NVGsRkPkp CSLFc0ysG4+vCdT11AKnORR3thVIIYvTZuhUohMwyIWu27fJDOy/AWs8iLApKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1710026367; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: dkim-signature; bh=qpKPBTa072inz/SoMfSJ2EhCI54bid0s5wg9YaldRWA=; b=k5Ys87k42Gno3Vt4O+f5lZnGH/8Y7KUJewodHSl6Rm6dbNpDuXt8IMdi02rzZjRz9aGQDa jnOnyP/oJtWbbs2Ux6b5ygiXNcSEXeje6osZ5CuSsctQ4PNxl4PDl4QnCmJv9GnqRClC// /B8+XbuPOzPxdOjaScEL81Rg88HwNqhboVgYtaNNpPKtLL1pX3icLAxaC8m+aSVUft9yIh jrItfqH2+Klc1+fobf1S37GOwW5lYWX18tf0YiBk41ZSTSSrYKpuOTSWep8Tco2KE6h3mj yNoVfAIVLdKoCuPRC+19P/xJ9CYI7/o1stiYxs0dcBeeXbNejYGgQtuEbi98Fg== ARC-Authentication-Results: i=1; rspamd-5db57bc4b6-5bsvh; auth=pass smtp.auth=dreamhost smtp.mailfrom=phil@hagelb.org X-Sender-Id: dreamhost|x-authsender|phil@hagelb.org X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|phil@hagelb.org X-MailChannels-Auth-Id: dreamhost X-Bubble-Tangy: 0a872c74520c00fb_1710026367263_198634506 X-MC-Loop-Signature: 1710026367263:1372773671 X-MC-Ingress-Time: 1710026367262 Received: from pdx1-sub0-mail-a233.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.127.222.70 (trex/6.9.2); Sat, 09 Mar 2024 23:19:27 +0000 Received: from asthra (174-21-87-215.tukw.qwest.net [174.21.87.215]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: phil@hagelb.org) by pdx1-sub0-mail-a233.dreamhost.com (Postfix) with ESMTPSA id 4TsfBQ5XjYzFS for ; Sat, 9 Mar 2024 15:19:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hagelb.org; s=dreamhost; t=1710026366; bh=qpKPBTa072inz/SoMfSJ2EhCI54bid0s5wg9YaldRWA=; h=From:To:Subject:Date:Content-Type; b=d9yWuj6ai4CFLs6CyQWOR4w+dZdiDj4kSz6cDi2b4ass4vh03iPC7OParGEhKPmgo WSbZKs01lRE8/GF+AWN3ChqBY2G5cvhk0tqBZh0e89IWyzosJ8ezY4xUu8UaH/Rkv2 LQ2aXU76rnsosjG+eiJJpcHEoR4XAeAFHlurbhLgfthnXEOqn6+EZ0qzC7kChfkZvT m2rD/Yn1BDD+AybI7zYa8J6kBOsMSFroqOfeRQ2amF8HdNcWbDi1WlFkTTgbax4cJY DcZDqEDC62BmBts8Hzlo+eUjxPt0e9rdzX6ogset+sx2EaZLC/zNdBc3F9G3ojLLyb 5Z0cXrzECLcHA== From: Phil Hagelberg Date: Sat, 09 Mar 2024 23:19:25 +0000 Message-ID: <87edcjt2ma.fsf@hagelb.org> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=23.83.209.81; envelope-from=phil@hagelb.org; helo=hedgehog.birch.relay.mailchannels.net 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) When invoking M-x imenu in a buffer with eglot enabled, it uses eglot's LSP-aware implementation of imenu. However, not all LSP servers handle that functionality. When connected to a server that does not offer this functionality, eglot signals an error: jsonrpc-error: "request id=11 failed:", (jsonrpc-error-code . -32601), (jsonrpc-error-message . "\"textDocument/documentSymbol\" is not in the request-handlers table"), (jsonrpc-error-data) However, usually there is a perfectly good functional imenu implementation that the user wants to invoke; they just can't do it because eglot took over the imenu command. Ideally eglot should only add its functionality to the imenu command when it's connected to a server that actually supports the endpoint needed to handle it. You can reproduce this problem with fennel-mode and fennel-ls. * Install fennel-mode: https://git.sr.ht/~technomancy/fennel-mode Cloning and running M-x eval-buffer on fennel-mode.el is sufficient. * Install fennel-ls: https://git.sr.ht/~xerool/fennel-ls Clone and run `make install PREFIX=$WHATEVER', then evaluate this: (with-eval-after-load 'eglot (add-to-list 'eglot-server-programs '(fennel-mode . ("fennel-ls")))) * Open a new file, say /tmp/scratch.fnl and insert: (fn abc []) * Run M-x imenu, and see the error. * Run M-x eglot-shutdown. * Run M-x imenu, and it succeeds. I'm sure you could reproduce the same problem in another language where the Emacs mode supports imenu but the language server doesn't. But I don't know what other language fits that criteria. In GNU Emacs 28.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.37, cairo version 1.16.0) of 2023-05-14, modified by Debian built on x86-ubc-01 Windowing system distributor 'The X.Org Foundation', version 11.0.12101007 System Description: Debian GNU/Linux 12 (bookworm) Configured using: 'configure --build x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib --libexecdir=/usr/libexec --localstatedir=/var/lib --infodir=/usr/share/info --mandir=/usr/share/man --with-libsystemd --with-pop=yes --enable-locallisppath=/etc/emacs:/usr/local/share/emacs/28.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/28.2/site-lisp:/usr/share/emacs/site-lisp --with-sound=alsa --without-gconf --with-mailutils --with-native-compilation --build x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib --libexecdir=/usr/libexec --localstatedir=/var/lib --infodir=/usr/share/info --mandir=/usr/share/man --with-libsystemd --with-pop=yes --enable-locallisppath=/etc/emacs:/usr/local/share/emacs/28.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/28.2/site-lisp:/usr/share/emacs/site-lisp --with-sound=alsa --without-gconf --with-mailutils --with-native-compilation --with-cairo --with-x=yes --with-x-toolkit=gtk3 --with-toolkit-scroll-bars 'CFLAGS=-g -O2 -ffile-prefix-map=/build/emacs-mPr7Vr/emacs-28.2+1=. -fstack-protector-strong -Wformat -Werror=format-security -Wall' 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2' LDFLAGS=-Wl,-z,relro' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM GTK3 ZLIB Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Fennel Minor modes in effect: recentf-mode: t eglot--managed-mode: t flymake-mode: t paredit-mode: t whitespace-mode: t idle-highlight-mode: t hl-line-mode: t company-mode: t shell-dirtrack-mode: t winner-mode: t display-battery-mode: t display-time-mode: t save-place-mode: t tooltip-mode: t global-eldoc-mode: t eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t prettify-symbols-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: /usr/share/emacs/site-lisp/elpa/caml-4.6/caml-mode-site-file hides /usr/share/emacs/site-lisp/elpa-src/caml-4.6/caml-mode-site-file /usr/share/emacs/site-lisp/elpa/caml-4.6/caml-autoloads hides /usr/share/emacs/site-lisp/elpa-src/caml-4.6/caml-autoloads /usr/share/emacs/site-lisp/elpa/caml-4.6/inf-caml hides /usr/share/emacs/site-lisp/elpa-src/caml-4.6/inf-caml /usr/share/emacs/site-lisp/elpa/caml-4.6/caml-hilit hides /usr/share/emacs/site-lisp/elpa-src/caml-4.6/caml-hilit /usr/share/emacs/site-lisp/elpa/caml-4.6/caml-types hides /usr/share/emacs/site-lisp/elpa-src/caml-4.6/caml-types /usr/share/emacs/site-lisp/elpa/caml-4.6/caml-compat hides /usr/share/emacs/site-lisp/elpa-src/caml-4.6/caml-compat /usr/share/emacs/site-lisp/elpa/caml-4.6/caml-pkg hides /usr/share/emacs/site-lisp/elpa-src/caml-4.6/caml-pkg /usr/share/emacs/site-lisp/elpa/caml-4.6/caml hides /usr/share/emacs/site-lisp/elpa-src/caml-4.6/caml /usr/share/emacs/site-lisp/elpa/caml-4.6/caml-emacs hides /usr/share/emacs/site-lisp/elpa-src/caml-4.6/caml-emacs /usr/share/emacs/site-lisp/elpa/caml-4.6/caml-font-old hides /usr/share/emacs/site-lisp/elpa-src/caml-4.6/caml-font-old /usr/share/emacs/site-lisp/elpa/caml-4.6/caml-font hides /usr/share/emacs/site-lisp/elpa-src/caml-4.6/caml-font /usr/share/emacs/site-lisp/elpa/caml-4.6/caml-help hides /usr/share/emacs/site-lisp/elpa-src/caml-4.6/caml-help /usr/share/emacs/site-lisp/elpa/caml-4.6/caml-xemacs hides /usr/share/emacs/site-lisp/elpa-src/caml-4.6/caml-xemacs /usr/share/emacs/site-lisp/elpa/caml-4.6/camldebug hides /usr/share/emacs/site-lisp/elpa-src/caml-4.6/camldebug /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-folders hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-folders /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-mark hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-mark /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-contrib hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-contrib /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-context hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-context /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-speedbar hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-speedbar /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-contacts hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-contacts /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-actions hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-actions /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-search hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-search /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-lists hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-lists /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-message hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-message /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-headers hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-headers /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-helpers hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-helpers /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-view hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-view /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-compose hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-compose /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-bookmarks hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-bookmarks /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-draft hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-draft /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-update hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-update /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-config hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-config /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-main hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-main /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-vars hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-vars /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-org hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-org /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-server hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-server /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-pkg hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-pkg /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-autoloads hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-autoloads /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-icalendar hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-icalendar /usr/share/emacs/site-lisp/elpa/tuareg-2.2.0/tuareg-pkg hides /usr/share/emacs/site-lisp/elpa-src/tuareg-2.2.0/tuareg-pkg /usr/share/emacs/site-lisp/elpa/tuareg-2.2.0/tuareg-opam hides /usr/share/emacs/site-lisp/elpa-src/tuareg-2.2.0/tuareg-opam /usr/share/emacs/site-lisp/elpa/tuareg-2.2.0/tuareg-jbuild hides /usr/share/emacs/site-lisp/elpa-src/tuareg-2.2.0/tuareg-jbuild /usr/share/emacs/site-lisp/elpa/tuareg-2.2.0/tuareg hides /usr/share/emacs/site-lisp/elpa-src/tuareg-2.2.0/tuareg /usr/share/emacs/site-lisp/elpa/tuareg-2.2.0/tuareg-menhir hides /usr/share/emacs/site-lisp/elpa-src/tuareg-2.2.0/tuareg-menhir /usr/share/emacs/site-lisp/elpa/tuareg-2.2.0/ocamldebug hides /usr/share/emacs/site-lisp/elpa-src/tuareg-2.2.0/ocamldebug /usr/share/emacs/site-lisp/elpa/tuareg-2.2.0/dot-emacs hides /usr/share/emacs/site-lisp/elpa-src/tuareg-2.2.0/dot-emacs /usr/share/emacs/site-lisp/elpa/tuareg-2.2.0/tuareg-autoloads hides /usr/share/emacs/site-lisp/elpa-src/tuareg-2.2.0/tuareg-autoloads /usr/share/emacs/site-lisp/elpa/tuareg-2.2.0/tuareg-site-file hides /usr/share/emacs/site-lisp/elpa-src/tuareg-2.2.0/tuareg-site-file /usr/share/emacs/site-lisp/utop hides /usr/share/emacs/site-lisp/elpa-src/utop-1.11/utop ~/.emacs.d//phil/../custom hides /usr/share/emacs/28.2/lisp/custom Features: (shadow sort mail-extr emacsbug sendmail wdired goto-addr vc-dir vc-filewise expand loadhist em-tramp em-rebind em-smart woman thai-util thai-word vc-annotate utop utop-minor-mode tuareg caml caml-help caml-types caml-emacs novice epa-file apropos mode-local perl-mode scheme rcirc info ibuf-ext pulse etags fileloop completion org-element avl-tree generator ol-eww ol-rmail ol-mhe ol-irc ol-info ol-gnus nnselect gnus-search gnus-art mm-uu mml2015 mm-view mml-smime smime dig gnus-sum gnus-group gnus-undo gnus-start gnus-dbus gnus-cloud checkdoc bug-reference scpaste htmlize nroff-mode tar-mode dired-aux tmm log-view hippie-exp mhtml-mode css-mode eww xdg url-queue shr kinsoku svg mm-url sgml-mode facemenu dom url-file url-dired eieio-opt speedbar ezimage dframe shortdoc nnimap nnmail mail-source utf7 netrc nnoo gnus-spec gnus-int gnus-range gnus-win gnus nnheader ol-docview doc-view jka-compr ol-bibtex ol-bbdb ol-w3m ol-doi org-link-doi org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-footnote org-src ob-comint org-pcomplete org-list org-faces org-entities org-version ob-emacs-lisp ob-core ob-eval org-table oc-basic bibtex ol org-keys oc org-compat org-macs org-loaddefs cal-menu calendar cal-loaddefs mm-archive gnutls url-cache url-dav parse-time iso8601 url-http url-auth url-gw help-fns radix-tree arc-mode archive-mode js cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs network-stream nsm image-mode exif cl-print ielm sh-script smie executable conf-mode tabify man files-x grep pcmpl-gnu view monroe clojure-mode lisp-mnt align smerge-mode diff misearch multi-isearch yaml-mode magit-bisect magit-key-mode magit log-edit message rmc puny dired dired-loaddefs rfc822 mml mml-sec epa epg rfc6068 epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils mailheader pcvs-util add-log mule-util ibuffer ibuffer-loaddefs make-mode hi-lock flyspell ispell markdown-mode color noutline outline recentf tree-widget face-remap antifennel lua-mode time-date vc-mtn vc-hg vc-git diff-mode vc-bzr vc-src vc-sccs vc-svn vc-cvs vc-rcs vc vc-dispatcher eglot derived easy-mmode array filenotify jsonrpc ert ewoc debug backtrace find-func flymake-proc flymake compile text-property-search imenu fennel-mode xref project inf-lisp pcmpl-unix paredit whitespace idle-highlight-mode thingatpt hl-line company-dabbrev-code company-dabbrev company-files company-capf cus-start smex company pcase em-unix em-term term disp-table shell ehelp em-script em-prompt em-ls em-hist em-pred em-glob em-cmpl em-dirs esh-var pcomplete comint ansi-color em-basic em-banner em-alias esh-mode eshell esh-cmd esh-ext esh-opt esh-proc esh-io esh-arg esh-module esh-groups esh-util winner ring exwm-randr xcb-randr format-spec battery dbus ido-completing-read+ cus-edit pp cus-load wid-edit minibuf-eldef xml time exwm-systemtray xcb-systemtray xcb-xembed exwm-config exwm exwm-input xcb-keysyms xcb-xkb exwm-manage exwm-floating xcb-cursor xcb-render exwm-layout exwm-workspace exwm-core xcb-ewmh xcb-icccm xcb xcb-xproto xcb-types xcb-debug server advice my-autoload comp comp-cstr warnings rx cl-extra help-mode edmacro kmacro saveplace ido package browse-url url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json subr-x map url-vars seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit x multi-tty make-network-process native-compile emacs) Memory information: ((conses 16 2259837 441168) (symbols 48 65692 26) (strings 32 294146 27789) (string-bytes 1 11657421) (vectors 16 137620) (vector-slots 8 3750584 290488) (floats 8 1069 2257) (intervals 56 269565 5487) (buffers 992 410)) From unknown Tue Jun 17 01:47:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#69683: 28.2; eglot overrides imenu without fallback even when unsupported by server Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 10 Mar 2024 05:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69683 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Phil Hagelberg , =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Cc: 69683@debbugs.gnu.org Received: via spool by 69683-submit@debbugs.gnu.org id=B69683.171005020316301 (code B ref 69683); Sun, 10 Mar 2024 05:57:02 +0000 Received: (at 69683) by debbugs.gnu.org; 10 Mar 2024 05:56:43 +0000 Received: from localhost ([127.0.0.1]:35251 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rjCAt-0004Er-89 for submit@debbugs.gnu.org; Sun, 10 Mar 2024 00:56:43 -0500 Received: from eggs.gnu.org ([209.51.188.92]:37270) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rjCAo-0004EV-At for 69683@debbugs.gnu.org; Sun, 10 Mar 2024 00:56:41 -0500 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 ) id 1rjC84-0000Aw-Sw; Sun, 10 Mar 2024 00:53:49 -0500 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=rFk64OxUjPld5tjAahQKC6UveC9q0soByD+7827pNjk=; b=Im3dtB/PNtCjZzLtB2zg babFRmNN5ILo/B3oMm/MJW284TeP0gDOQSa5xW62zoyusl+AgAcw2p0jzantycy96u0g5Fiw4yzRS bN3koHPayKOUz9Wxo6qa1LXYKdjEHGuukuthd/KNZPbOM5q0BHCGGZllNxDrs3RiBEZG+hYd+eqgD XU8cQxdWI8le3Ur8Dv+tOpw4f2gFS516UEmxD4cC+PmZyLuI4lWj2xFbLZ3dOiEGJRsSjo3okAj5E S5mA8clD/fYIszB0y7LaHKmxiwbAFHQ/6fPeJ1QR4dNDZilKiXjMbpn1pOVUBS9pd8Z1k33uItGIj yansG+ujvToLuA==; Date: Sun, 10 Mar 2024 07:53:43 +0200 Message-Id: <86sf0yws2g.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <87edcjt2ma.fsf@hagelb.org> (message from Phil Hagelberg on Sat, 09 Mar 2024 23:19:25 +0000) References: <87edcjt2ma.fsf@hagelb.org> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Phil Hagelberg > Date: Sat, 09 Mar 2024 23:19:25 +0000 > > When invoking M-x imenu in a buffer with eglot enabled, it uses eglot's > LSP-aware implementation of imenu. However, not all LSP servers handle > that functionality. When connected to a server that does not offer this > functionality, eglot signals an error: > > jsonrpc-error: "request id=11 failed:", (jsonrpc-error-code . -32601), (jsonrpc-error-message . "\"textDocument/documentSymbol\" is not in the request-handlers table"), (jsonrpc-error-data) > > However, usually there is a perfectly good functional imenu > implementation that the user wants to invoke; they just can't do it > because eglot took over the imenu command. > > Ideally eglot should only add its functionality to the imenu command > when it's connected to a server that actually supports the endpoint > needed to handle it. Thanks. Would you like to suggest a patch along these lines? An alternative would be to catch this error and fall back on the imenu implementation. Not being an LSP expert, I'm unsure which approach is better/cleaner. From unknown Tue Jun 17 01:47:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#69683: 28.2; eglot overrides imenu without fallback even when unsupported by server Resent-From: Felician Nemeth Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 10 Mar 2024 09:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69683 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Phil Hagelberg Cc: 69683@debbugs.gnu.org Received: via spool by 69683-submit@debbugs.gnu.org id=B69683.17100640708486 (code B ref 69683); Sun, 10 Mar 2024 09:48:01 +0000 Received: (at 69683) by debbugs.gnu.org; 10 Mar 2024 09:47:50 +0000 Received: from localhost ([127.0.0.1]:35648 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rjFmX-0002Cn-Nj for submit@debbugs.gnu.org; Sun, 10 Mar 2024 05:47:49 -0400 Received: from mail-ej1-f52.google.com ([209.85.218.52]:43399) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rjFmT-0002CV-8o for 69683@debbugs.gnu.org; Sun, 10 Mar 2024 05:47:47 -0400 Received: by mail-ej1-f52.google.com with SMTP id a640c23a62f3a-a3ed9cae56fso800304666b.1 for <69683@debbugs.gnu.org>; Sun, 10 Mar 2024 01:47:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710063965; x=1710668765; darn=debbugs.gnu.org; h=mime-version:face:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=yAYwy/fkV+1xcK5u8m74nWaHWeK6HjHQkwCQxfZD4hg=; b=MgOfLSCTvKL2TrETHo6hZkGT66/pBwQaYD32ObKBMMANqjr3l8SZqNu2jwS/0tY/TV tK2YoZg3g73brLowDsyr1maNhX4WBIGO9ALqd5JV+QYyHAIKZmfebotZGPTLJvl9QxsF NMpxl85tokGlaaCT9bNk0PDo75yCIpy5Mm0zeYPY8pPAwlv8wvthRY76RqqpmLSF60J2 A8DAe7zkq3Avq8DRu/k4jwtMib60tHH/veP/Dz77Lu4KtsLM60d2tOj3JT6gL/JAVU5/ kdjdxhdCtUBzTmglZOZUzzTlMPEUHnwaBLQVVr0UThF1sHu7YCvlYAGilHBs1O5QcsWW Fc/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710063965; x=1710668765; h=mime-version:face:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=yAYwy/fkV+1xcK5u8m74nWaHWeK6HjHQkwCQxfZD4hg=; b=uUUvSKkp4aCQCgrWaP83/J8y20RA7YzyYOqU7sh6VYzAJPSrz5ETCeA5xsWYfu8Z5H FXQf5ff5R81UrwONkgxAHwTe40Qd0HuyqxG5G3QM4WnllFa2WCTe4S0E2jRSrH0QPQus N05JqPN6U2MaLgUpr04+H2tf+a0ZwQWNoeqwieVfEd07D/numzvFhZQTA4d6Mhs8EA1p iHaKuXG7lTpKtyUahwlK7eAjgsAo55HgpJ6dgBvngsmQvdyHb5/jc5fE9Er/IpuEDtQH Os7C0UwUC9gthd5WDlWcPlgaEwxonAHVTvpMJONOHu8oXyKl4zmG3dyq8MkDgSHbDTPK EjQw== X-Gm-Message-State: AOJu0Yz5td9Tc/mp5bQrGXvrBQFh+Y5uM3vUY71gVmDzurWhBqMREw2c 3ePSfOUzmEPRFEvCyOJlcYzrXAL4+n53BP+KT8TnAFf7TwhQAQVuJZdKZhnV X-Google-Smtp-Source: AGHT+IFw4z2Heii97jiwjvn0+8jJA/TO4amRSKWPi+NTt8DFdGhNa4fsa6ogGF1Jz3hKPbPNBR+PgQ== X-Received: by 2002:a17:907:ab5:b0:a44:b96:2809 with SMTP id bz21-20020a1709070ab500b00a440b962809mr2723178ejc.24.1710063965220; Sun, 10 Mar 2024 01:46:05 -0800 (PST) Received: from betli.gmail.com (catv-213-222-160-137.catv.fixed.vodafone.hu. [213.222.160.137]) by smtp.gmail.com with ESMTPSA id d25-20020a170906371900b00a4410598eebsm1755297ejc.67.2024.03.10.01.46.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Mar 2024 01:46:04 -0800 (PST) From: Felician Nemeth References: <87edcjt2ma.fsf@hagelb.org> Date: Sun, 10 Mar 2024 10:46:04 +0100 In-Reply-To: <87edcjt2ma.fsf@hagelb.org> (Phil Hagelberg's message of "Sat, 09 Mar 2024 23:19:25 +0000") Message-ID: <87v85uzag3.fsf@betli.tmit.bme.hu> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAFVBMVEU2EgDVmFNHKAa4dz4q AwCDUSH2zWrE61tmAAACeklEQVQ4jU2UwY7jIAyGEZN5ABSFc9Ytcx6K6DmqmHsD8tyZKrz/I+xv yI6WKlHlj982tomiVckiWrUrgRU5jlqMpJKCkch5W419DQAiQGHDxdrWmm0/2kXCApiUmrZLq20s cjexq3VL25QuxjY7wOcJVEpb+jLeGLAK+OMyaa1hx9rFbkwHFWBVA2y8w1wHaLE7GuDdw5cEuOM5 SLIdrpwBkN0ezwI7nYoiilqthbcYc89KgC5+NnaOHGbZz0T6BCEgOLJ0vmYXuNdPAIXgDZJhF2Yu fjnPNwAsoUTUN/P8q3AAyz4zB/xmifEfiIbvS4jh7b7QqZiSm4MJC5kXNpCRaOsoyQXAMN2XCJfs j94NKfo7ACKUEgKE3y+Sg4jibUZ1A0jgYpxtvYMC3gHaHPq6x32ACeALIZoZxB+l9VrRNIA1ncRg wwC8pvQIvYO+a2yt3VXMVyli6L0VV6aOrJa4CpilVQA+eHt0xavk61akih5BUMay/0BAqu783C5h FifY/3QsAIoWYk6PgpwAzLI652+96e2IfN2cF+BD1uT23F21Ghh5OUl4RlO15oh5A2iv+Zk2wsjZ 2DtB5Sm3A4P0+kyb2vs4iEW7G9ohoN3Stl2kVat6MCkXldo6OKaE8P6GhmrKKxWZXQH1iklhhn+d iVeNf6mDdkV0ltFwApRbp+kXSGBFHGV2aPqnIIyQyzhD5n47khqKI08bIapcas4O+hPkct20NAEv ALRuZFUp3PrnQSAm+4lTdHCsYYZ/nGqQrM5z3NS3zefFxkfFPRFbsjpIfbTlvF3ibpVZQ9nzqv60 F/KXSRLJ1AGappJulZll70N/qz6EfwEOCdYOuTHAzAAAAABJRU5ErkJggg== MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Phil Hagelberg writes: > When invoking M-x imenu in a buffer with eglot enabled, it uses eglot's > LSP-aware implementation of imenu. However, not all LSP servers handle > that functionality. When connected to a server that does not offer this > functionality, eglot signals an error: > > jsonrpc-error: "request id=11 failed:", (jsonrpc-error-code . -32601), (jsonrpc-error-message . "\"textDocument/documentSymbol\" is not in the request-handlers table"), (jsonrpc-error-data) > I'm surprised to see this error message since eglot-imenu starts with this: (cl-defun eglot-imenu () (unless (eglot-server-capable :documentSymbolProvider) (cl-return-from eglot-imenu)) That is if the LSP server does not have the necessary capability it doesn't send any jsonrpc messages to the server that would lead to the error above. (And it falls back to normal imenu.) Can you run edebug on eglot-imenu to see what I misunderstand? From unknown Tue Jun 17 01:47:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#69683: 28.2; eglot overrides imenu without fallback even when unsupported by server 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 11:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69683 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 69683@debbugs.gnu.org, Phil Hagelberg Received: via spool by 69683-submit@debbugs.gnu.org id=B69683.171006865627766 (code B ref 69683); Sun, 10 Mar 2024 11:05:02 +0000 Received: (at 69683) by debbugs.gnu.org; 10 Mar 2024 11:04:16 +0000 Received: from localhost ([127.0.0.1]:35710 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rjGyW-0007Dm-EM for submit@debbugs.gnu.org; Sun, 10 Mar 2024 07:04:16 -0400 Received: from mail-lf1-f50.google.com ([209.85.167.50]:54284) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rjGyU-0007B6-Pt for 69683@debbugs.gnu.org; Sun, 10 Mar 2024 07:04:15 -0400 Received: by mail-lf1-f50.google.com with SMTP id 2adb3069b0e04-513a81b717cso99272e87.0 for <69683@debbugs.gnu.org>; Sun, 10 Mar 2024 04:03:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710068556; x=1710673356; 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=sJWkiDDPmS5GF9kgU6AcSZq5tOWy80XBGdMk2CcxBLA=; b=BmDGmekN+85VD0cRe6ip2zrodnziCFjdSW9oLHU/CjM9VoJj42WcOntOgvRIBHorZn Ith/krj7pYgYP12TE5GJ06l82Of1gxQK3dmLXFB5+Ql8SWHJxTZbvbxR7gC7z8gqD4w+ WMKzZrlE0ghEZNFODPPJoIYdjukAGTCW7xIW69mGOTHV6zV5ZgI5p+FQHe2r98KDSi0T XKXjm/EBai4czhp6IdKPr860G4scUK4s3skyRz7Pj+doL9Y3+oNisk6f3Jr1EMgeHYB1 rDXCO0VYiRvnDasElcLFINVYC4hwqwKaVNEYM60KWtr52RdTAMzU9cARCvqR8Hbbxm7o /Ahg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710068556; x=1710673356; 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=sJWkiDDPmS5GF9kgU6AcSZq5tOWy80XBGdMk2CcxBLA=; b=BUhPveRk3DUDs6YDz/xqXhwa5tiZ/0o9iavnmimUvmisrzIr9xWAO3lxzctltjjGj9 8h1CPckLFa8eyTRuwVD3Bq1+9+GCL9uLKMZRvmnZJe7ktJu3z4jghwFyJm3P7s5cpASH 03StiHxSb0714VjKh1qOk3seWn9lGq3wx1h5QAD2oBdp1XF8qePK9NDkWkmXkromLdhe r5H6I8/JdQZ+XAeODprZBT5JkegN0l8T9IT1IgAYVECEBRt5f+SqYshZisiA2qLMc2+t DovAKOlTKce5CvNTGqrXGeUreYo4XLD9fP2r/7kOQYV7L3HBRlLcPY/ZaljXdqGJ90lB mlVA== X-Forwarded-Encrypted: i=1; AJvYcCXDC/Fb98/AZmlhFIXlMvUnptb8mIHyK/jcNY1SBxJg34fbk/w0CcoEaejpjxG67Fr7N46ZuSZtk2bZYsrpZFERO5C5p7s= X-Gm-Message-State: AOJu0YxZpw/XGKf1I0Y6wihtdRf7nyslOcKC2RhXXIvbHxsX89Jj6Lfo 5Hv40XXEB7wS5J7r1yg0cGSzdcJ9Jl3n+/EtPZD+pDCawpRxJQjMYbhKe1CU6IJoenO9LPeyn7q xkVwPJl2URLJPgIehdyVPV0uPZ3c= X-Google-Smtp-Source: AGHT+IHxBnklA+4mLtSid6hZ1jTbztvoX3BCPnxYupv6XMAsFhvjEZVUm8Ce06mxDq1rdROzNIvI7xnPvvSYdWvuvls= X-Received: by 2002:ac2:4ac3:0:b0:513:9f5f:d27b with SMTP id m3-20020ac24ac3000000b005139f5fd27bmr2075926lfp.46.1710068555505; Sun, 10 Mar 2024 04:02:35 -0700 (PDT) MIME-Version: 1.0 References: <87edcjt2ma.fsf@hagelb.org> <86sf0yws2g.fsf@gnu.org> In-Reply-To: <86sf0yws2g.fsf@gnu.org> From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Date: Sun, 10 Mar 2024 11:02:49 +0000 Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Sun, Mar 10, 2024 at 5:53=E2=80=AFAM Eli Zaretskii wrote: > > > From: Phil Hagelberg > > Date: Sat, 09 Mar 2024 23:19:25 +0000 > > > > When invoking M-x imenu in a buffer with eglot enabled, it uses eglot's > > LSP-aware implementation of imenu. However, not all LSP servers handle > > that functionality. When connected to a server that does not offer this > > functionality, eglot signals an error: > > > > jsonrpc-error: "request id=3D11 failed:", (jsonrpc-error-code . -3260= 1), (jsonrpc-error-message . "\"textDocument/documentSymbol\" is not in the= request-handlers table"), (jsonrpc-error-data) > > > > However, usually there is a perfectly good functional imenu > > implementation that the user wants to invoke; they just can't do it > > because eglot took over the imenu command. > > > > Ideally eglot should only add its functionality to the imenu command > > when it's connected to a server that actually supports the endpoint > > needed to handle it. > > Thanks. Would you like to suggest a patch along these lines? You should both see bug#64274 before doing that. Possibly just a server bug. Jo=C3=A3o From unknown Tue Jun 17 01:47:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#69683: 28.2; eglot overrides imenu without fallback even when unsupported by server Resent-From: Phil Hagelberg Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 10 Mar 2024 19:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69683 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Felician Nemeth Cc: 69683@debbugs.gnu.org Received: via spool by 69683-submit@debbugs.gnu.org id=B69683.17100990159923 (code B ref 69683); Sun, 10 Mar 2024 19:31:02 +0000 Received: (at 69683) by debbugs.gnu.org; 10 Mar 2024 19:30:15 +0000 Received: from localhost ([127.0.0.1]:37918 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rjOsA-0002Zy-UK for submit@debbugs.gnu.org; Sun, 10 Mar 2024 15:30:15 -0400 Received: from bee.birch.relay.mailchannels.net ([23.83.209.14]:56874) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rjOs8-0002Zp-JP for 69683@debbugs.gnu.org; Sun, 10 Mar 2024 15:30:13 -0400 X-Sender-Id: dreamhost|x-authsender|phil@hagelb.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id F3D9E81ADF; Sun, 10 Mar 2024 19:29:37 +0000 (UTC) Received: from pdx1-sub0-mail-a207.dreamhost.com (unknown [127.0.0.6]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 9514B81B00; Sun, 10 Mar 2024 19:29:37 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1710098977; a=rsa-sha256; cv=none; b=T3Z2UL5HpmcbpRmP8vnOQHvlTaXYUTAg6ZwnlV25pqIko78l3AyCVL4XltN3LvUE4wRf8m mPARvuP/qyzBZuS86C0yETiLGnlIMsE2X+EO7LfTPPiOjfjUCY6bpqJ//qW3ik2h8mjUXw +McgPUUgrWVgh5yITLp8uGy4bo+N9OfM9bVLnhAbPvhYTyS+dtOh6RXYBN2qVSPdrg2j2e cpINkdYyr4u0Kr/0Pc6Vvx4/LyDDCaiRal3wnq3rGCRTl3cUrjxPD0Hv0+iIBRiyoD4PEM atUkYOy55q1equKEmNFiCQiHvipU4O+4mVFEXV5oXws9Zd7uODTSBb7jny7Uiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1710098977; 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:dkim-signature; bh=02KH3lmfhmqut7RxgXpk0S2146HFfxOXgUZZ6fDuImE=; b=5K6zOdM1C5WKSPPETqSLVDd/OH/FB0avKuoZdnAusgrr/hZ4Pn13coXb+4rapPqnA/xRJs A3F2LPhgnBPLuCDCCRUUpnS1X+HxiR9I1YVFOjomvgyEn7zgVHsw27D1gTvLqPnVHql5zU tidt3OtMSWoUaTYT3ZJU0r0qjLaoaKcDGMorQ7YiCo+3SPuqa41sqsLWbTUdlcJOd7TiLN kDDitPPUXcO8Pvfu4afi8kAAZrx7fC5UR1sKXG4r8KVN1X3OMQPHJiN2995aLP4kOj6Uxa QwVJnAnXOpQ5OsA8kW6OLi3WaJvsY9QzRAZvtzeU+GdvWOod1RYo6eQyB8ikqw== ARC-Authentication-Results: i=1; rspamd-67fb46fddd-hwslz; auth=pass smtp.auth=dreamhost smtp.mailfrom=phil@hagelb.org X-Sender-Id: dreamhost|x-authsender|phil@hagelb.org X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|phil@hagelb.org X-MailChannels-Auth-Id: dreamhost X-Desert-Versed: 4948059b6bf70814_1710098977897_3764828630 X-MC-Loop-Signature: 1710098977896:3831814539 X-MC-Ingress-Time: 1710098977896 Received: from pdx1-sub0-mail-a207.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.111.192.141 (trex/6.9.2); Sun, 10 Mar 2024 19:29:37 +0000 Received: from asthra (174-21-145-26.tukw.qwest.net [174.21.145.26]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: phil@hagelb.org) by pdx1-sub0-mail-a207.dreamhost.com (Postfix) with ESMTPSA id 4Tt92n2BXnzJ9; Sun, 10 Mar 2024 12:29:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hagelb.org; s=dreamhost; t=1710098977; bh=02KH3lmfhmqut7RxgXpk0S2146HFfxOXgUZZ6fDuImE=; h=From:To:Cc:Subject:Date:Content-Type; b=blQ5QAicBPwfByvdUrLWfBxRNZn9Y4X1+V5WI/WSwlMIjk3qvnPPI/94/H6Bpdf1Z rpnfGokLAUn53xamvZ5Wz+bflzc/wIdj3mjaDyOkAUxOPInrTumd/bgrTdXHtQLUVB b29vmASWeUE+JQEEggRVN4iaX0xRZfMAPaVXCE6GURwNUY7gEd0IlsIpkUenoRXSkf 5tZUY5hI9JK0zARuXo3ZiS5m/GvozzHtfBS2VXZtEcVTytKVcoFd6TtxwgrCRIcztW Z8CKHOIkuAIjgEQAVMDAUepiGWgrT++1Vq3uqa1Hjpoic24FtwEMEYzRA2U64MZcjv CkTIZ3Rvez2Yg== References: <87edcjt2ma.fsf@hagelb.org> <87v85uzag3.fsf@betli.tmit.bme.hu> User-agent: mu4e 1.8.13; emacs 28.2 From: Phil Hagelberg Date: Sun, 10 Mar 2024 12:27:26 -0700 In-reply-to: <87v85uzag3.fsf@betli.tmit.bme.hu> Message-ID: <87bk7levhb.fsf@hagelb.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Felician Nemeth writes: > I'm surprised to see this error message since eglot-imenu starts with > this: > > (cl-defun eglot-imenu () > (unless (eglot-server-capable :documentSymbolProvider) > (cl-return-from eglot-imenu)) > > That is if the LSP server does not have the necessary capability it > doesn't send any jsonrpc messages to the server that would lead to the > error above. (And it falls back to normal imenu.) Apologies--I pulled down the latest emacs from git to test this with, but I forgot to test with -Q, and so I accidentally loaded an older version of eglot.el that I had on my load-path. You're correct, and this bug has actually already been fixed. My bad! This bug report can be closed as invalid. -Phil --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJEBAEBCgAuFiEEnRPZQmoIFLM3PPXj2KgkNXenhZ8FAmXuCiAQHHBoaWxAaGFn ZWxiLm9yZwAKCRDYqCQ1d6eFn9QBD/kB9vHK6ADUtD+Xgq62b09nJhjF0eTTtOER NYC75Q38rjtnhSIU+cxsVTL/kiltSF3lYOz+yw+jm++YWQma0CVbQhAeazhJQJtw C43qUuhgpQ1AlTICy2AoN44cxsWZonz3YGy3xg5dqQvY6ymMhL+nVyDCc3p9LM1f jbnfrF20R2l9uppSBlAy88QUkLBTZA3Jq/YzdvMv8jXJDOxdvIZjBVbzpuFGnt+0 PhuQ1KeGM2z+dR/qTCEWwiWaFzZzoB8Ker6y7bc8IYvMYgh3EDuqgRsjtKoAd2Jd lNicjzGtSJa4UFCLVIr6CGGSyOspjSN1p1sqkPvTtNnbAZKd97HRPAGfTBjmd/lb MOHxGVFyhSHaL8gpm4m0hfccW5Z+3Xfk9Sjt/feDKiTbuHVDcpcgFHiUVzOiGpGZ +u4c0Cm8MIP2xK2QVr4tHyCzZhvuufqy9geyQf+b5fCzjezdQJMzbgNwoYKvc9VS lYFnY02CU2V0O/QAQydXfH5RQ8fWJjiZ+Ss+5qg+fptCeweZbrPyvXoSoZJTTL2T u3ULrlAp3kfAGZbQm/a75W83l4LXirjBXdikXA/Nvk/ONFWSSoX/WHBTqVoic60d g0CCjl1NYWSDYMT3GAKCE6WtroPZh0jlIqYibTLn7nR7SRwUZDa7Zfl74lmPyl6k dzKu7clGRA== =oQwq -----END PGP SIGNATURE----- --=-=-=-- From unknown Tue Jun 17 01:47:07 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Phil Hagelberg Subject: bug#69683: closed (Re: bug#69683: 28.2; eglot overrides imenu without fallback even when unsupported by server) Message-ID: References: <87msr5xiof.fsf@betli.tmit.bme.hu> <87edcjt2ma.fsf@hagelb.org> X-Gnu-PR-Message: they-closed 69683 X-Gnu-PR-Package: emacs Reply-To: 69683@debbugs.gnu.org Date: Mon, 11 Mar 2024 08:46:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1710146762-26282-1" This is a multi-part message in MIME format... ------------=_1710146762-26282-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #69683: 28.2; eglot overrides imenu without fallback even when unsupported = by server which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 69683@debbugs.gnu.org. --=20 69683: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D69683 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1710146762-26282-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 69683-done) by debbugs.gnu.org; 11 Mar 2024 08:45:13 +0000 Received: from localhost ([127.0.0.1]:38645 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rjbHV-0006oa-1c for submit@debbugs.gnu.org; Mon, 11 Mar 2024 04:45:13 -0400 Received: from mail-ej1-f45.google.com ([209.85.218.45]:42131) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rjbHS-0006oK-Bu for 69683-done@debbugs.gnu.org; Mon, 11 Mar 2024 04:45:10 -0400 Received: by mail-ej1-f45.google.com with SMTP id a640c23a62f3a-a450615d1c4so695498866b.0 for <69683-done@debbugs.gnu.org>; Mon, 11 Mar 2024 01:44:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710146610; x=1710751410; darn=debbugs.gnu.org; h=mime-version:face:user-agent:message-id:in-reply-to:date:references :subject:to:from:from:to:cc:subject:date:message-id:reply-to; bh=RDqw/aZheL94RWXE54nrUcKtXldVFja2MIRBeylXUUw=; b=a4kdqW5Ks9HbWI/ysaO0elyX52auEmHCEdzgcDsb1vXKXgvZkMR++Q5zbcq2L5xKN8 Z4eGd/z4kke5I6x/TAZvYJhrqeOtDwmi8l/IHhQrMSwf49X7bvveBYNzo8TI0CO9gRjB ieQibyFu0lfcZdDl35YcksPZGo/auiUuJ5D4fAuSe32FxOy1O/cMSsa1ZxHcSrud2fq3 xBffidzWyOxCgV2kI9HAm8RnMfeZt9mABHJ2w4YnkIie1V+JYqmykMjqj/r20KmB0mH2 Qmx+I1Hkus0D4xyBBIZg31oFq835TX7dx++7WE/IPnwhaakqltAZnQDQUKZJLG0M8JtL t9pw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710146610; x=1710751410; h=mime-version:face:user-agent:message-id:in-reply-to:date:references :subject:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=RDqw/aZheL94RWXE54nrUcKtXldVFja2MIRBeylXUUw=; b=EUbxoI1f24rZANhHMzdNQVvti+DRsftO+JduZN+C8ATRmCljLVnpUcQNhE2t5Eve+Q FBCBz9Q/NOT783NFiva8CEFTV6JJYmy4S0vrTjg770vhT0j/J8jhzPQ9fCGwWayNOEZr qLr2Zvs29hdLPPU9pCP+4L874swN8ZxL7kEFPVrxJS+gdXwLUfdH5fLcoPqW3GpLW+CN aFfB08gpfHWk7/DmuuUnYZAwyyAt9eZKKzYD9z9B5HErYjOjym7wPEW6C/YABZSMvJkt PIp7UmgrDHN81+YPBv39+7zfRyB5scLGTC3lDMuaZ1gReHN1bvzv8o3RlQ3pLj5EJ9xR NpkA== X-Gm-Message-State: AOJu0Ywrj9P/p10H3grazebaLZjSCMb13mlNVVjfWlnER/ik9DBXtSCz Bek1bYUIesvPKZEO6XaDMvIE4hVHYBmHqBNRueCrHdAwp2pEHz3+/Js/LFkp X-Google-Smtp-Source: AGHT+IEy9ygfGI2Chav23exiBTnAjQBsazPwOFKwz6NG1YD9qm9NgNhYK/yPt/+EHld2V9YJ+y4I1A== X-Received: by 2002:a17:906:f1ca:b0:a3f:f8a7:e1f7 with SMTP id gx10-20020a170906f1ca00b00a3ff8a7e1f7mr4965566ejb.5.1710146609606; Mon, 11 Mar 2024 01:43:29 -0700 (PDT) Received: from betli.gmail.com (catv-213-222-160-137.catv.fixed.vodafone.hu. [213.222.160.137]) by smtp.gmail.com with ESMTPSA id pw27-20020a17090720bb00b00a44e65447f9sm2636142ejb.7.2024.03.11.01.43.29 for <69683-done@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Mar 2024 01:43:29 -0700 (PDT) From: Felician Nemeth To: 69683-done@debbugs.gnu.org Subject: Re: bug#69683: 28.2; eglot overrides imenu without fallback even when unsupported by server References: <87edcjt2ma.fsf@hagelb.org> <87v85uzag3.fsf@betli.tmit.bme.hu> <87bk7levhb.fsf@hagelb.org> Date: Mon, 11 Mar 2024 09:43:28 +0100 In-Reply-To: <87bk7levhb.fsf@hagelb.org> (Phil Hagelberg's message of "Sun, 10 Mar 2024 12:27:26 -0700") Message-ID: <87msr5xiof.fsf@betli.tmit.bme.hu> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAFVBMVEUMBwgHAgMFAAGPjY7/ //80MDHq6eqJt3pKAAABr0lEQVQ4jX2UzZKDIAzHqR177q7TPbtx2HMr6guQcrbY9txZ0fd/hA0f onXazcEJ/CD8E4Js8/HS9mwjXtqeMRxHXJkakTEm4b4GPVQW8PU8ov4fQCqeThlF60MBWdo1IXzd 2nEEZE7CEAZLwI0N/gJAhTj7ESQAX4gPgO8lyI+cvgViSVPlNomAj2M9gW40eg7VWY3cATjUcyiO Z+i03cFruGLYoUR7VyU3HihdmCEVhoDN65FXkpbSxkomOzsTQN/gySaodGb9Gdi1oSRXP46gdBWh LcUKJNdeGCWac74GKakmne0aHCFvyqJPYLsCFAVlhRTvGdzMdLHqtgRyUulyXIAH7CYQ3AB0Nody JQhAkq/qtOnbjhxdzYDkXPxlH5y4WdUAeUcX1NVJ6GR7UQEYPGWoAnA36OQNn5lRRp38vHTAp9Br LoTmvlPPDoRCKzpjG1SXT89AaT5l456BamJuMcs+NIOMzJ/s5dI6yUVcrARlruwOebfdv6gunTn4 ww3+QjGBEn5suVyLHoSGvAqREuDLN+iqZ+VcFg+HBbsJUU9+FZthbez9T+bdb+kPv2Ls6ct3hTkA AAAASUVORK5CYII= MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 69683-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Phil Hagelberg writes: > This bug report can be closed as invalid. OK. ------------=_1710146762-26282-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 9 Mar 2024 23:20:11 +0000 Received: from localhost ([127.0.0.1]:34966 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rj5z8-0005I0-1Q for submit@debbugs.gnu.org; Sat, 09 Mar 2024 18:20:11 -0500 Received: from lists.gnu.org ([209.51.188.17]:44988) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rj5z5-0005Hr-6L for submit@debbugs.gnu.org; Sat, 09 Mar 2024 18:20:09 -0500 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 1rj5yX-00073F-E2 for bug-gnu-emacs@gnu.org; Sat, 09 Mar 2024 18:19:33 -0500 Received: from hedgehog.birch.relay.mailchannels.net ([23.83.209.81]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rj5yU-0004C4-GH for bug-gnu-emacs@gnu.org; Sat, 09 Mar 2024 18:19:33 -0500 X-Sender-Id: dreamhost|x-authsender|phil@hagelb.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 5A70F5416A5 for ; Sat, 9 Mar 2024 23:19:27 +0000 (UTC) Received: from pdx1-sub0-mail-a233.dreamhost.com (unknown [127.0.0.6]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 02B1F542330 for ; Sat, 9 Mar 2024 23:19:27 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1710026367; a=rsa-sha256; cv=none; b=Z2wJpd5Jb0ufwPFKdlt7ri3XLWIJ28sxAcQFxdoVMlXtGeDKJg3TyKyhXvPmO6VOsvSRGl DZP/6hz8Jx1OSWitJMPtW0jadaycAEADqSlF7wY6ik/QbQFsH4XzaZSDp1tFEm55HBRAgo H8/QL7pAyU8fVdL8XKiyCcSSC0gOusfkwOKQE5yCpUVwmVhlDV6A923OMeJ7MaQj+YZbZl weHwmExDUbq+1jbci+2AUinOcZQxiyYJUDcRIkxAAPYQ285izzxF4CnbGZ4N2NVGsRkPkp CSLFc0ysG4+vCdT11AKnORR3thVIIYvTZuhUohMwyIWu27fJDOy/AWs8iLApKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1710026367; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: dkim-signature; bh=qpKPBTa072inz/SoMfSJ2EhCI54bid0s5wg9YaldRWA=; b=k5Ys87k42Gno3Vt4O+f5lZnGH/8Y7KUJewodHSl6Rm6dbNpDuXt8IMdi02rzZjRz9aGQDa jnOnyP/oJtWbbs2Ux6b5ygiXNcSEXeje6osZ5CuSsctQ4PNxl4PDl4QnCmJv9GnqRClC// /B8+XbuPOzPxdOjaScEL81Rg88HwNqhboVgYtaNNpPKtLL1pX3icLAxaC8m+aSVUft9yIh jrItfqH2+Klc1+fobf1S37GOwW5lYWX18tf0YiBk41ZSTSSrYKpuOTSWep8Tco2KE6h3mj yNoVfAIVLdKoCuPRC+19P/xJ9CYI7/o1stiYxs0dcBeeXbNejYGgQtuEbi98Fg== ARC-Authentication-Results: i=1; rspamd-5db57bc4b6-5bsvh; auth=pass smtp.auth=dreamhost smtp.mailfrom=phil@hagelb.org X-Sender-Id: dreamhost|x-authsender|phil@hagelb.org X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|phil@hagelb.org X-MailChannels-Auth-Id: dreamhost X-Bubble-Tangy: 0a872c74520c00fb_1710026367263_198634506 X-MC-Loop-Signature: 1710026367263:1372773671 X-MC-Ingress-Time: 1710026367262 Received: from pdx1-sub0-mail-a233.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.127.222.70 (trex/6.9.2); Sat, 09 Mar 2024 23:19:27 +0000 Received: from asthra (174-21-87-215.tukw.qwest.net [174.21.87.215]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: phil@hagelb.org) by pdx1-sub0-mail-a233.dreamhost.com (Postfix) with ESMTPSA id 4TsfBQ5XjYzFS for ; Sat, 9 Mar 2024 15:19:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hagelb.org; s=dreamhost; t=1710026366; bh=qpKPBTa072inz/SoMfSJ2EhCI54bid0s5wg9YaldRWA=; h=From:To:Subject:Date:Content-Type; b=d9yWuj6ai4CFLs6CyQWOR4w+dZdiDj4kSz6cDi2b4ass4vh03iPC7OParGEhKPmgo WSbZKs01lRE8/GF+AWN3ChqBY2G5cvhk0tqBZh0e89IWyzosJ8ezY4xUu8UaH/Rkv2 LQ2aXU76rnsosjG+eiJJpcHEoR4XAeAFHlurbhLgfthnXEOqn6+EZ0qzC7kChfkZvT m2rD/Yn1BDD+AybI7zYa8J6kBOsMSFroqOfeRQ2amF8HdNcWbDi1WlFkTTgbax4cJY DcZDqEDC62BmBts8Hzlo+eUjxPt0e9rdzX6ogset+sx2EaZLC/zNdBc3F9G3ojLLyb 5Z0cXrzECLcHA== From: Phil Hagelberg To: bug-gnu-emacs@gnu.org Subject: 28.2; eglot overrides imenu without fallback even when unsupported by server Date: Sat, 09 Mar 2024 23:19:25 +0000 Message-ID: <87edcjt2ma.fsf@hagelb.org> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=23.83.209.81; envelope-from=phil@hagelb.org; helo=hedgehog.birch.relay.mailchannels.net 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) When invoking M-x imenu in a buffer with eglot enabled, it uses eglot's LSP-aware implementation of imenu. However, not all LSP servers handle that functionality. When connected to a server that does not offer this functionality, eglot signals an error: jsonrpc-error: "request id=11 failed:", (jsonrpc-error-code . -32601), (jsonrpc-error-message . "\"textDocument/documentSymbol\" is not in the request-handlers table"), (jsonrpc-error-data) However, usually there is a perfectly good functional imenu implementation that the user wants to invoke; they just can't do it because eglot took over the imenu command. Ideally eglot should only add its functionality to the imenu command when it's connected to a server that actually supports the endpoint needed to handle it. You can reproduce this problem with fennel-mode and fennel-ls. * Install fennel-mode: https://git.sr.ht/~technomancy/fennel-mode Cloning and running M-x eval-buffer on fennel-mode.el is sufficient. * Install fennel-ls: https://git.sr.ht/~xerool/fennel-ls Clone and run `make install PREFIX=$WHATEVER', then evaluate this: (with-eval-after-load 'eglot (add-to-list 'eglot-server-programs '(fennel-mode . ("fennel-ls")))) * Open a new file, say /tmp/scratch.fnl and insert: (fn abc []) * Run M-x imenu, and see the error. * Run M-x eglot-shutdown. * Run M-x imenu, and it succeeds. I'm sure you could reproduce the same problem in another language where the Emacs mode supports imenu but the language server doesn't. But I don't know what other language fits that criteria. In GNU Emacs 28.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.37, cairo version 1.16.0) of 2023-05-14, modified by Debian built on x86-ubc-01 Windowing system distributor 'The X.Org Foundation', version 11.0.12101007 System Description: Debian GNU/Linux 12 (bookworm) Configured using: 'configure --build x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib --libexecdir=/usr/libexec --localstatedir=/var/lib --infodir=/usr/share/info --mandir=/usr/share/man --with-libsystemd --with-pop=yes --enable-locallisppath=/etc/emacs:/usr/local/share/emacs/28.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/28.2/site-lisp:/usr/share/emacs/site-lisp --with-sound=alsa --without-gconf --with-mailutils --with-native-compilation --build x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib --libexecdir=/usr/libexec --localstatedir=/var/lib --infodir=/usr/share/info --mandir=/usr/share/man --with-libsystemd --with-pop=yes --enable-locallisppath=/etc/emacs:/usr/local/share/emacs/28.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/28.2/site-lisp:/usr/share/emacs/site-lisp --with-sound=alsa --without-gconf --with-mailutils --with-native-compilation --with-cairo --with-x=yes --with-x-toolkit=gtk3 --with-toolkit-scroll-bars 'CFLAGS=-g -O2 -ffile-prefix-map=/build/emacs-mPr7Vr/emacs-28.2+1=. -fstack-protector-strong -Wformat -Werror=format-security -Wall' 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2' LDFLAGS=-Wl,-z,relro' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM GTK3 ZLIB Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Fennel Minor modes in effect: recentf-mode: t eglot--managed-mode: t flymake-mode: t paredit-mode: t whitespace-mode: t idle-highlight-mode: t hl-line-mode: t company-mode: t shell-dirtrack-mode: t winner-mode: t display-battery-mode: t display-time-mode: t save-place-mode: t tooltip-mode: t global-eldoc-mode: t eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t prettify-symbols-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: /usr/share/emacs/site-lisp/elpa/caml-4.6/caml-mode-site-file hides /usr/share/emacs/site-lisp/elpa-src/caml-4.6/caml-mode-site-file /usr/share/emacs/site-lisp/elpa/caml-4.6/caml-autoloads hides /usr/share/emacs/site-lisp/elpa-src/caml-4.6/caml-autoloads /usr/share/emacs/site-lisp/elpa/caml-4.6/inf-caml hides /usr/share/emacs/site-lisp/elpa-src/caml-4.6/inf-caml /usr/share/emacs/site-lisp/elpa/caml-4.6/caml-hilit hides /usr/share/emacs/site-lisp/elpa-src/caml-4.6/caml-hilit /usr/share/emacs/site-lisp/elpa/caml-4.6/caml-types hides /usr/share/emacs/site-lisp/elpa-src/caml-4.6/caml-types /usr/share/emacs/site-lisp/elpa/caml-4.6/caml-compat hides /usr/share/emacs/site-lisp/elpa-src/caml-4.6/caml-compat /usr/share/emacs/site-lisp/elpa/caml-4.6/caml-pkg hides /usr/share/emacs/site-lisp/elpa-src/caml-4.6/caml-pkg /usr/share/emacs/site-lisp/elpa/caml-4.6/caml hides /usr/share/emacs/site-lisp/elpa-src/caml-4.6/caml /usr/share/emacs/site-lisp/elpa/caml-4.6/caml-emacs hides /usr/share/emacs/site-lisp/elpa-src/caml-4.6/caml-emacs /usr/share/emacs/site-lisp/elpa/caml-4.6/caml-font-old hides /usr/share/emacs/site-lisp/elpa-src/caml-4.6/caml-font-old /usr/share/emacs/site-lisp/elpa/caml-4.6/caml-font hides /usr/share/emacs/site-lisp/elpa-src/caml-4.6/caml-font /usr/share/emacs/site-lisp/elpa/caml-4.6/caml-help hides /usr/share/emacs/site-lisp/elpa-src/caml-4.6/caml-help /usr/share/emacs/site-lisp/elpa/caml-4.6/caml-xemacs hides /usr/share/emacs/site-lisp/elpa-src/caml-4.6/caml-xemacs /usr/share/emacs/site-lisp/elpa/caml-4.6/camldebug hides /usr/share/emacs/site-lisp/elpa-src/caml-4.6/camldebug /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-folders hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-folders /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-mark hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-mark /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-contrib hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-contrib /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-context hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-context /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-speedbar hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-speedbar /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-contacts hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-contacts /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-actions hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-actions /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-search hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-search /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-lists hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-lists /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-message hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-message /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-headers hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-headers /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-helpers hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-helpers /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-view hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-view /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-compose hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-compose /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-bookmarks hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-bookmarks /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-draft hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-draft /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-update hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-update /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-config hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-config /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-main hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-main /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-vars hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-vars /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-org hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-org /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-server hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-server /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-pkg hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-pkg /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-autoloads hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-autoloads /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-icalendar hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-icalendar /usr/share/emacs/site-lisp/elpa/tuareg-2.2.0/tuareg-pkg hides /usr/share/emacs/site-lisp/elpa-src/tuareg-2.2.0/tuareg-pkg /usr/share/emacs/site-lisp/elpa/tuareg-2.2.0/tuareg-opam hides /usr/share/emacs/site-lisp/elpa-src/tuareg-2.2.0/tuareg-opam /usr/share/emacs/site-lisp/elpa/tuareg-2.2.0/tuareg-jbuild hides /usr/share/emacs/site-lisp/elpa-src/tuareg-2.2.0/tuareg-jbuild /usr/share/emacs/site-lisp/elpa/tuareg-2.2.0/tuareg hides /usr/share/emacs/site-lisp/elpa-src/tuareg-2.2.0/tuareg /usr/share/emacs/site-lisp/elpa/tuareg-2.2.0/tuareg-menhir hides /usr/share/emacs/site-lisp/elpa-src/tuareg-2.2.0/tuareg-menhir /usr/share/emacs/site-lisp/elpa/tuareg-2.2.0/ocamldebug hides /usr/share/emacs/site-lisp/elpa-src/tuareg-2.2.0/ocamldebug /usr/share/emacs/site-lisp/elpa/tuareg-2.2.0/dot-emacs hides /usr/share/emacs/site-lisp/elpa-src/tuareg-2.2.0/dot-emacs /usr/share/emacs/site-lisp/elpa/tuareg-2.2.0/tuareg-autoloads hides /usr/share/emacs/site-lisp/elpa-src/tuareg-2.2.0/tuareg-autoloads /usr/share/emacs/site-lisp/elpa/tuareg-2.2.0/tuareg-site-file hides /usr/share/emacs/site-lisp/elpa-src/tuareg-2.2.0/tuareg-site-file /usr/share/emacs/site-lisp/utop hides /usr/share/emacs/site-lisp/elpa-src/utop-1.11/utop ~/.emacs.d//phil/../custom hides /usr/share/emacs/28.2/lisp/custom Features: (shadow sort mail-extr emacsbug sendmail wdired goto-addr vc-dir vc-filewise expand loadhist em-tramp em-rebind em-smart woman thai-util thai-word vc-annotate utop utop-minor-mode tuareg caml caml-help caml-types caml-emacs novice epa-file apropos mode-local perl-mode scheme rcirc info ibuf-ext pulse etags fileloop completion org-element avl-tree generator ol-eww ol-rmail ol-mhe ol-irc ol-info ol-gnus nnselect gnus-search gnus-art mm-uu mml2015 mm-view mml-smime smime dig gnus-sum gnus-group gnus-undo gnus-start gnus-dbus gnus-cloud checkdoc bug-reference scpaste htmlize nroff-mode tar-mode dired-aux tmm log-view hippie-exp mhtml-mode css-mode eww xdg url-queue shr kinsoku svg mm-url sgml-mode facemenu dom url-file url-dired eieio-opt speedbar ezimage dframe shortdoc nnimap nnmail mail-source utf7 netrc nnoo gnus-spec gnus-int gnus-range gnus-win gnus nnheader ol-docview doc-view jka-compr ol-bibtex ol-bbdb ol-w3m ol-doi org-link-doi org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-footnote org-src ob-comint org-pcomplete org-list org-faces org-entities org-version ob-emacs-lisp ob-core ob-eval org-table oc-basic bibtex ol org-keys oc org-compat org-macs org-loaddefs cal-menu calendar cal-loaddefs mm-archive gnutls url-cache url-dav parse-time iso8601 url-http url-auth url-gw help-fns radix-tree arc-mode archive-mode js cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs network-stream nsm image-mode exif cl-print ielm sh-script smie executable conf-mode tabify man files-x grep pcmpl-gnu view monroe clojure-mode lisp-mnt align smerge-mode diff misearch multi-isearch yaml-mode magit-bisect magit-key-mode magit log-edit message rmc puny dired dired-loaddefs rfc822 mml mml-sec epa epg rfc6068 epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils mailheader pcvs-util add-log mule-util ibuffer ibuffer-loaddefs make-mode hi-lock flyspell ispell markdown-mode color noutline outline recentf tree-widget face-remap antifennel lua-mode time-date vc-mtn vc-hg vc-git diff-mode vc-bzr vc-src vc-sccs vc-svn vc-cvs vc-rcs vc vc-dispatcher eglot derived easy-mmode array filenotify jsonrpc ert ewoc debug backtrace find-func flymake-proc flymake compile text-property-search imenu fennel-mode xref project inf-lisp pcmpl-unix paredit whitespace idle-highlight-mode thingatpt hl-line company-dabbrev-code company-dabbrev company-files company-capf cus-start smex company pcase em-unix em-term term disp-table shell ehelp em-script em-prompt em-ls em-hist em-pred em-glob em-cmpl em-dirs esh-var pcomplete comint ansi-color em-basic em-banner em-alias esh-mode eshell esh-cmd esh-ext esh-opt esh-proc esh-io esh-arg esh-module esh-groups esh-util winner ring exwm-randr xcb-randr format-spec battery dbus ido-completing-read+ cus-edit pp cus-load wid-edit minibuf-eldef xml time exwm-systemtray xcb-systemtray xcb-xembed exwm-config exwm exwm-input xcb-keysyms xcb-xkb exwm-manage exwm-floating xcb-cursor xcb-render exwm-layout exwm-workspace exwm-core xcb-ewmh xcb-icccm xcb xcb-xproto xcb-types xcb-debug server advice my-autoload comp comp-cstr warnings rx cl-extra help-mode edmacro kmacro saveplace ido package browse-url url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json subr-x map url-vars seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit x multi-tty make-network-process native-compile emacs) Memory information: ((conses 16 2259837 441168) (symbols 48 65692 26) (strings 32 294146 27789) (string-bytes 1 11657421) (vectors 16 137620) (vector-slots 8 3750584 290488) (floats 8 1069 2257) (intervals 56 269565 5487) (buffers 992 410)) ------------=_1710146762-26282-1--