From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tim Cross Newsgroups: gmane.emacs.devel Subject: Re: Custom Et Al: Build-Up The Underlying Platform was Re: A new user perspective about "Changes for emacs 28" Date: Wed, 9 Sep 2020 18:48:25 +1000 Message-ID: References: <1ca462fa-0f9e-3c18-6386-f43f49388b2f@gmail.com> <20200907180812.5tfylspp7i6vl4o3@Ergus> <94fda087-a61b-356d-4bb4-791907593246@yandex.ru> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000007814ed05aedd84a1" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16805"; mail-complaints-to="usenet@ciao.gmane.io" Cc: spacibba@aol.com, =?UTF-8?B?RGFuaWVsIE1hcnTDg8Ktbg==?= , Emacs developers , nicola.manca85@gmail.com, Dmitry Gutov , "TV. Raman" To: Richard Stallman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Sep 09 10:52:14 2020 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 1kFvpt-0004F4-F8 for ged-emacs-devel@m.gmane-mx.org; Wed, 09 Sep 2020 10:52:13 +0200 Original-Received: from localhost ([::1]:32870 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFvps-0005JE-Df for ged-emacs-devel@m.gmane-mx.org; Wed, 09 Sep 2020 04:52:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44348) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFvmT-0000nU-I9 for emacs-devel@gnu.org; Wed, 09 Sep 2020 04:48:41 -0400 Original-Received: from mail-oi1-x22a.google.com ([2607:f8b0:4864:20::22a]:44464) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kFvmR-0000Cx-5V; Wed, 09 Sep 2020 04:48:41 -0400 Original-Received: by mail-oi1-x22a.google.com with SMTP id 185so1578249oie.11; Wed, 09 Sep 2020 01:48:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=/vPAayApgo4ULU9kcoV1w3u3vgxuAZtYG3zv/65JjAs=; b=irLGZEh2y8h62/+hEjvEZIYnKnsn5sjHLy6VUNXvsBfyrxPo+zUOOn/hYU5qUN+RU/ LWFf2FlN6wZLTYY9rbpbaxsWKDKidWBnBGQkrA/P05KBUxdY0dNBk6yjBjS9RgyEDWK8 Cz8i1fYpU4iT4SUwry5KVjoiA40dz2eabMhaQTISqc+GeeEsBfJY6C6/cpDvwOB+K4GE hj8ABnicW8zPVdIwX3lF5m0UoeiygnFxQjLFLwc8IyUzUiupjgJ72aB2OiYddXxp+JtB P9Sr+sJCGR+ZgV4hEABCOgw0TYlMXn7coRTcRZsaX3f1NWkBoX9dG6LB2B6iA3OPNqy7 4vBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=/vPAayApgo4ULU9kcoV1w3u3vgxuAZtYG3zv/65JjAs=; b=fUWl2WOvcBhGIKJ+ydQ0PlF95jL9wmbxMvgiFCS0KHXf84W4vdpCobmnsesvmq9ZyP 7w6R4W9mT3T9p94/+p1thm7yDAy9w/qvTy5dG6FhAC+QVI/MZ915UZ/ctQL1pAIPiEPw E4wW1rkQckU0QQe3L6pvTNOpOdpwLlu6tsxplZYiddrM3vBK16PHUSP7hHgbC1rjQWgl YOw4i+qYdux0waTkEpiQDH7CeIQZWKUArnllsudMeom1HhTifPFjK9RRuhThY/KR4W4H WAMTrkuPRJdPUDKRP+J++wXN7hs90purtOULk3qhxlnQaoh7OTm4NFcUNfCA2RjqstGF HP1Q== X-Gm-Message-State: AOAM53271Aqeja4OLVtTRLIUgxdn56nCRwVYUHJsCtXxM0nDdQYb0Ivo p9JVKo096tDl6Gsqe8nLiooH+tvQd4oTuG3THz/EItJd X-Google-Smtp-Source: ABdhPJyJWSiUxson+qL1zBDkWQPUOgY8Iq7yvbOeF6al+YSoeZXL/SNG+rS3qeJOuOGSGYCvWPCbBT9spSkPxYBlFfo= X-Received: by 2002:aca:35c6:: with SMTP id c189mr1880687oia.171.1599641317014; Wed, 09 Sep 2020 01:48:37 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::22a; envelope-from=theophilusx@gmail.com; helo=mail-oi1-x22a.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, HTML_MESSAGE=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.23 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" Xref: news.gmane.io gmane.emacs.devel:254858 Archived-At: --0000000000007814ed05aedd84a1 Content-Type: text/plain; charset="UTF-8" I largely agree with Raman's points. In particular, the problem of stuff building up in the custom file (or section). To make it worse, the format can be fragile, especially if you want to try and edit it to clean it up (not a big issue if your an experienced elisper, but if your not....). I have also experienced additional items being added to the custom section when I have used custom to set some values. At odd times I've seen values added which are not values I have customized. It might also be worth having some sort of tool which could check custom definitions. I frequently see warnings about custom value mismatches. These are often caused when something is defined as a customizable value, but the code has changed and updating the custom definition has not been updated to match the code changes. Some sort of tool which check custom definitions for completeness and alerted developers to definition and initialisation mismatches might be useful. Given the growth in custom usage, perhaps a better approach, rather than the 'custom section' or custom file would be to have custom write individual files into a ~/.emacs.d/custom directory? This could be based on the custom group or package name or perhaps add an additional field to the custom definition which specifies the name of the file to use. Emacs could then look in this directory at some pint in the startup process and consume the files in the custom directory or perhaps the require function could be modified so that libraries/modules look for a corresponding custom file when they are loaded? A big advantage of the individual files is that it is easy to remove a configuration and it wold likely be less fragile than the existing custom section. The drawback is that having lots of small custom files might adversely impact init time (unless you can do something like add it to require or load etc so that it is only read when the associated code is actually loaded). On Wed, 9 Sep 2020 at 13:52, Richard Stallman wrote: > [[[ To any NSA and FBI agents reading my email: please consider ]]] > [[[ whether defending the US Constitution against all enemies, ]]] > [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > > > For separating customizations into multiple files there is "initsplit" > > (https://www.emacswiki.org/emacs/InitSplit). Maybe it's possible to > > include its functionality as part of Custom. > > I am sure we can implement the basic idea. What I wonder about is, > how to split the settings up? Based on what sort of plan or system? > > If we have a clear answer for that, it should be a straightforward > matter of doing work. > > > -- > Dr Richard Stallman > Chief GNUisance of the GNU Project (https://gnu.org) > Founder, Free Software Foundation (https://fsf.org) > Internet Hall-of-Famer (https://internethalloffame.org) > > > > -- regards, Tim -- Tim Cross --0000000000007814ed05aedd84a1 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I largely agree with Raman's points. In particular, th= e problem of stuff building=C2=A0up in the custom file (or section). To mak= e it worse, the format can be fragile, especially if you want to try and ed= it it to clean it up (not a big issue if your an experienced elisper, but i= f your not....). I have also experienced additional items being added to th= e custom section when I have used custom to set some values. At odd times I= 've seen values added which are not values I have customized.=C2=A0
It might also be worth having some sort of tool which could= check custom definitions. I frequently see warnings about custom value mis= matches. These are often caused when something is defined as a customizable= value, but the code has changed and updating the custom definition has not= been updated to match the code changes. Some sort of tool which check cust= om definitions for completeness and alerted developers to definition and in= itialisation mismatches might be useful.=C2=A0

Giv= en the growth in custom usage, perhaps a better approach, rather than the &= #39;custom section' or custom file would be to have custom write indivi= dual files into a ~/.emacs.d/custom directory? This could be based on the c= ustom group or package name or perhaps add an additional field to the custo= m definition which specifies the name of the file to use. Emacs could then = look in this directory at some pint in the startup process and consume the = files in the custom directory or perhaps the require function could be modi= fied so that libraries/modules look for a corresponding custom file when th= ey are loaded? A big advantage of the individual files is that it is easy t= o remove a configuration and it wold likely be less fragile than the existi= ng custom section. The drawback is that having lots of small custom files m= ight adversely impact init time (unless you can do something like add it to= require or load etc so that it is only read when the associated code is ac= tually loaded).=C2=A0

On Wed, 9 Sep 2020 at 13:52, Richard Stallman &l= t;rms@gnu.org> wrote:
[[[ To any NSA and FBI agents r= eading my email: please consider=C2=A0 =C2=A0 ]]]
[[[ whether defending the US Constitution against all enemies,=C2=A0 =C2=A0= =C2=A0]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]<= br>
=C2=A0 > For separating customizations into multiple files there is &quo= t;initsplit"
=C2=A0 > (https://www.emacswiki.org/emacs/InitSplit)= . Maybe it's possible to
=C2=A0 > include its functionality as part of Custom.

I am sure we can implement the basic idea.=C2=A0 What I wonder about is, how to split the settings up?=C2=A0 Based on what sort of plan or system?
If we have a clear answer for that, it should be a straightforward
matter of doing work.


--
Dr Richard Stallman
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)





--
regards,

Tim

--
Tim Cross

--0000000000007814ed05aedd84a1--