From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: Re: Making `eglot-server-programs' a custom variable? Date: Thu, 10 Nov 2022 12:07:30 +0000 Message-ID: References: <86fservpri.fsf@gnu.org> <83v8nnqchr.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000003144b905ed1c9a68" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26174"; mail-complaints-to="usenet@ciao.gmane.io" Cc: arash@gnu.org, theophilusx@gmail.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Nov 10 13:07:35 2022 Return-path: Envelope-to: ged-emacs-devel@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 1ot6LH-0006Yj-95 for ged-emacs-devel@m.gmane-mx.org; Thu, 10 Nov 2022 13:07:35 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ot6KM-0003J7-5J; Thu, 10 Nov 2022 07:06:38 -0500 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 1ot6KG-0003Cv-Cr for emacs-devel@gnu.org; Thu, 10 Nov 2022 07:06:35 -0500 Original-Received: from mail-oi1-x22d.google.com ([2607:f8b0:4864:20::22d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ot6KC-0007pf-0Q; Thu, 10 Nov 2022 07:06:32 -0500 Original-Received: by mail-oi1-x22d.google.com with SMTP id n205so1610846oib.1; Thu, 10 Nov 2022 04:06:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Zpwxj9QGfv/h4DnIiPT6hFgQHxD+MbeMzD2DHvMSsFo=; b=eq1ryvd27cF8GaAjeFa1poCIjsCS/dP1mDrR6PmvWwQnBOwMsFIAd12gk0XiIFLEcz vOvi2ONmuqBfqf4dZHKD3I9amisYGkHHLuF3i4IC6Pny5bxuSf+Kwg8uOUPLd/ZMjfMU wZzYOofVyihGfez4M3/9nqH9U7uC7tcf4Y2/wqvEQina2ysRZMp2Xq289BkCtTzOQeYg N7oWbyLa+j5RmXFrxFWjy2jTA9mlUNfeYATfw7m2DGzf9xJZQD8omT5ACzIe+UlBcd67 bhXPW7ugnz2BZXZiP/W5qNSXpqDD/qLOgfwLSXWCO7fxxjGPmyq2abL/LJm+Snpvc6fq L5nw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Zpwxj9QGfv/h4DnIiPT6hFgQHxD+MbeMzD2DHvMSsFo=; b=MWKtXF8xSao0Jz4ldhEbCHndswoq+S4dgZVboM1WrLMcLv957XhdX2iBUAPCg5ZnGb zDgf4Qp3HQp8nvN6uW7QierKq7Aqnqbs4Q4W0Mo2+NWsHZkOYTIm7zsVYDOmqBQDonyk whefYW4DzvRy4mDFZLunL68Kllrk2/N30lyj2TY59MaRdEEtwB4dF3qUn1/K6JlscwJ4 BAEx3ZOfxC++o+xwdWyvXBxly+yBR7xV1JidEAv8f2CSReGrNVq2cRRMy2F8oRQpemDo GiPfT8SHoQ7K+uOYf8BtZS5gat/7ljctUlSX5YrE8BpVawHQ/husYUoNUcqHLOzwJ+se Hw5A== X-Gm-Message-State: ACrzQf2xLv8iuHbU/ycAN7/yL2jyZBVh7Xz/mZH/DYahcTVb8HEnUVFk 74bxqXkGlj5S2uEix9nX3t/EAMO9xL7xnzFeCgG8ALFof0s= X-Google-Smtp-Source: AMsMyM4Iy/cYUMTA3hJ0dd3VzxZhF+R3Gqaulsxr+xDSBijU8i9rZawM+hMf5MJwrjYw+9ccJisJU9/XsqoEZH5+pqo= X-Received: by 2002:a05:6808:a05:b0:35a:2a65:eb01 with SMTP id n5-20020a0568080a0500b0035a2a65eb01mr26380393oij.215.1668081985339; Thu, 10 Nov 2022 04:06:25 -0800 (PST) In-Reply-To: <83v8nnqchr.fsf@gnu.org> Received-SPF: pass client-ip=2607:f8b0:4864:20::22d; envelope-from=joaotavora@gmail.com; helo=mail-oi1-x22d.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, HTML_MESSAGE=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: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:299484 Archived-At: --0000000000003144b905ed1c9a68 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Nov 10, 2022 at 11:23 AM Eli Zaretskii wrote: > > From: Jo=C3=A3o T=C3=A1vora > > Date: Thu, 10 Nov 2022 10:15:41 +0000 > > Cc: emacs-devel > > > > Arash, I think your suggestion of recommending `with-eval-after-load` > > is pertinent and should be added to the manual. > > How about adding a command to add servers to the list instead? See > below. > > > Eli, even though we provide a healthy dose of built-in server invocatio= ns > > in that variable, we can't and shouldn't aim at being exhaustive. > > > > Eglot's manual is meant to be a go-to guide for knowing how to resolve > > simple problems such as this one, which is very common. The problems > > solved by eglot-workspace-configuration and other variables are also > > very common. The manual should be reasonably self sufficient, not too > > terse or relying on the user's knowledge. > > IMNSHO, it is not the mission of the Eglot manual to teach people > with-eval-after-load and in general how to update lists that aren't > autoloaded or preloaded. This is a slippery slope. > I understand your opinion, and I share it mostly. But this is not that slippery. We also have short mentions in passing of directory-local variables because they are essential to setting up eglot-workspace-configuration. Short mentions of Emacs's facilities and links to other documentation deepening those concepts is the best strategy. I've used it in the README.md and MANUAL.md that preceded this manual and I can attest that it worked well. If making the variable autoloaded can make use skip the with-eval-after-load, and has no other pitfalls, then I'm OK with that too. Whatever works and makes the manual self-sufficient in this very simple and common task. > That said, I have no objection to converting eglot-server-programs into > > a defcustom, if someone will commit to translating and maintaining all > > the complex combination of options into "widget" form. I don't have th= e > > time or inclination for this task, but maybe someone has. > > It is not a good idea to have a defcustom whose value should be such a > complex data structure. I agree, but a command is a not a solution IMO: this belongs in the user's configuration file. A good docstring (can it be improved?) containing good descriptions and some ready-made recipes is the current and best approach to these things. --0000000000003144b905ed1c9a68 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Thu, Nov 10, 2022 at 11:23 AM Eli Zaretskii <eliz@gnu.org> wrote:
> From: Jo=C3= =A3o T=C3=A1vora <joaotavora@gmail.com>
> Date: Thu, 10 Nov 2022 10:15:41 +0000
> Cc: emacs-devel <emacs-devel@gnu.org>
>
> Arash, I think your suggestion of recommending `with-eval-after-load`<= br> > is pertinent and should be added to the manual.

How about adding a command to add servers to the list instead?=C2=A0 See below.

> Eli, even though we provide a healthy dose of built-in server invocati= ons
> in that variable, we can't and shouldn't aim at being exhausti= ve.
>
> Eglot's manual is meant to be a go-to guide for knowing how to res= olve
> simple problems such as this one, which is very common.=C2=A0 The prob= lems
> solved by eglot-workspace-configuration and other variables are also <= br> > very common. The manual should be reasonably self sufficient, not too<= br> > terse or relying on the user's knowledge.

IMNSHO, it is not the mission of the Eglot manual to teach people
with-eval-after-load and in general how to update lists that aren't
autoloaded or preloaded.=C2=A0 This is a slippery slope.

I understand your opinion, and I share it mostly.=C2=A0 B= ut this is not that slippery.
We also have short mentions in pass= ing of directory-local variables because
they are essential to se= tting up eglot-workspace-configuration.=C2=A0 Short mentions
of E= macs's facilities and links to other documentation deepening those
=
concepts is the best strategy. I've used it in the README.md= and MANUAL.md
that preceded this manual and I can attest th= at it worked well.

If making the variable auto= loaded can make use skip the with-eval-after-load,
and has no oth= er pitfalls, then I'm OK with that too.=C2=A0 Whatever works and
<= div>makes the manual self-sufficient in this very simple and common task.

> That said, I have no objection to converting eglot-server-programs int= o
> a defcustom, if someone will commit to translating and maintaining all=
> the complex combination of options into "widget" form.=C2=A0= I don't have the
> time or inclination for this task, but maybe someone has.

It is not a good idea to have a defcustom whose value should be such a
complex data structure.=C2=A0

I agree, but = a command is a not a solution IMO: this belongs in the
user&= #39;s configuration file.

A good docstring (c= an it=C2=A0 be improved?) containing good descriptions
and s= ome ready-made recipes is the current and best approach to these
=
things.


--0000000000003144b905ed1c9a68--