From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 17 08:16:15 2023 Received: (at submit) by debbugs.gnu.org; 17 Jul 2023 12:16:15 +0000 Received: from localhost ([127.0.0.1]:49259 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qLN9C-0000sF-TM for submit@debbugs.gnu.org; Mon, 17 Jul 2023 08:16:15 -0400 Received: from lists.gnu.org ([2001:470:142::17]:50634) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qLN9A-0000rY-1o for submit@debbugs.gnu.org; Mon, 17 Jul 2023 08:16:14 -0400 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 1qLN92-00055M-NO for bug-gnu-emacs@gnu.org; Mon, 17 Jul 2023 08:16:06 -0400 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qLN8y-0000tw-0L for bug-gnu-emacs@gnu.org; Mon, 17 Jul 2023 08:16:04 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 5163E240101 for ; Mon, 17 Jul 2023 14:15:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1689596155; bh=HmmSezm9ajW6XBrZrBWZTyJR/YX0Y6c1B0VuFO38GdI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=bVy4GoM9mByPiZGVIM9T4SiIRQ0msbdoLFkrFRmUigJDZ2bkTid7bpi91GAJgqQ+/ 0CHyakL6/26zxvK+M6fpCmRsGWRhyggGADTxgenFeJJEhNYswgNn6bEs+XpZ0ax7QC x+y508zR9ELUT7QxDjs8XI+afk4nvyvSOIoN8hGR98ciFjix7kwB96fcLu5LWfPZeh 0qtHyPIYG9e/fVbsaXH2zeGEmrCHT6UL/yGXdKf8xQ5FFwWj8Qm++UPqkp8dTuMSHF SrBbZ+pSDWypsVyPeoZiWg6AQQAMVuVOECuVuqf6o9bNiie4iJUzQ6bGipMF9ZlpF6 QgZK7QihDOrZw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4R4Ldk0NQ6z9rxK; Mon, 17 Jul 2023 14:15:53 +0200 (CEST) From: Brian Leung To: bug-gnu-emacs@gnu.org Subject: [PATCH] eglot.el: Avoid premature bailout in eglot-imenu Date: Mon, 17 Jul 2023 12:09:26 +0000 Message-ID: <87mszuybrc.fsf@posteo.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=185.67.36.66; envelope-from=leungbk@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=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.0 (+) X-Debbugs-Envelope-To: submit Cc: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= 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: -0.0 (/) --=-=-= Content-Type: text/plain; format=flowed Tags: patch On current master branch, running M-: (eglot-imenu) in buffers using LSP servers supporting the textDocument/documentSymbol request always results in an early exit since the server capability is NOT named "textDocument/documentSymbol", but rather "documentSymbolProvider". This patch corrects that, so that now (eglot-imenu) works as expected. In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo version 1.16.0, Xaw3d scroll bars) Repository revision: c5fa58cbc4a33a0a65494b9ab2e35d4f30ab849b Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12101008 System Description: NixOS 23.11 (Tapir) Configured using: 'configure --prefix=/nix/store/rl8pgvclyashprbz6xr84x6l0n9q37l2-emacs-git-20230715.0 --disable-build-details --with-modules --with-x-toolkit=lucid --with-xft --with-cairo --with-native-compilation --with-tree-sitter' --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-eglot.el-Avoid-premature-bailout-in-eglot-imenu.patch >From d340d56e006d7cbb047d966fa117994c6d93e13f Mon Sep 17 00:00:00 2001 From: Brian Leung Date: Mon, 17 Jul 2023 05:04:28 -0700 Subject: [PATCH] eglot.el: Avoid premature bailout in eglot-imenu * lisp/progmodes/eglot.el (eglot-imenu): Declare the correct name of the server capability providing textDocument/documentSymbol. Without this change, eglot-imenu always aborts even when used with servers supporting textDocument/documentSymbol. --- lisp/progmodes/eglot.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 8ac21638a5b..1df3a8844f8 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -3367,7 +3367,7 @@ eglot--imenu-DocumentSymbol (cl-defun eglot-imenu () "Eglot's `imenu-create-index-function'. Returns a list as described in docstring of `imenu--index-alist'." - (unless (eglot--server-capable :textDocument/documentSymbol) + (unless (eglot--server-capable :documentSymbolProvider) (cl-return-from eglot-imenu)) (let* ((res (eglot--request (eglot--current-server-or-lose) :textDocument/documentSymbol -- 2.41.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 17 09:38:59 2023 Received: (at 64682-done) by debbugs.gnu.org; 17 Jul 2023 13:38:59 +0000 Received: from localhost ([127.0.0.1]:49494 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qLORG-0005ag-VB for submit@debbugs.gnu.org; Mon, 17 Jul 2023 09:38:59 -0400 Received: from mail-oo1-xc34.google.com ([2607:f8b0:4864:20::c34]:56423) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qLORC-0005aQ-MF for 64682-done@debbugs.gnu.org; Mon, 17 Jul 2023 09:38:57 -0400 Received: by mail-oo1-xc34.google.com with SMTP id 006d021491bc7-563439ea4a2so2871194eaf.0 for <64682-done@debbugs.gnu.org>; Mon, 17 Jul 2023 06:38:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689601129; x=1692193129; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=ur2+4dcIzRvW53iQxewXGaZZvXuXS3YVD1jwZUYGWJU=; b=KuQP0lroPnNmMAebEwUa0KS+qwcZxoWMDgmOGQX6q93SEAZp0IIyRIpbboce3FFakW mX9wWArKuqfE/Vpss/dI/5f5b/SFQ5RAPm0ojpB7m3QTDD1o7O7fShTivbX5M1BT2vnL CsmNp55lf8pu0TQ6yrAtJXMrbrIy/8P+9r9hV0tnR5sYGzTPxGGzd8hg5sud5wWUjTjx ZzErzHHIZAvN7Ij6zuE0hV3Y3eExidDZW9MdX0SFHSWyH2uoJqfsVzG4Gf8hMIhhJP+8 8BqX5Tcv5O8btpyrs21whj65E7XVcSAHzKsMaDTORjhLLizkRQKVkbKq+TfBnfDB5cWu oO0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689601129; x=1692193129; h=content-transfer-encoding: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=ur2+4dcIzRvW53iQxewXGaZZvXuXS3YVD1jwZUYGWJU=; b=EW6qR5ThQyrZRObX8L1xxxC/3Cetaa2AgON0vHBHqdFTGnmxCouXJvXYr7GbGx+Ojx 9ixs9yr6dmoJ3zE0IokzVx+c4tuYzNFH1gox+Eqh4MH6ALl0dEWaRXrRbpDpSSfuXRpe BSX9kvg+ubWiag/m9Yxcb3kUXJQm7cMdHn1Gflad4d5xrx0rGfS3suwnJEX0BlulctHu UwcHWbS5SmxjaEunZe/d+xPZARcLT4DGKRqp9i/NkFpQAjoKE6loS5J4Wi3j4BvUF1Oj 7j6dhze98DsqqCnPY+/zaQkzD9r4wEGAtRu4jCZFswLZpIkfS1sxoSHgJykNO2oQmDx6 33LQ== X-Gm-Message-State: ABy/qLYXpMlFUi+bPQ/XnKGaPyoTkXxyRh3WT67QeDC6c84VLW4hRZ+M Q8E71Xyu74nZkJ6F6R3m73uy0AGWadnK/0cPHgg= X-Google-Smtp-Source: APBJJlF3eKhbp4NFXKA4mjjZBxWIPZ8dwPhHUXJU3xKW5Ld/+Tc61ML+M3sp7W7+ypLOvD6x+TK+EnFpFzAACFX9Avs= X-Received: by 2002:a4a:395e:0:b0:566:3723:a029 with SMTP id x30-20020a4a395e000000b005663723a029mr3924711oog.3.1689601128801; Mon, 17 Jul 2023 06:38:48 -0700 (PDT) MIME-Version: 1.0 References: <87mszuybrc.fsf@posteo.net> In-Reply-To: <87mszuybrc.fsf@posteo.net> From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Date: Mon, 17 Jul 2023 14:38:37 +0100 Message-ID: Subject: Re: bug#64682: [PATCH] eglot.el: Avoid premature bailout in eglot-imenu To: Brian Leung , 64682-done@debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 64682-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 (-) Thanks. Pushed to master as 7446a8c34e2b793df52dbf56b630e20f8c10568c, and closing. Jo=C3=A3o On Mon, Jul 17, 2023 at 1:17=E2=80=AFPM Brian Leung wr= ote: > > Tags: patch > > On current master branch, running M-: (eglot-imenu) in buffers > using LSP servers supporting the textDocument/documentSymbol > request always results in an early exit since the server > capability is NOT named "textDocument/documentSymbol", but rather > "documentSymbolProvider". > > This patch corrects that, so that now (eglot-imenu) works as > expected. > > In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, > cairo > version 1.16.0, Xaw3d scroll bars) > Repository revision: c5fa58cbc4a33a0a65494b9ab2e35d4f30ab849b > Repository branch: master > Windowing system distributor 'The X.Org Foundation', version > 11.0.12101008 > System Description: NixOS 23.11 (Tapir) > > Configured using: > 'configure > --prefix=3D/nix/store/rl8pgvclyashprbz6xr84x6l0n9q37l2-emacs-git-2023071= 5.0 > --disable-build-details --with-modules --with-x-toolkit=3Dlucid > --with-xft --with-cairo --with-native-compilation > --with-tree-sitter' --=20 Jo=C3=A3o T=C3=A1vora From unknown Mon Jun 23 18:32:07 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 15 Aug 2023 11:24:12 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator