GNU bug report logs - #72343
[PATCH] Fix eglot-server-programs for TeX modes

Previous Next

Package: emacs;

Reported by: Augusto Stoffel <arstoffel <at> gmail.com>

Date: Sun, 28 Jul 2024 18:09:01 UTC

Severity: normal

Tags: patch

Full log


Message #8 received at 72343 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Augusto Stoffel <arstoffel <at> gmail.com>, João Távora
 <joaotavora <at> gmail.com>
Cc: 72343 <at> debbugs.gnu.org
Subject: Re: bug#72343: [PATCH] Fix eglot-server-programs for TeX modes
Date: Sun, 28 Jul 2024 21:20:59 +0300
> From: Augusto Stoffel <arstoffel <at> gmail.com>
> 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 <arstoffel <at> gmail.com>
> 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
> 




This bug report was last modified 361 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.