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: [External] : Re: Default custom file was: Re: Propose to add setup-wizard.el to ELPA Date: Tue, 11 Jan 2022 17:23:17 +1100 Message-ID: <8735lupwt1.fsf@gmail.com> References: <740A136F-8710-4F4C-BFC1-A3DB418447F4@gmail.com> <87fsq28x4l.fsf@yahoo.com> <87bl0q8vfa.fsf@yahoo.com> <83pmp69vsu.fsf@gnu.org> <8735m17l8c.fsf@yahoo.com> <875yqx5nub.fsf@yahoo.com> <83lezt8cm6.fsf@gnu.org> <871r1k38ym.fsf@gmail.com> <87ee5kmm6t.fsf@gmail.com> <87a6g8m1n1.fsf@gmail.com> <871r1jm4hf.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15358"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.7.5; emacs 28.0.90 Cc: "emacs-devel@gnu.org" To: Drew Adams Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jan 11 08:42: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 1n7Bo1-0003pj-5P for ged-emacs-devel@m.gmane-mx.org; Tue, 11 Jan 2022 08:42:57 +0100 Original-Received: from localhost ([::1]:50840 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n7Bnz-000498-If for ged-emacs-devel@m.gmane-mx.org; Tue, 11 Jan 2022 02:42:55 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:57608) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n7BO7-0000RG-9C for emacs-devel@gnu.org; Tue, 11 Jan 2022 02:16:17 -0500 Original-Received: from [2607:f8b0:4864:20::1030] (port=44907 helo=mail-pj1-x1030.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n7BO3-0000KD-MV for emacs-devel@gnu.org; Tue, 11 Jan 2022 02:16:11 -0500 Original-Received: by mail-pj1-x1030.google.com with SMTP id n30-20020a17090a5aa100b001b2b6509685so4229554pji.3 for ; Mon, 10 Jan 2022 23:16:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=references:user-agent:from:to:cc:subject:date:in-reply-to :message-id:mime-version; bh=bvqJhsUcl3pr9pjUaS64mx7AyVWg19d2AmDmsv0OKw0=; b=Xu/AFGqgIl7cjzuyIGstihXaQBmke+mgxcTaa4nh/Wuk8zCE7lfF8zdp84+O+jYczy ZhiZ0ICCn7w+xB7LIzpwtn3LosX4iJc6vBDAFlmzQf88D3ZZDXtxycIUhYQwzRkdYDKK Vx/ibWd7+jylx5DVLnbhreCbkHZP19k5XBKP5Np0F8795F4OCbH6FcPRjU2ZYK5KmO+h C8zGG9ZicdDdB6Q4gP3hSi9ay2Q3oEPZGIuR9ZQXyNtMUONPOKzDWpeTOpYahz4S1rnh gbf7viqS0A5Kn39VBp5Sw7t3lKgnpgAFLWUyZHAI1Tecc4OZv4ZdnUz3M0zB6j++LKSg 7kfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:references:user-agent:from:to:cc:subject:date :in-reply-to:message-id:mime-version; bh=bvqJhsUcl3pr9pjUaS64mx7AyVWg19d2AmDmsv0OKw0=; b=aXxfuOY1dRXBLmLVD5dm8bUY/FWfqcznEFnIWFWJe9MYtYStZy7qWfobzq3h5Vn/dD TiNjrVcDaWPhBELLn5AArmFACz9dOQssdJOrYxxbGBLnMwCoYE5g+OSCmK8QW+r5YilI 5T6pqtCLYFfIElobxudE003GSsFTgcWJGkZRzc1Kq2MmyYRr6Us/ZG46Y1aTFprEdLjA XEW0VSnhIhEte900ehLtYY+/cVIRpQ/sKD2rQGHHsmG+pJ6JOwiaZcVxFFxChQsnextQ rl0P9xbyt1ng2RLPazP0uPXJlagJe8nnm1xK2iK/JZIj8yuC7g0W7+Y9jCXFCZnyArLr 9gcA== X-Gm-Message-State: AOAM530j8U6xEiUr819o9EjBXINIJpXRDXOzMi0SJJZyyD8wSZNvvBpY 2LCANRaXCR0kdQ2yABlEf6XOzb2Q7mQ= X-Google-Smtp-Source: ABdhPJyndYOzBWonRGGVLL6xiSJjZRJYTDXe4nbJK+jRjfUIgiSfZkul0rtvuUPjyluwbKUBhWystw== X-Received: by 2002:a17:90b:2247:: with SMTP id hk7mr1719455pjb.126.1641885362505; Mon, 10 Jan 2022 23:16:02 -0800 (PST) Original-Received: from dingbat ([124.149.107.194]) by smtp.gmail.com with ESMTPSA id s18sm1163048pfk.178.2022.01.10.23.16.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jan 2022 23:16:01 -0800 (PST) In-reply-to: X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::1030 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::1030; envelope-from=theophilusx@gmail.com; helo=mail-pj1-x1030.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 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, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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" Xref: news.gmane.io gmane.emacs.devel:284576 Archived-At: Drew Adams writes: > [Quoting most of this so it can be referred to > in my reply. Readers can skip over the long > first quoted part, and come back to parts of > it, if needed, when they're referred to. > To do that, skip to "------------".] > >> > Automatically loading `custom-file', if it isn't >> > loaded by the init file (and any code that file >> > loads etc.), is not a hard requirement. >> > >> > It's something that could easily be done, but it's >> > not _required_ to advance the aim of getting more >> > users aware of and using `custom-file'. >> > >> >> This means either the timing of loading that file would then >> >> be up to Emacs or we would have to add some other switch to disable >> >> automatic loading to restore user control over loading that file. >> > >> > Yes. But I think that can be as simple as what >> > I suggested: >> > >> > 1. Automatically load `custom-file' (provided it's >> > not the same as the init file) immediately after >> > the init file is loaded. >> > >> > (We already automatically load other files if >> > they exist - site-lisp.el etc.) >> > >> > 2. Provide users with a way to inhibit automatic >> > loading if they need/want to do that. >> > >> > (Those users who want to do everything in their >> > init file are not involved in this - they'd >> > just set `custom-file' to their init file.) >> > >> >> So already the 'simple' change proposal has added >> >> additional complexity (albeit small). >> > >> > As I say, automatic loading isn't a requirement. >> > It's a feature. And with #2 it's optional. >> > >> > (One way to realize #2 would be with a user >> > option. We could discuss its default value.) >> > >> >> There could be other corner cases I've not thought of as >> >> well, especially once we add a new 'toggle' for the loading behaviour. >> > >> > If we're really worried about that, then we >> > just don't provide any such automatic loading. >> > >> > I don't expect problems, but automatic loading >> > isn't a requirement. Nothing in the general >> > aim and proposed solutions requires it. >> > >> > Without it, users would just be responsible for >> > loading `custom-file' - like now. Not a big >> > deal, but I think it might help users to provide >> > it (new users especially). >> > >> >> The change management aspects I referred to are perhaps a little subtle >> >> and are certainly hard to quantify. However, it is often way too easy to >> >> underestimate the impact of such change and identify what needs to be >> >> done to mitigate it. This impact can be especially hard to recognise >> >> when you are invested in the change. >> > >> > I don't disagree with that general point. >> > >> > I don't foresee any complications, but I'm >> > _not_ really invested in Emacs providing the >> > ability to automatically load `custom-file'. >> > >> >> Things which need to be considered >> >> (some of which have been mentioned) include >> >> >> >> - dealing with impact on existing users >> >> - updating documentation, including manuals, howtos, faqs etc >> >> - managing the confusion that will arise due to the amount of existing >> >> and easily found information out there (stack overflow, reddit, wikki, >> >> blogs, books etc) which will be out of date and will likely cause more >> >> confusion. >> > >> > Sure. >> > >> >> Just dealing with the first one will likely result in the final solution >> >> being more complex than simply setting a default custom file value, >> >> which in turn will make the other points more substantial to deal with. >> > >> > I don't think so, but I can't prove you're wrong. >> > >> > Suppose we don't offer automatic loading. >> > If you don't load `custom-file' (from your >> > init file or in some other way) then it doesn't >> > get loaded. End of story. >> > >> > Or suppose we offer it, but by way of a user >> > option that by default is off (no autoload). >> > >> > IOW, no change from what we do now, in this >> > respect (no autoloading of `custom-file'). >> > >> > In that case, the change is just to default >> > `custom-file' to a standard location, not to >> > nil. Now reread your paragraph of things that >> > need to be considered. Not a big deal in this >> > case, right? >> > >> > I wouldn't be completely happy with that >> > solution, but it would still be an improvement. >> > >> > As I said, it would even be a (small) >> > improvement if Emacs would just come out and >> > recommend to users to use `custom-file', >> > instead of just warning them, in the init-file >> > template-comment, not to edit the inserted >> > generated code. >> > >> > I'd hope that we go further than that, but >> > even that would help. >> > >> >> The above are some of the reasons I think it may be misleading to >> >> characterise the proposal as something simple. >> > >> > "The proposal" is really a set/hierarchy of >> > proposals, from trivially simple, with little >> > effect (and I hope little controversy), to >> > something that includes possibly automatically >> > loading `custom-file'. >> > >> > I hope you'll agree that the mere change to >> > defaulting `custom-file' to a file name isn't >> > complicated in its implications, and it should >> > not be controversial. >> > >> > All of what would happen in that case already >> > happens, if a user sets `custom-file' to a >> > file name. If no one loads that file, or if >> > that file remains nonexistent or empty, we're >> > in no-op land. >> > >> > Even users who only want to use their init >> > file for customizations wouldn't be impacted. >> > No-op. >> > >> >> However, I would be in support if I thought >> >> this was an actual problem needing to be addressed. >> > >> > Maybe think of it as what we have now: offering >> > `custom-file', but just making use of it a bit >> > more visible and likely. Instead of thinking >> > "problem" and "solution", maybe just think that >> > it might help more users to take advantage of >> > `custom-file'. >> > >> >> TO me, it really does feel more like a solution in search of a problem >> >> or at the very least, a change which will result in non-trivial effort >> >> (at various levels) when there is little evidence it is really required. >> > >> > I understand that you feel that. I think your >> > fears are unnecessary. Take out the "automatic >> > loading" feature from your consideration, and >> > see how fearful you still are. > > ------------ > >> we seem to be mis-communicating here or I'm just not being clear enough. >> One last attempt and then I'll leave it alone. >> >> My understanding of your suggestion is to set custom-file to some >> default location rather than nil e.g. .emacs.d/custom.el. You suggest >> that is all which is required and that no automatic loading would need >> to be added. > > For some definition of "required". See the rest of > what I wrote (which you quote above). > > I certainly favor automatic loading, with an option > to prevent it (#1 and #2 above). > >> I reject this as automatic loading would be absolutely >> necessary to retain existing behaviour. > > Depends on what is meant by "absolutely necessary". > As I said: > > Without it, users would just be responsible for > loading `custom-file' - like now. Not a big > deal, but I think it might help users to provide > it (new users especially). > > By "absolutely necessary" you appear to mean without > any users having to make any changes. > > So yes, if _no user will make any changes_ then > something like automatic loading would be necessary. > Otherwise, saved customizations wouldn't get loaded. > > (Is it necessary that they get loaded? Certainly > desirable/expected.) > >> If all we do is set custom-file to a default location, custom will stop >> working between sessions because nothing will load those settings. This >> significantly changes behaviour. > > Indeed. Hence the proposal to automatically > load `custom-file', if it hasn't been loaded > and it's not empty. > >> To keep the same behaviour, either all >> users who now just use custom with custom-file set to nil would need to >> add a load statement OR emacs will have to automatically load that file. > > Or they would need to start using `custom-file' > (which should be encouraged, without obligation > to do so). > > Yes, that's it. > > (Except that we could perhaps let an _explicit_ > setting of `custom-file' to nil act like setting > it to the init file.) > >> Requiring users add a load statement to their initialisation file to >> ensure custom settings work across sessions is a bad design and would >> impact too many existing users. > > There would be no such requirement. > > You prefaced your (incomplete) statement with > "To keep the same behaviour". Clearly, if we > change default behavior then we're not keeping > the same behavior by default. > > We would be _allowing_ the same behavior to be > realized. And with very minimal effort. And > no, users who really want to keep the same > behavior would not need to add a load statement > anywhere. It's enough to set `custom-file' to > the init file (or perhaps even to nil). > >> If we change the default setting of custom-file from nil to a >> default file location, there will need to be code added to Emacs to load >> that file at some point in the initialisation step. > > Yes. (But load it only if it hasn't been loaded.) > >> If we then also want >> to retain the user's ability to control when this file is loaded, we >> will also require a toggle to turn off that loading and allow the user >> to do it. > > 1. See previous - it would be loaded only if > not loaded during the load of the init file. > > 2. Users can load it anytime during the init > file load. They can even load it multiple > times. > > 3. Users can prevent loading it automatically > (I suggested a user option or this, as well as > perhaps a command-line switch.) > >> Claiming that all you are proposing is a change to the default value for >> custom-file is inaccurate if you also want to claim no change in >> behaviour. > > 1. That's _not_ all I proposed. That's all that's > strictly necessary. But in that case, users have > a bit more responsibility. > > 2. I never claimed that there would be no change > in behavior. Obviously, if we change the default > behavior we change the behavior. What I claimed > is that (a) in many cases there will be no change > in behavior and (b) in any case users can easily > get whatever behavior they like, including the > behavior that's the default now. > > To restore the behavior to what is now the default, > a user would set `custom-file' to the init file. Thanks for putting it all together in one place. It does help. I believe I now have a better understanding of your multi-layered or hierarchy of proposed change. I have now moved from being fairly ambivalent about the proposal and sceptical regarding the necessity for any change to being firmly against any change. Ignoring the important question as to whether there is any real problem which this change will address, I feel your proposal has the real potential to complicate the semantics of how custom works and very likely to add to user confusion. - If we don't have autoloading of custom settings, new users will have to add a load statement or set their custom-file to their init file (or nil). This does not seem intuitive to me. If I use the customisation facilities of an application, I don't then expect to have to load those settings as well. - If we do add autoloading, then we also need to add additional switches to allow user control of that autoloading. This is adding additional complexity, especially if we only want the autoloading to occur if the user has not explicitly done it (I don't believe detecting this will be as straight-forward or simple as some have suggested - not without having some corner cases or modifying custom). All of this done based on the assumption that having auto generated code in your init file is a bad enough idea we need to get rid of it. Yet that assumption lacks any real evidence despite decades of this practice being in place. You also suggest we need to encourage new users to use a separate custom file. Why? While you feel it is bad practice to mix user and auto generated configuration in the same file, I suspect a much larger number of users don't even give it a thought and have never had any problems with it. At the end of the day, this seems like a non-problem driven by a belief/ideology that mixing user and auto-generated code is so wrong it has to be eliminated. If there was evidence of significant adverse impact to users due to this practice, change would be warranted. However, as it now stands, I cannot see how such change can be justified.