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 09:40:23 +0000 Message-ID: <87mt8wzf20.fsf@posteo.net> References: <86fservpri.fsf@gnu.org> <87cz9v97lo.fsf@posteo.net> <86r0yb234t.fsf@gnu.org> <87o7te7lc7.fsf@posteo.net> <83sfioob7s.fsf@gnu.org> <87wn80zjiw.fsf@posteo.net> <83leogo9yw.fsf@gnu.org> <87r0y8zhl9.fsf@posteo.net> <83k040o8an.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="39601"; 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 Sat Nov 12 10:41:28 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 1otn0x-000AAa-St for ged-emacs-devel@m.gmane-mx.org; Sat, 12 Nov 2022 10:41:27 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1otn0D-0000i0-JZ; Sat, 12 Nov 2022 04:40:41 -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 1otn07-0000hO-UF for emacs-devel@gnu.org; Sat, 12 Nov 2022 04:40:37 -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 1otmzz-0006ii-Im for emacs-devel@gnu.org; Sat, 12 Nov 2022 04:40:33 -0500 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 8D0DC240101 for ; Sat, 12 Nov 2022 10:40:25 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1668246025; bh=J5lgEsfY6Rju4FlImUgyMrL+mL8aUrO/vIBiLJzRIYw=; h=From:To:Cc:Subject:Date:From; b=CPTUD06KE88MeUzC8a8Ed6q8W0RyqISJH7ctltz1HeCeel/wmbGUqUkW7RUm6Zvgz +Qv8aYyeASJMGlGGEq2kKxLjTbcViKpbVBri78bUOTHCHQSbOsRXPLR/IIYq7Q+xpA O6ueWX5BXircdNsQLsSmFtanyG7sHXvB1LdddxAiZUCRK9O8TIQyUShLV+e4eW7qw7 MUv0EtY8D7Blfbv0+tRg98REQ/wq179NopoCq/GHr/poG6gOg8OCZtXc0YLbUlzfkf 7Tyul/erZa9W+fDNRTHXOLNBFRLsuvIfT8n8T3b6UXD+Pix2Cg8C90p+lK+AY2eSzK PFZneXmfzyVZw== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4N8VtH5rQmz6tml; Sat, 12 Nov 2022 10:40:23 +0100 (CET) In-Reply-To: <83k040o8an.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 12 Nov 2022 11:01:52 +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:299636 Archived-At: Eli Zaretskii writes: >> From: Philip Kaludercic >> Cc: jporterbugs@gmail.com, arash@gnu.org, emacs-devel@gnu.org, >> joaotavora@gmail.com >> Date: Sat, 12 Nov 2022 08:45:38 +0000 >> >> Eli Zaretskii writes: >> >> >> My issue here is that while you can modify the list, when saved you will >> >> store the entire modified list, and no the modifications you made on the >> >> base variable. >> > >> > The way to do this is to have a basic value as a defvar, and store the >> > corrections to that in a defcustom. >> >> But in that case you need to load the library to get the default value, > > I don't see why. And even if it's so, why is it a problem to load the > library? (I'm not just talking about Eglot right now) If the default value is defined in an non-autoloaded variable, you have to load the library to access the value -- otherwise it simply wasn't loaded. The "issue" here is just that loading everything you want to modify during initialisation can get slow. >> in which case you might as well store the default value in the >> defcustom. > > But you already explained why storing in a defcustom doesn't solve the > problem? So why are you suggesting to do that anyway? ^^ I am not sure I explained that? If you have to load the library to get the default, writing (setopt foo (cons 'bar foo)) or (setopt foo (cons 'bar foo-default)) doesn't make much of a difference to me. >> Also, I don't think this helps people who use the Customize >> interface? > > Why doesn't it help? Maybe I have missed something, if a user option has a `repeat' or `alist' type, you can't just say "append this and that value to the end of some other value". All you get to modify is the entire list, and all you get to store is the entire list.