From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.devel Subject: Re: Making `eglot-server-programs' a custom variable? Date: Wed, 16 Nov 2022 17:05:22 +0000 Message-ID: <87wn7ultil.fsf@posteo.net> References: <86fservpri.fsf@gnu.org> <83sfioob7s.fsf@gnu.org> <87wn80zjiw.fsf@posteo.net> <83leogo9yw.fsf@gnu.org> <87r0y8zhl9.fsf@posteo.net> <83k040o8an.fsf@gnu.org> <87mt8wzf20.fsf@posteo.net> <83edu8o5gw.fsf@gnu.org> <878rkgz3nj.fsf@posteo.net> <83r0y8meis.fsf@gnu.org> <87wn7zwvqk.fsf@posteo.net> <83a64vmk8l.fsf@gnu.org> <87k03zwcpm.fsf@posteo.net> <83wn7zl2pf.fsf@gnu.org> <87fsek6ra6.fsf@posteo.net> <831qq4hyo9.fsf@gnu.org> <87fsejnj6d.fsf@posteo.net> <83a64rggkd.fsf@gnu.org> <87zgcrm1ig.fsf@posteo.net> <83wn7veyw8.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="22122"; mail-complaints-to="usenet@ciao.gmane.io" Cc: jporterbugs@gmail.com, arash@gnu.org, emacs-devel@gnu.org, joaotavora@gmail.com To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Nov 16 18:06:46 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 1ovLs6-0005Xp-9M for ged-emacs-devel@m.gmane-mx.org; Wed, 16 Nov 2022 18:06:46 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ovLrL-000591-0n; Wed, 16 Nov 2022 12:06:00 -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 1ovLqp-0004zc-Gl for emacs-devel@gnu.org; Wed, 16 Nov 2022 12:05:28 -0500 Original-Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ovLqm-0007qe-Jh for emacs-devel@gnu.org; Wed, 16 Nov 2022 12:05:27 -0500 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 853782401C9 for ; Wed, 16 Nov 2022 18:05:22 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1668618322; bh=8DmpJkSWj+RozSHQrknhUN3lp3PpMtNusX1tYOEBFnQ=; h=From:To:Cc:Subject:Date:From; b=fnmuNmjYmV+kzFfHr5pOZSqjgnO/8LqKy42ycoI2P1WufwIx5QVSnENYHXOEQ3XM2 6LUMP8nXI9rrvUZ7r7cIG0RgipH2OYcWb+qBp9afnU0yKmGEpM51yRbr48CZ0Gw+36 Voar9+TDdWzkfF4jb+sy79AKEOPOYOqdDvcIxiCga+BWTGPwrj3hYYs5FtDfkykI4B n4YQjyHX+hv419Izay7BIKl3Mri18Kn5MpjV6i7KqaWmoqxDc9/SiQygT3oWg9Zpai sxXpRmvptleM9VE9PicpazbSs9AZL9bMTCiYGob8Gu96rf+8ZF6UuXcy0gG1hdZPcj 2Jwz0VfdH4HlQ== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NC8Ys2fdxz9rxM; Wed, 16 Nov 2022 18:05:21 +0100 (CET) In-Reply-To: <83wn7veyw8.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 16 Nov 2022 16:51:03 +0200") Received-SPF: pass client-ip=185.67.36.66; envelope-from=philipk@posteo.net; helo=mout02.posteo.de 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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:299956 Archived-At: Eli Zaretskii writes: >> From: Philip Kaludercic >> Cc: jporterbugs@gmail.com, arash@gnu.org, emacs-devel@gnu.org, >> joaotavora@gmail.com >> Date: Wed, 16 Nov 2022 14:12:39 +0000 >> >> >> > . a multi-level list >> >> > . elements that are alists >> >> > . a "backquote construct" with evaluated parts in >> >> > >> >> > How much Lisp do we require a user to know? Imagine a user who just >> >> > wants to add one more server, either for an existing mode or for a new >> >> > mode not in the list. Do we really expect him or her to understand >> >> > all that? >> >> >> >> For a simple modification, it appears that >> >> >> >> (add-to-list 'eglot-server-programs '(foo-mode "foo-lsp" "--stdio")) >> >> >> >> is enough. >> > >> > And we expect a random user to know this how? >> >> I believe it to be no more or less reasonable to know than how to >> manipulate `auto-mode-alist', and that involves Elisp regular >> expressions. > > I think this variable is way harder to grasp that auto-mode-alist. This might just be familiarity speaking, (regexp . major-mode) vs (major-mode . command-list) -- in the simple case, the case that most users are interested in -- doesn't seem that big of a difference. >> > Probably. Which is why I think my original proposal, not to ask users >> > to customize such variables directly, is much easier to implement. >> >> I don't think that either or differs too much in difficulty, this is >> more a question of approach. > > I think adding infrastructure to Custom widgets is much harder than > writing a :set function which adds an element to the likes of > eglot-server-programs. But extensions of Custom in this direction > will be most welcome, of course. To clarify, my proposal wasn't to add additional infrastructure to custom widgets, but to either extend add-to-list or add a similar command that would defer itself until the package is loaded, to avoid overriding a variable that has a default value.