From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Augusto Stoffel Newsgroups: gmane.emacs.bugs Subject: bug#72343: [PATCH] Fix eglot-server-programs for TeX modes Date: Sun, 28 Jul 2024 20:08:11 +0200 Message-ID: <87sevtz8xg.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8597"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) To: 72343@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jul 28 20:09:04 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 1sY8KN-00026v-OT for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 28 Jul 2024 20:09:03 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sY8KC-0006fb-5C; Sun, 28 Jul 2024 14:08:52 -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 1sY8KA-0006fR-U8 for bug-gnu-emacs@gnu.org; Sun, 28 Jul 2024 14:08:51 -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 1sY8KA-0001Ec-Lo for bug-gnu-emacs@gnu.org; Sun, 28 Jul 2024 14:08:50 -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:Date:From:To:Subject; bh=mGX35noVc9ebmNVKIN6zgR+mZTRVSkPyGxiZ/akgPNo=; b=flxE80BDm2uJaOOXrzeZpNYFaifX+73DL78Sj68Tuyudiudk13jPgRXD/5ubdj0Jy8bOonTVyK1ib75fJU7eaF+l198UoIzRpGEtvZYBCECUTU7zT5If1pC5gr1YtOM7vn+1nsvUF53oWaRYdZvFn5Xu93FvmqudaNt65JOLJfzZM1AVvwVf32C+5+xBzf3zakDjk61rIcOCIvKHmzL3LzD5LyOiAv1z956T+IGzd5fQ/cfAYEizty96DukfoG3WAbzlAahCdctiE9qkYPE7znwLPVyuiVidvQW9YZDZXH7PaEnKQc8VmJ5VYdebia1nwcCvCr0M/WTPoUzU2T6qDQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sY8KL-000874-W3 for bug-gnu-emacs@gnu.org; Sun, 28 Jul 2024 14:09:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Augusto Stoffel Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 28 Jul 2024 18:09:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 72343 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.172219011431144 (code B ref -1); Sun, 28 Jul 2024 18:09:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 28 Jul 2024 18:08:34 +0000 Original-Received: from localhost ([127.0.0.1]:44337 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sY8Jt-00086G-KZ for submit@debbugs.gnu.org; Sun, 28 Jul 2024 14:08:34 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:51588) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sY8Jr-000868-MQ for submit@debbugs.gnu.org; Sun, 28 Jul 2024 14:08:32 -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 1sY8Je-0006ZP-AX for bug-gnu-emacs@gnu.org; Sun, 28 Jul 2024 14:08:19 -0400 Original-Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sY8Jc-000186-Nf for bug-gnu-emacs@gnu.org; Sun, 28 Jul 2024 14:08:18 -0400 Original-Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-58ef19aa69dso3300516a12.3 for ; Sun, 28 Jul 2024 11:08:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722190094; x=1722794894; darn=gnu.org; h=mime-version:user-agent:message-id:date:subject:to:from:from:to:cc :subject:date:message-id:reply-to; bh=mGX35noVc9ebmNVKIN6zgR+mZTRVSkPyGxiZ/akgPNo=; b=W95K6w3MXD6ngyjo7And2B2fkOS2ePMT3Ig05EzIhXio3Mn4bY21qF0UfJT4OsdkJk NtbZj4yDalxjw1oEwe9j1FzUBEFN2bKeJVuOZfvWLY5qhphLSw5tF4ju2SbQMHrtl5hZ td7oi1IYrGMKXlgoWKufFlutQ4Zslt0ElBIwSPlz1/7nuR6EmOQb9VoKa0Wj+0GyuJib 48NQTjjng4fPKPhBBDESZ/ITK4JfYGQAOiTAer6ShGaDWsN2TX/6afrqwweaAupG+nNh 68Z/5JM9ntzrTECCOB6VlR+THQxmNFACBQwe9aneq3cW8Q6lSr30R+hbapi7q4PWqNX8 Z8Fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722190094; x=1722794894; h=mime-version:user-agent:message-id:date:subject:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=mGX35noVc9ebmNVKIN6zgR+mZTRVSkPyGxiZ/akgPNo=; b=gawFg01UDZMKd1WCu84+EuPOOLf5RC1cr5QU2d5xzScOybnh08ox3zMFDGI1jTuAt2 SKl6gHj1No0ZwYo66czpXWR0AVQbvGmkWS0tQxzQ1pYE3grg6h32PBusSPgeRkSJd9zp KD7Snwf9UcD6PqvDGmSagqf1RuU8amZ8d31eK1vad0Jsk9UB8Aa4BDHHaQPslMlIHrap AfLJICa1/qZkO/ILYxBy4ylGGL2Wh2bYtvOjmfsWesGZ7lp+woUAsYxJIPYMNdnrXHRg dY+niDziDe+EnzOXWJP8PwFF90eM3LpJ0pIp0L7Jx3YFMRyl95N4xjWvhzQHhh3/VB6R a2sA== X-Gm-Message-State: AOJu0YzRLmfgYzeLtcy23+4plg+URizy3BcUY7jgzIob1nnTcEt76RyK omVAzuVGUykgk2DgoLdZPOOxxw7UwfJRcxvq5Xya2h1WvCeXMUPImdGK3g== X-Google-Smtp-Source: AGHT+IHb9sl+ilfqEb46112f96NHK0isoLJkKgy99mGMXUBDyN6jutLz14VNgImXewbXROf2kZeG6w== X-Received: by 2002:a50:d542:0:b0:5a1:225b:4233 with SMTP id 4fb4d7f45d1cf-5b021f0d886mr3519241a12.23.1722190093486; Sun, 28 Jul 2024 11:08:13 -0700 (PDT) Original-Received: from ars3 ([2a02:8109:8a87:ff00::e354]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5ac6578356csm4692587a12.87.2024.07.28.11.08.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 Jul 2024 11:08:12 -0700 (PDT) Received-SPF: pass client-ip=2a00:1450:4864:20::536; envelope-from=arstoffel@gmail.com; helo=mail-ed1-x536.google.com 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:289489 Archived-At: --=-=-= Content-Type: text/plain Tags: patch 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. --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-Fix-eglot-server-programs-for-TeX-modes.patch >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 --=-=-=--