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: Sat, 12 Nov 2022 07:34:28 +0000 Message-ID: <87a64w1v97.fsf@posteo.net> References: <86fservpri.fsf@gnu.org> <87cz9v97lo.fsf@posteo.net> <86r0yb234t.fsf@gnu.org> <87o7te7lc7.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8217"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Arash Esbati , emacs-devel , =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= To: Jim Porter Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Nov 12 08:35:05 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 1otl2e-0001uv-K6 for ged-emacs-devel@m.gmane-mx.org; Sat, 12 Nov 2022 08:35:04 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1otl2B-0004Jx-5E; Sat, 12 Nov 2022 02:34:35 -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 1otl29-0004Jo-BM for emacs-devel@gnu.org; Sat, 12 Nov 2022 02:34:33 -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 1otl27-0002xf-Fh for emacs-devel@gnu.org; Sat, 12 Nov 2022 02:34:33 -0500 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 54CB0240103 for ; Sat, 12 Nov 2022 08:34:28 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1668238469; bh=TrGKvVedM8QbpDfDX3QjjoWEY+QgFSt3kYf2xAr4vZw=; h=From:To:Cc:Subject:Date:From; b=T1CZZ8Mhqd/knCzaHisaA4j74BZjzzOlKWlHjQlzMWlrKoDx0fJOCcCh1pdINt50I mhHzE7otfkbU49erCN7bMwkcVxxlelWlnIh0eJVNd3WQcKFVSMxuJKjUnEuVNMMxhp 7FoZW63hkXXATGqNSSvnoo4AbAKs1HuLGCd/uIf4Pz3y8QG6UsJqSohF1M951Qf2PF 6Kq8rjOGcMm6NK4BBuvTtwbyz6a62aQgtLpPYDZ86D7XytQLjAM6ii3IduI93zJpTg roq8nOWemhJNov2sjeZeIQ58co570mq7bJcxYuAYCY2G6bCwdmEeafVUWWsso3wzK5 EYd8X6cskPh9g== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4N8S4z5Rhwz9rxG; Sat, 12 Nov 2022 08:34:27 +0100 (CET) In-Reply-To: (Jim Porter's message of "Fri, 11 Nov 2022 19:47:52 -0800") Received-SPF: pass client-ip=185.67.36.66; envelope-from=philipk@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, 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:299620 Archived-At: Jim Porter writes: > On 11/10/2022 9:47 AM, Philip Kaludercic wrote: >> 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. > > Assuming I understand what you mean, I agree that this would be very > useful. I think it would be super-helpful for there to be a way in the > Customize interface to indicate that you want to add A, B, C to a > defcustom list, and/or remove X, Y, Z. For another example where this > would be helpful, see bug#54977. > > (For people who build their Emacs configs by writing Elisp, this > probably isn't too big a deal, since they probably know enough to do > the right thing, but it couldn't hurt to make this easier in Elisp > too. Although use-package already makes this about as easy as can be, > since you can do all this in a ':config' block, and it Just Works.) Just for the sake of completeness, I'd like to mention what setup.el also provides. The `:option' macro (which is comparable to `:custom' in use-package) can take a complex option name. The default is something like (:option c-default-style '((java-mode . "java") (awk-mode . "awk") (other . "k&r"))) but you could also use (:option (prepend c-default-style) '(other . "k&r")) to load the variable and then prepend a value to a list. In retrospect, I don't like the syntax that much, and the fact that `:option' calls `custom-load-symbol' unconditionally can really slow down a configuration. This last thing is something that an `add-to-option` -- be it a standalone function or an extension of `add-to-list' must avoid IMO.