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: Tue, 06 Aug 2024 18:38:23 +0200 Message-ID: <87ed71fvy8.fsf@gmail.com> References: <87sevtz8xg.fsf@gmail.com> <86msm1z8c4.fsf@gnu.org> <87ttg8k9l6.fsf@gmail.com> <86frrszbep.fsf@gnu.org> <87o765k7ze.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12849"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , 72343@debbugs.gnu.org To: =?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 Tue Aug 06 18:39:58 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 1sbNE5-00038V-Tj for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 06 Aug 2024 18:39:58 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sbNE1-0003lb-U1; Tue, 06 Aug 2024 12:39:53 -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 1sbNDm-0003k0-Ij for bug-gnu-emacs@gnu.org; Tue, 06 Aug 2024 12:39:39 -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 1sbNDm-0007l8-9b for bug-gnu-emacs@gnu.org; Tue, 06 Aug 2024 12:39:38 -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:References:In-Reply-To:From:To:Subject; bh=Rx4OKUTCjV7JZheqArWvRuXoV1yoRN+D8HgufXE59ww=; b=KpsB6QOkaZfmjxKbc496qxYTPYMJtCTeL6uzTOYilCZj/Nh07UnLNA00nYM6GaUMCWizY4ihF2w6v28J1IvbclkMfdY2tzCrZUXgnbmnV2onPF5ZUdmxzXzmoEbNklv2apnOoIiv625fAdPCcoGbcAnUvAB2HmI5c1W57+i9rs2o9KEl5UcbjImcjq34jHjS2QLE2goKpI0buPjRdUqdpgyga1JEHahl3HISPKeMe+wzGLw1HYlr9zSkJa4s7Dnljqeyk7UCHgxokF9MmyXvZvqPXwTWu4M9Bv+ozgA/eC5D4bKGWtEO2LskALBQJw9x257/QJdwiSbJiQZfPze1/A==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sbNEA-0003I0-8X for bug-gnu-emacs@gnu.org; Tue, 06 Aug 2024 12:40: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: Tue, 06 Aug 2024 16:40: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.172296239912631 (code B ref 72343); Tue, 06 Aug 2024 16:40:02 +0000 Original-Received: (at 72343) by debbugs.gnu.org; 6 Aug 2024 16:39:59 +0000 Original-Received: from localhost ([127.0.0.1]:32964 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sbNE7-0003Hf-3I for submit@debbugs.gnu.org; Tue, 06 Aug 2024 12:39:59 -0400 Original-Received: from mail-lf1-f51.google.com ([209.85.167.51]:51660) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sbNE3-0003HO-SO for 72343@debbugs.gnu.org; Tue, 06 Aug 2024 12:39:56 -0400 Original-Received: by mail-lf1-f51.google.com with SMTP id 2adb3069b0e04-52f025bc147so1207340e87.3 for <72343@debbugs.gnu.org>; Tue, 06 Aug 2024 09:39:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722962305; x=1723567105; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Rx4OKUTCjV7JZheqArWvRuXoV1yoRN+D8HgufXE59ww=; b=kRftiIYbwwOjoaU59K76G/w7wX/Y4oLjfpAbNhjy+NO+M5PhklMBMsqM9sno96sqYh BOy7+Tq3MyZTNkB1LGqZWEAyzn8QQbzAZdwi8yoQCSRPHuaw5ZWt1mFOMDNErFT8wqlD Vxptn4MML2UJTS6mI0N2ZroTdrJKQ7qqoybmvLjZgrLWDGoPsw9b79zHQzEgILPDUyia SHrgKXaXmNU8rU8+y5W9H+aKNqQxryR0g6yKm1N41ravQrkJh2oxibY/99FY7rK8ERSe li5+ZvA3I5+E9TZw9mXAQN4Mvb639TKUJLAA23ixTws/gJvszGZrXUxCpLyW+zdQxybX PHxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722962305; x=1723567105; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=Rx4OKUTCjV7JZheqArWvRuXoV1yoRN+D8HgufXE59ww=; b=du241aWwTw0dkhF1dLNo+SFKSq4UQ2YwC5FF3lwgIXIp0VaXnPtMWN1MQA0rSVRXkV fSg+XnsIOQcFMuSePLPHUxirvYt1skyFP59stBikvS4lunCS6Ktv3N5QaD3BLmipd9jB edihUD3kzVhovzbzRl2aEsISdwYppDrS0XjViTAHhyzpzu2Dn/AQnd7sy1iYrkA4seru KAXNER0mAdq5oQWpq0Y26S4UwfwW2IubHLTqbOYRdbR0APGK+X8Osf0zADw8aPmQDNvz 8l0dsx9jEPhS5+Im+v/reeQa6e/RlZ7eFGQ6K2ltkUUGE+I6vt+tjBNk+rZxhXEr8xW0 pGZg== X-Gm-Message-State: AOJu0YxEzo/sh8T4jZ40MX2KAeZ3tLOvG3OPnYS3hZV1YMS/a/c6dQP1 5LOMPqzRxDdLibXcusIM6kruxlUl++gkA7xCqaU/s5tsluXGVupE X-Google-Smtp-Source: AGHT+IGXp7lTZT6fFHMu5zndfWwAi3ZWPvhMPXe2EfvTk+bX0hnoQDo1OxKtLkQ4L6+iDVXqDf5qtQ== X-Received: by 2002:a05:6512:2247:b0:52c:e4cf:4f31 with SMTP id 2adb3069b0e04-530bb39b6bemr11230368e87.49.1722962304963; Tue, 06 Aug 2024 09:38:24 -0700 (PDT) Original-Received: from ars3 ([2a02:8109:8a87:ff00::e354]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5b83960f313sm6111460a12.17.2024.08.06.09.38.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Aug 2024 09:38:24 -0700 (PDT) In-Reply-To: ("=?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?="'s message of "Tue, 6 Aug 2024 17:27:28 +0100") 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:289845 Archived-At: On Tue, 6 Aug 2024 at 17:27, Jo=C3=A3o T=C3=A1vora wrote: > Eglot pairs language ids with modes (plural). This is what the internal > function eglot--lookup does. In the same session, multiple language-id > maybe be picked depending on the LSP document being "opened". > So there's no "single pick" in general. You don't need to explain that to me ;-). > Previously, you suggested :language-id would work, but you didn't > want to "dabble" with it. Now you seem to be saying it can't work > at all. You're right. > This may be an "XY Problem". Can you state what exactly is the end > result you're trying to achieve (short of "writing thesis" or "fulfill > life goals") as someone who has never seen Eglot source code before or > has looked at LSP event logs to check what is being sent. I don't think there's an XY problem here, but anyway: > Tell me which server is installed This doesn't matter, as it's an Eglot issue. Any TeX server will do. > and what file(s) in which major modes you are visiting just before > typing `M-x eglot`. File x.tex in latex-mode and file y.tex in plain-tex-mode. > Then tell me what happens to said server invocation (if any). Currently, file x.tex is sent language id "tex" and file y.tex is sent language id "tex". > Focusing on the goal rather than the means may help me understand what > you want to achieve. What I want to achieve (or, if I may, what Eglot should do) in case it wasn't clear yet, is: file x.tex is sent language id "latex" and file y.tex is sent language id "plain-tex".