unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Augusto Stoffel <arstoffel@gmail.com>
To: "João Távora" <joaotavora@gmail.com>
Cc: Eli Zaretskii <eliz@gnu.org>, 72343@debbugs.gnu.org
Subject: bug#72343: [PATCH] Fix eglot-server-programs for TeX modes
Date: Fri, 2 Aug 2024 17:13:11 +0200	[thread overview]
Message-ID: <CAHixrvY_G_fxLCksPOqcT52WXpeCtGm9ObG1BnrJ1jPx4rGEfg@mail.gmail.com> (raw)
In-Reply-To: <CALDnm50sjTEnSxJ3Rzna3pets2bjHnVF=6vix1gM_54+VoHNvQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2563 bytes --]

On Fri, Aug 2, 2024, 16:01 João Távora <joaotavora@gmail.com> wrote:

> [Did you mean to write only to me?]
>

Sorry, I'm copying the bug list now.

>
> On Fri, Aug 2, 2024 at 2:09 PM Augusto Stoffel <arstoffel@gmail.com>
> wrote:
>
> >> Have you tried the :language-id _keyword_ as explained in the
> documentation I linked to? It should avoid the multiple entries.
> > I had to look at the source code for some examples to see what you mean.
> Sure, that would avoid multiple entries.
>
> I'd think this sentence:
>
> > can be either a symbol of an Emacs major mode or
> > a list of the form (mode :language-id id), with mode being a major-mode
> symbol
> > and id a string that identifies the language to the server
>
> Would be enough.  It's very typical of Emacs variables to have these kinds
> of things.
> But feel free to propose some better documentation.  Maybe an example.
>
> > Still, it's unclear to me why one would prefer a solution that requires
> dabbling into language ids where it could be avoided.
>
> The problem you're trying to solve is related to language-id, as far as I
> understand.
> The "wrong" one is being sent right now, and you want the correct one to
> be sent.
> So it's not a question of dabbling, it's about sending the correct value.
> And there's a
> setting for affecting precisely that value, with no middle man, and it was
> designed
> for solving exactly your problem. Guessing the language-id  from the
> major-mode
> name is much worse than that, IMHO.
>

I think guessing "lang" from lang-mode is perfectly fine. The problem here
is that when eglot-server-program lists a server for tex-mode and the
server is selected for use in a derived mode such as latex-mode, the
guessed language is tex and not latex.


> Also it's a more concise solution.
>

For the reason noted above, there is no "concise solution" to choose, all
derived modes from tex-mode need to be mentioned explicitly in one way or
another (either to make the guess correct, or to provide manually a
language id).


Also it's more in-line with the rest of the variable,
> Also keeps texlab working (or not working) like it did before.  Also
> doesn't spam "digestif"
> multiple times in e-s-programs.
>

Fine, I can change the patch so that texlab will still run on modes that it
doesn't support (plain TeX and ConTeXt, etc). Just please confirm that this
is the behavior you prefer.


> So if you say it works and can actually test it, please use that instead.
>
> João
>

[-- Attachment #2: Type: text/html, Size: 4340 bytes --]

  parent reply	other threads:[~2024-08-02 15:13 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-28 18:08 bug#72343: [PATCH] Fix eglot-server-programs for TeX modes Augusto Stoffel
2024-07-28 18:20 ` Eli Zaretskii
2024-07-28 21:31   ` João Távora
2024-07-29  6:15     ` Augusto Stoffel
2024-07-29 11:26       ` Eli Zaretskii
2024-07-30 18:20         ` Augusto Stoffel
2024-07-30 20:29           ` João Távora
     [not found]             ` <CAHixrvYMZTMRSpixw2CAkdx_b+hdPZDkB7s+1X1sUX4E7jPWHw@mail.gmail.com>
     [not found]               ` <CALDnm50sjTEnSxJ3Rzna3pets2bjHnVF=6vix1gM_54+VoHNvQ@mail.gmail.com>
2024-08-02 15:13                 ` Augusto Stoffel [this message]
2024-08-02 15:29                   ` João Távora
2024-08-06 15:04                     ` Augusto Stoffel
2024-08-06 15:34                       ` João Távora
2024-08-06 15:45                         ` Augusto Stoffel
2024-08-06 16:27                           ` João Távora
2024-08-06 16:38                             ` Augusto Stoffel
2024-08-06 18:08                               ` João Távora
2024-08-06 18:48                                 ` Augusto Stoffel
2024-08-06 22:52                                   ` João Távora
2024-08-07  7:02                                     ` Augusto Stoffel
2024-08-07  8:47                                       ` João Távora
2024-08-07  9:17                                         ` Augusto Stoffel
2024-08-07 13:17                                           ` João Távora
2024-08-07  6:33                                 ` Augusto Stoffel
2024-08-07 13:23                                   ` João Távora
2024-08-12 16:37                                     ` Philip Kaludercic
2024-08-12 16:53                                       ` João Távora

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAHixrvY_G_fxLCksPOqcT52WXpeCtGm9ObG1BnrJ1jPx4rGEfg@mail.gmail.com \
    --to=arstoffel@gmail.com \
    --cc=72343@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=joaotavora@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).