From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#72343: [PATCH] Fix eglot-server-programs for TeX modes Date: Sun, 28 Jul 2024 21:20:59 +0300 Message-ID: <86msm1z8c4.fsf@gnu.org> References: <87sevtz8xg.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13982"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 72343@debbugs.gnu.org To: Augusto Stoffel , =?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 Jul 28 20:22:09 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 1sY8X2-0003Sx-Hv for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 28 Jul 2024 20:22:08 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sY8Wq-000077-GN; Sun, 28 Jul 2024 14:21:56 -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 1sY8Wm-00006b-5T for bug-gnu-emacs@gnu.org; Sun, 28 Jul 2024 14:21:52 -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 1sY8Wk-0003G4-VP for bug-gnu-emacs@gnu.org; Sun, 28 Jul 2024 14:21:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-version:References:In-Reply-To:From:Date:To:Subject; bh=g/wv11kOrjUWbS94gWFtpQ5gTGII7H0RsBWLgXo4EuY=; b=evXmtXtJcr5NG21/jbEt4sbsu372FZWfL0DKvWCeVfUTuqi10/WQFe2kFW83etx6vjkE+w69z7azdGe2MRdz71TViWJgMA5+CPiFao7GN12CMqJNFI1OdyBhD4AGte9Mjy5R1GpJo5NXqNvyZOfnw+mc66y2Rx4uF1C5GIv0MeNM/p1P3WWjBYXcn67rbWyCSAvGypimMIGfEh5eBzH3jez8ONC7YB2GBY+VhDJc16UeggGKEYEnrKT/cFsTAoEeJSESCHpkCB2cvN1oyZ1UHLdmQS+2gKuvXjDhfzqxYPEVt5TgcC/bOLEIz2E/qhBBBwIgTWOhB10b4fGuPzFNvA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sY8Ww-0008QQ-GG for bug-gnu-emacs@gnu.org; Sun, 28 Jul 2024 14:22:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 28 Jul 2024 18:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72343 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 72343-submit@debbugs.gnu.org id=B72343.172219088632340 (code B ref 72343); Sun, 28 Jul 2024 18:22:02 +0000 Original-Received: (at 72343) by debbugs.gnu.org; 28 Jul 2024 18:21:26 +0000 Original-Received: from localhost ([127.0.0.1]:44343 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sY8WM-0008PX-3O for submit@debbugs.gnu.org; Sun, 28 Jul 2024 14:21:26 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:36934) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sY8WH-0008PH-CT for 72343@debbugs.gnu.org; Sun, 28 Jul 2024 14:21:24 -0400 Original-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 1sY8Vy-0003Dn-UB; Sun, 28 Jul 2024 14:21:02 -0400 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=g/wv11kOrjUWbS94gWFtpQ5gTGII7H0RsBWLgXo4EuY=; b=NyVglRc/Nf/+CZShXlqp y+djhmbltGKFKgTyyUUWaLVQS0IKi3mtGti8MwRvya2lYZq+vUXJZ/c2pPXPtfVdlPpGrALIshF49 H12Vku8/5XpB/KNwFpZFlcWvGAogZPqEz70kas3qy7dWXFLN9xQpNXy0T486Gcvy1TP96otAc5ScY y1L9zR3qCs6ChmXcHCQtM8bdunBI1MMI84ycAVtV5DFwXWcnpdhqbpyBOyhZXRkbkGmfU0abJf6HN Xhw+YRXJ9RiMiQtSF/YRBuRRzwcH6vqDAL5UVN3wUVdkujTtM1YSrZUYLlp/WL+pCTvV+rS2jcLSx lrJT0jRc7SrMCg==; In-Reply-To: <87sevtz8xg.fsf@gmail.com> (message from Augusto Stoffel on Sun, 28 Jul 2024 20:08:11 +0200) 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:289490 Archived-At: > From: Augusto Stoffel > Date: Sun, 28 Jul 2024 20:08:11 +0200 > > I noticed Eglot currently sends the languageId "tex" in all TeX-derived > modes, which is not correct; it should be "latex", "bibtex", etc. > > See the attached patch for a fix. João, any objections to installing this on the emacs-30 release branch? > >From 754127ad8bfa6ade7fe9a836df2a8bea75d711ea Mon Sep 17 00:00:00 2001 > From: Augusto Stoffel > Date: Sun, 28 Jul 2024 20:03:35 +0200 > Subject: [PATCH] Fix eglot-server-programs for TeX modes > > * lisp/progmodes/eglot.el (eglot-server-programs): Add a dedicated entry > to each TeX format, since the languageId passed to the server is derived > from it. > --- > lisp/progmodes/eglot.el | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el > index 5845aff39b7..ea60b5d9a72 100644 > --- a/lisp/progmodes/eglot.el > +++ b/lisp/progmodes/eglot.el > @@ -292,8 +292,11 @@ eglot-server-programs > (scala-mode . ,(eglot-alternatives > '("metals" "metals-emacs"))) > (racket-mode . ("racket" "-l" "racket-langserver")) > - ((tex-mode context-mode texinfo-mode bibtex-mode) > - . ,(eglot-alternatives '("digestif" "texlab"))) > + (plain-tex-mode "digestif") > + (latex-mode . ,(eglot-alternatives '("digestif" "texlab"))) > + (context-mode "digestif") > + (texinfo-mode "digestif") > + (bibtex-mode . ,(eglot-alternatives '("digestif" "texlab"))) > (erlang-mode . ("erlang_ls" "--transport" "stdio")) > ((yaml-ts-mode yaml-mode) . ("yaml-language-server" "--stdio")) > (nix-mode . ,(eglot-alternatives '("nil" "rnix-lsp" "nixd"))) > -- > 2.45.2 >