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 15:21:46 +0000 Message-ID: <878rkial85.fsf@gmail.com> References: <86fservpri.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13077"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Arash Esbati , Eli Zaretskii , Tim Cross , emacs-devel To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Nov 10 16:21:12 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 1ot9Md-0003AT-M5 for ged-emacs-devel@m.gmane-mx.org; Thu, 10 Nov 2022 16:21:11 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ot9MA-00064a-AZ; Thu, 10 Nov 2022 10:20:42 -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 1ot9M5-00060y-5i for emacs-devel@gnu.org; Thu, 10 Nov 2022 10:20:38 -0500 Original-Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ot9M3-0004Ag-Az; Thu, 10 Nov 2022 10:20:36 -0500 Original-Received: by mail-wr1-x433.google.com with SMTP id h9so2794007wrt.0; Thu, 10 Nov 2022 07:20:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=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=lBSZzKghGnxUlzC5ZaZrjG5ZcDXykTGM99YE8vbvnnY=; b=X4wjFGed42T9YXaK652yDZtuOPUG7SPUHy7XcBJxdnTP2bzQ/z2l7mU2oGpyF0V7ZQ Kq9yxZH4nHG5TqSt2+Yl56yXh4XromX8gQ6S8I9QEmJEl027iUuwITy1z4wdmGDgbYRG hJkWXZFQSkLiQYLv8fhJF2+FBRmjzW2Uk+JAcziS6XK/udaf6rPMGVLyN7dGZHDavaw2 GtkFxGxr2IqLYlpfAnFA6Xf/Zy7PCnwrX34Glj3cEvHsc/ffW5dcUZKPeR9SkhazKWeo ooMe62HIStGJPkXVgu7bYy46BwgBBXZbzXB8R6Pl4KUEZfsaiowlxSFJ8rLOd38pcwRq eWfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=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=lBSZzKghGnxUlzC5ZaZrjG5ZcDXykTGM99YE8vbvnnY=; b=Ih2UVtf9APGeoUxlGdVcOnnDWkZH0cIs4/OGRP9a+o3ZqzkbIlf+VShUfwPYi7JXLl /TX8KbyC1sYaaf3gLjb9r5tvRVk1oeJXvOfJN5tIpCfMFo3gm2HFFA4HQJivQMeH4siX QyTOVN1xvQbFHGIZ+StjxHbU0ZEwHYanDXNfZ2BbVkUyBOPHx8Gc5nRvUcIBXtXtqcw7 dOZj8IaUBnmmO4XKETJE29XBymxNPUkuEhMt6w3v0xf2OCKeT8xr1SfHVZCbIkKopqg1 BV9W0dFU4Db69douBe0B3Qb/Yc22vLFPhDa98EEQQvrtmk2zmjBjVZVLzhexme9tR3JH xLow== X-Gm-Message-State: ACrzQf24cIzBW9hxDdsB9KQf5RQvvVHiJp0MJF/bkfERbt3JSMXyRbvI LtsqdPpkUCwV5DHn9PcT8jTo1oFwnDwVJQ== X-Google-Smtp-Source: AMsMyM4iSUzu1tDq31yypIzneCiFPpDhGAI/W4GjdpnjDgv/SUv72wacdF57cpkDQOQv8tBLnCfVXg== X-Received: by 2002:a5d:61c9:0:b0:236:781a:8d7e with SMTP id q9-20020a5d61c9000000b00236781a8d7emr42048625wrv.576.1668093632297; Thu, 10 Nov 2022 07:20:32 -0800 (PST) Original-Received: from krug ([87.196.81.1]) by smtp.gmail.com with ESMTPSA id e4-20020adff344000000b002364c77bc96sm16655235wrp.33.2022.11.10.07.20.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Nov 2022 07:20:31 -0800 (PST) In-Reply-To: (Stefan Monnier's message of "Thu, 10 Nov 2022 08:57:09 -0500") Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=joaotavora@gmail.com; helo=mail-wr1-x433.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: 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:299492 Archived-At: Stefan Monnier writes: >> Arash, I think your suggestion of recommending `with-eval-after-load` >> is pertinent and should be added to the manual. > I don't have an objection to that but I consider uses of > `with-eval-after-load` as hints that maybe we should do things > differently. Why? This is in a user's init file. I can more or less see that argument for inter-library dependencies. But here, w-e-a-load is exactly what's needed. I use it all the time in my config. The reason people probably didn't need this earlier is because they were using Eglot from a package and were simply adding (require 'eglot) (add-to-list ...) Or they were doing that use-package magic, which probably does the same something similar to the require or the w-e-a-load strategy. > The suggestion to split the var in two (one plain var and a custom var > that defaults to nil) is such a possible solution. That would just break user's configurations and complicate things for no reason. add-to-list is the way to go, and with-eval-after-load (or use-package if you must) is just there for that. Composing existing pieces that do one job well is better than inventing and maintaining new pieces. >> Eli, even though we provide a healthy dose of built-in server invocations >> in that variable, we can't and shouldn't aim at being exhaustive. > Seeing the wild number of LSP servers available for some languages, I'd > agree, sadly. I don't think this is sad :-) > Maybe to reduce the problem we should allow multiple entries per > major mode and use the first that works, without needing to go through > `eglot-alternatives`? Again, why? Why add more semantics to an already complicated variable when the functional eglot-alternatives plugin works fine? Furthermore, I'd like to this particular configuration for a future multiple-simultaneous-server-in-one-mode idea. > [ I'll note in passing that it's common to use strings for TCP port > numbers, especially once they are standardized enough to appear in > /etc/services, so maybe the syntax for that TCP connection should > replace (HOST PORT ...) with something like (:tcp HOST PORT ...). ] If you can make that change without breaking backward compatibility, I have no objections.