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: Thu, 10 Nov 2022 17:47:36 +0000 Message-ID: <87o7te7lc7.fsf@posteo.net> References: <86fservpri.fsf@gnu.org> <87cz9v97lo.fsf@posteo.net> <86r0yb234t.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="11621"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel , =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= To: Arash Esbati Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Nov 10 18:47:58 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 1otBeg-0002jW-ME for ged-emacs-devel@m.gmane-mx.org; Thu, 10 Nov 2022 18:47:58 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1otBeS-0001zW-PT; Thu, 10 Nov 2022 12:47:44 -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 1otBeQ-0001zA-Sn for emacs-devel@gnu.org; Thu, 10 Nov 2022 12:47:42 -0500 Original-Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1otBeN-0005K1-TH for emacs-devel@gnu.org; Thu, 10 Nov 2022 12:47:41 -0500 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id BD3CA240028 for ; Thu, 10 Nov 2022 18:47:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1668102457; bh=o/A5abxgpXwgCCVbhiRdTF5LVHevKzy8vZTWXR1QxO4=; h=From:To:Cc:Subject:Date:From; b=ncK+yF/mYdxq6Dig3Yl1TVo5yQb9jIhpBDnN5adKQMtYixQkl7vrsBYVNnJwfSAHb ToAurMWoUBQ9sqj6KSi/EBiPagn6xOdW8UwGV/DtcmMPsrClw6Qv6oonf3fjS1c5PZ UlNe9xRw/jmdlEid2AYtBb5VDUkCa+jFeg10KrJm0n1ev1S4LePiTG8Gk3+9e9HFhg atGelCCikWUsagnM8oQSmB3lJNX6yz4EqsupHCWr4MO6IjC+WDxZjOCxDN+PdKj5LU wG1UNtaBEUhd1/zg371MNx4/MPXWUqOZ7P6ZVopTyaJpQmmAFoKz15HPE1yTFUz1qC OQ7hAx0V1VftA== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4N7TnN1z1rz6tnf; Thu, 10 Nov 2022 18:47:36 +0100 (CET) In-Reply-To: <86r0yb234t.fsf@gnu.org> (Arash Esbati's message of "Wed, 09 Nov 2022 23:07:30 +0100") Received-SPF: pass client-ip=185.67.36.65; envelope-from=philipk@posteo.net; helo=mout01.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, 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:299504 Archived-At: Arash Esbati writes: > Philip Kaludercic writes: > >> How would making `eglot-server-programs' help in that respect? > > If it's meant to be extended by users, then one could use the custom > interface for it, not add-to-list then. > >> If the `defvar' were just to be replaced by a `defcustom', the result >> would still just be a variable, that couldn't be `add-to-list'ed >> before it is loaded. > > This will depend on the implementation. Say the current content of > `eglot-server-programs' is in `eglot-server-programs-builtin' and > `eglot-server-programs' is a custom variable, and you have a function > like this in eglot.el: > > (defun eglot-server-programs () > (append eglot-server-programs > eglot-server-programs-builtin)) > > then a user can just setq the custom eglot-server-programs without being > worry about the rest. Honestly, I think that there should be a command like `add-to-option' that can handle these things automatically and defer loading if possible. There are plenty of cases where you would either do something like this, or have a ...-user-list that is appended together with some build-in list, and even though the actual problem is shared among all user options.