unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Have Customize always use `custom-file`
@ 2022-01-03 16:13 Drew Adams
  0 siblings, 0 replies; 17+ messages in thread
From: Drew Adams @ 2022-01-03 16:13 UTC (permalink / raw)
  To: Drew Adams, Sean Whitton, Stefan Kangas, xenodasein@tutanota.de
  Cc: emacs-devel@gnu.org

[Renaming this part of the setup-wizard thread.]




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Have Customize always use `custom-file`
@ 2022-01-03 16:15 Drew Adams
  2022-01-03 16:20 ` xenodasein--- via Emacs development discussions.
  0 siblings, 1 reply; 17+ messages in thread
From: Drew Adams @ 2022-01-03 16:15 UTC (permalink / raw)
  To: Drew Adams, xenodasein@tutanota.de, Stefan Kangas
  Cc: Sean Whitton, emacs-devel@gnu.org

[Moving to new Subject line.]

> > >>>> Customize should not write to your init file ...
> > >>>> That's a bad Emacs design choice, IMO.
> > >>>> It especially should not be the default behavior.
> >
> > I'd prefer the current behavior TBH, because the real
> > issue is not where it is written, it is when it's read.
> 
> No.  The real issue is who is writing it, and where.
> 
> Users can control the location of `custom-file'
> and when it's read.
> 
> And we can provide a default location and time
> of reading.
> 
> > Currently it is easy to place custom-set-variables
> > where you want either inside init file or to place it into another
> > file.
> 
> That would of course still be the case.  Nothing
> prevents you from doing anything in your init or
> another file - including calling custom* functions.
> 
> > Timing is important,
> 
> It's absolutely important, and needs to remain
> under user control.
> 
> > because Customize also has problems with
> > autoloads, and who knows what else.
> 
> Dunno what problems you envision - please be
> specific.
> 
> The only real change is to prevent Customize
> from writing to your init file.  Nothing else.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Have Customize always use `custom-file`
  2022-01-03 16:15 Have Customize always use `custom-file` Drew Adams
@ 2022-01-03 16:20 ` xenodasein--- via Emacs development discussions.
  2022-01-03 16:28   ` [External] : " Drew Adams
  0 siblings, 1 reply; 17+ messages in thread
From: xenodasein--- via Emacs development discussions. @ 2022-01-03 16:20 UTC (permalink / raw)
  To: drew.adams; +Cc: emacs-devel

Jan 3, 2022, 19:04 by drew.adams@oracle.com:

>> >>>> Customize should not write to your init file ...  That's a bad Emacs
>> >>>> design choice, IMO.  It especially should not be the default behavior.
>> >> Hmm, then where should it write to?
>> > IMO, something like
>> > (setq custom-file (locate-user-emacs-file "custom-file.el"))
>>
>> I'd prefer the current behavior TBH, because the real
>> issue is not where it is written, it is when it's read.
>>
>
> No.  The real issue is who is writing it, and where.
>
> Users can control the location of `custom-file'
> and when it's read.
>
> And we can provide a default location and time
> of reading.
>
>> Currently it is easy to place custom-set-variables
>> where you want either inside init file or to place it into another
>> file.
>>
>
> That would of course still be the case.  Nothing
> prevents you from doing anything in your init or
> another file - including calling custom* functions.
>
>> Timing is important,
>>
>
> It's absolutely important, and needs to remain
> under user control.
>
>> because Customize also has problems with
>> autoloads, and who knows what else.
>>
>
> Dunno what problems you envision - please be
> specific.
>
> The only real change is to prevent Customize
> from writing to your init file.  Nothing else.
>

I am fine with this behavior, as long as we can place the
(load custom-file) anywhere we want.

My line of thinking was, if someone is aware of init.el
and what Customize writes to it, then it is already very
easy for them to do what they like, and stop it from
writing.  It is of course better to do the proper thing
from beginning.

For problems:
https://stackoverflow.com/questions/32693757/emacs-package-customization-and-autoloads





^ permalink raw reply	[flat|nested] 17+ messages in thread

* RE: [External] : Re: Have Customize always use `custom-file`
  2022-01-03 16:20 ` xenodasein--- via Emacs development discussions.
@ 2022-01-03 16:28   ` Drew Adams
  2022-01-03 17:02     ` xenodasein--- via Emacs development discussions.
  0 siblings, 1 reply; 17+ messages in thread
From: Drew Adams @ 2022-01-03 16:28 UTC (permalink / raw)
  To: xenodasein@tutanota.de; +Cc: emacs-devel@gnu.org

> > The only real change is to prevent Customize
> > from writing to your init file.  Nothing else.
> 
> I am fine with this behavior, as long as we can 
> place the (load custom-file) anywhere we want.

That's absolutely the idea.

> https://urldefense.com/v3/__https://stackoverflow.com/questions/32693757/ema
> cs-package-customization-and-autoloads__;!!ACWV5N9M2RV99hQ!c2-
> NuVQ8MqOxWafY1oZFpAqa4eJ48VUOtqgkFN5MBhM5OaDEMLrRnnTkujdhwFe1$

I answered that question at that location, in 2015:

https://stackoverflow.com/a/32697325/729907

^ permalink raw reply	[flat|nested] 17+ messages in thread

* RE: [External] : Re: Have Customize always use `custom-file`
  2022-01-03 16:28   ` [External] : " Drew Adams
@ 2022-01-03 17:02     ` xenodasein--- via Emacs development discussions.
  2022-01-04  1:00       ` Po Lu
  0 siblings, 1 reply; 17+ messages in thread
From: xenodasein--- via Emacs development discussions. @ 2022-01-03 17:02 UTC (permalink / raw)
  To: emacs-devel

Jan 3, 2022, by xenodasein:

> For problems:
> https://stackoverflow.com/questions/32693757/emacs-package-customization-and-autoloads
>

Sorry for nonfree link.  TLDR: Stefan mentions existence quirks and corner
cases on some interactions of autoloading and Customize.  Experto credite.




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Have Customize always use `custom-file`
@ 2022-01-03 17:55 Drew Adams
  2022-01-03 18:31 ` xenodasein--- via Emacs development discussions.
  0 siblings, 1 reply; 17+ messages in thread
From: Drew Adams @ 2022-01-03 17:55 UTC (permalink / raw)
  To: xenodasein@tutanota.de, emacs-devel@gnu.org

> > For problems:
> >
> https://urldefense.com/v3/__https://stackoverflow.com/questions/32693757/ema
> cs-package-customization-and-
> autoloads__;!!ACWV5N9M2RV99hQ!ch4K0byKujWHfMCY7DyWs5dx-
> 3h5iPQestwjvN1CHmMk0tDfWAo_lOk7FaJddxMS$
> 
> Sorry for nonfree link.  TLDR: Stefan mentions existence quirks and corner
> cases on some interactions of autoloading and Customize.  Experto credite.

As I said, I answered the question posed at that link,
there.

What the user asking that question did was reasonable.

Users can control the behavior.  If you put a defcustom
sexp in an autoloads file, then you need to know, and
perhaps pay attention to, when that file gets loaded.

There's nothing mystical about this.  The behavior of
a defcustom sexp, like any other Lisp code, can depend
on code that's been previously evaluated (e.g. loaded).

That applies to a defcustom that's autoloaded as much
as to one that's loaded/evaluated in some other way.

If a defcustom expects things to exist, or things to
have happened already, when it's evaluated, then you
need to make sure those things exist or have happened. 

Stefan's advice to not autoload defcustom sexps is
perfectly fine to follow.  It can also be fine to
autoload some defcustoms - but in that case you of
course need to pay attention to evaluation/load order
etc.

Emacs Lisp gives you plenty of rope to hang yourself
with.  You're not obliged to hang yourself, however.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Have Customize always use `custom-file`
  2022-01-03 17:55 Drew Adams
@ 2022-01-03 18:31 ` xenodasein--- via Emacs development discussions.
  0 siblings, 0 replies; 17+ messages in thread
From: xenodasein--- via Emacs development discussions. @ 2022-01-03 18:31 UTC (permalink / raw)
  To: drew.adams; +Cc: emacs-devel

Jan 3, 2022, 20:55 by drew.adams@oracle.com:

>> > For problems:
>> >
>> https://urldefense.com/v3/__https://stackoverflow.com/questions/32693757/ema
>> cs-package-customization-and-
>> autoloads__;!!ACWV5N9M2RV99hQ!ch4K0byKujWHfMCY7DyWs5dx-
>> 3h5iPQestwjvN1CHmMk0tDfWAo_lOk7FaJddxMS$
>>
>> Sorry for nonfree link.  TLDR: Stefan mentions existence quirks and corner
>> cases on some interactions of autoloading and Customize.  Experto credite.
>>
>
> As I said, I answered the question posed at that link,
> there.
>

Oh, I've read it, didn't want to imply otherwise.  I sent the correction
for others.  I used emacs-devel as To:, did I make a mail mistake?


> What the user asking that question did was reasonable.
>
> Users can control the behavior.  If you put a defcustom
> sexp in an autoloads file, then you need to know, and
> perhaps pay attention to, when that file gets loaded.
>
> There's nothing mystical about this.  The behavior of
> a defcustom sexp, like any other Lisp code, can depend
> on code that's been previously evaluated (e.g. loaded).
>
> That applies to a defcustom that's autoloaded as much
> as to one that's loaded/evaluated in some other way.
>
> If a defcustom expects things to exist, or things to
> have happened already, when it's evaluated, then you
> need to make sure those things exist or have happened. 
>
> Stefan's advice to not autoload defcustom sexps is
> perfectly fine to follow.  It can also be fine to
> autoload some defcustoms - but in that case you of
> course need to pay attention to evaluation/load order
> etc.
>
> Emacs Lisp gives you plenty of rope to hang yourself
> with.  You're not obliged to hang yourself, however.
>

I stumbled upon that post when my hand got burned from messing with
manual packages, customize, and autoloads.  I understand your perspective,
but you're basically an Emacs legend.  For me this was yet another set
of pitfalls to dance around, caused by a package whose main purpose is
to make life easier for n00bs.




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [External] : Re: Have Customize always use `custom-file`
  2022-01-03 17:02     ` xenodasein--- via Emacs development discussions.
@ 2022-01-04  1:00       ` Po Lu
  2022-01-04  9:41         ` xenodasein--- via Emacs development discussions.
  0 siblings, 1 reply; 17+ messages in thread
From: Po Lu @ 2022-01-04  1:00 UTC (permalink / raw)
  To: xenodasein--- via Emacs development discussions.; +Cc: xenodasein

xenodasein--- via "Emacs development discussions." <emacs-devel@gnu.org>
writes:

> Sorry for nonfree link.  TLDR: Stefan mentions existence quirks and
> corner cases on some interactions of autoloading and Customize. 
> Experto credite.

What Stefan M said was that you should not autoload variables, which is
advice not specific to custom whatsoever.

Here is Stefan's entire reply for reference:

  As a general rule, you don't want to autoload variables.

  Yes, it's a known problem, and there's no really good solution to it
  (each solution I could come up with had its own set of
  bugs/misbehaviors), which is why all I can say is "don't autoload
  variables, please".

  Even in the case where it happens to do what you want, it's
  undesirable in my experience. It just has too many quirks and corner
  cases

Nowhere does he mention custom.




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [External] : Re: Have Customize always use `custom-file`
  2022-01-04  1:00       ` Po Lu
@ 2022-01-04  9:41         ` xenodasein--- via Emacs development discussions.
  2022-01-04  9:48           ` Po Lu
  0 siblings, 1 reply; 17+ messages in thread
From: xenodasein--- via Emacs development discussions. @ 2022-01-04  9:41 UTC (permalink / raw)
  To: luangruo; +Cc: emacs-devel

Jan 4, 2022, 04:00 by luangruo@yahoo.com:

> xenodasein--- via "Emacs development discussions." <emacs-devel@gnu.org>
> writes:
>
>> Sorry for nonfree link.  TLDR: Stefan mentions existence quirks and
>> corner cases on some interactions of autoloading and Customize. 
>> Experto credite.
>>
>
> What Stefan M said was that you should not autoload variables, which is
> advice not specific to custom whatsoever.
>
> Here is Stefan's entire reply for reference:
>
>  As a general rule, you don't want to autoload variables.
>
>  Yes, it's a known problem, and there's no really good solution to it
>  (each solution I could come up with had its own set of
>  bugs/misbehaviors), which is why all I can say is "don't autoload
>  variables, please".
>
>  Even in the case where it happens to do what you want, it's
>  undesirable in my experience. It just has too many quirks and corner
>  cases
>
> Nowhere does he mention custom.
>

What are you trying to say?




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [External] : Re: Have Customize always use `custom-file`
  2022-01-04  9:41         ` xenodasein--- via Emacs development discussions.
@ 2022-01-04  9:48           ` Po Lu
  2022-01-04 10:29             ` xenodasein--- via Emacs development discussions.
  0 siblings, 1 reply; 17+ messages in thread
From: Po Lu @ 2022-01-04  9:48 UTC (permalink / raw)
  To: xenodasein--- via Emacs development discussions.; +Cc: xenodasein

xenodasein--- via "Emacs development discussions." <emacs-devel@gnu.org>
writes:

>> What Stefan M said was that you should not autoload variables, which is
>> advice not specific to custom whatsoever.
>>
>> Here is Stefan's entire reply for reference:
>>
>>  As a general rule, you don't want to autoload variables.
>>
>>  Yes, it's a known problem, and there's no really good solution to it
>>  (each solution I could come up with had its own set of
>>  bugs/misbehaviors), which is why all I can say is "don't autoload
>>  variables, please".
>>
>>  Even in the case where it happens to do what you want, it's
>>  undesirable in my experience. It just has too many quirks and corner
>>  cases
>>
>> Nowhere does he mention custom.

> What are you trying to say?

I'm trying to say that Stefan did not say that custom specifically has
problems with autoloaded variables in his reply on StackOverflow.

What he instead said was that variables should not be autoloaded.



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [External] : Re: Have Customize always use `custom-file`
  2022-01-04  9:48           ` Po Lu
@ 2022-01-04 10:29             ` xenodasein--- via Emacs development discussions.
  2022-01-04 10:33               ` Po Lu
  2022-01-05  3:54               ` Richard Stallman
  0 siblings, 2 replies; 17+ messages in thread
From: xenodasein--- via Emacs development discussions. @ 2022-01-04 10:29 UTC (permalink / raw)
  To: luangruo; +Cc: emacs-devel

Jan 4, 2022, 12:48 by luangruo@yahoo.com:

> I'm trying to say that Stefan did not say that custom specifically has
> problems with autoloaded variables in his reply on StackOverflow.
>
> What he instead said was that variables should not be autoloaded.
>

I think what you are trying to say is that my  statement to which you
answered is false, but you are failing to contradict it.  If not, what are
you trying to achieve here?




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [External] : Re: Have Customize always use `custom-file`
  2022-01-04 10:29             ` xenodasein--- via Emacs development discussions.
@ 2022-01-04 10:33               ` Po Lu
  2022-01-04 10:44                 ` xenodasein--- via Emacs development discussions.
  2022-01-05  3:54               ` Richard Stallman
  1 sibling, 1 reply; 17+ messages in thread
From: Po Lu @ 2022-01-04 10:33 UTC (permalink / raw)
  To: xenodasein--- via Emacs development discussions.; +Cc: xenodasein

xenodasein--- via "Emacs development discussions." <emacs-devel@gnu.org>
writes:

> I think what you are trying to say is that my  statement to which you
> answered is false, but you are failing to contradict it.

I'll say this again: you were claiming that custom specifically has
problems with autoloads, citing Stefan's reply, where in fact he says
that variables should not be autoloaded without as much as a mention as
to custom.

Thanks.



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [External] : Re: Have Customize always use `custom-file`
  2022-01-04 10:33               ` Po Lu
@ 2022-01-04 10:44                 ` xenodasein--- via Emacs development discussions.
  2022-01-04 10:53                   ` Po Lu
  0 siblings, 1 reply; 17+ messages in thread
From: xenodasein--- via Emacs development discussions. @ 2022-01-04 10:44 UTC (permalink / raw)
  To: luangruo; +Cc: emacs-devel

Jan 4, 2022, 13:33 by luangruo@yahoo.com:

> xenodasein--- via "Emacs development discussions." <emacs-devel@gnu.org>
> writes:
>
>> I think what you are trying to say is that my  statement to which you
>> answered is false, but you are failing to contradict it.
>>
>
> I'll say this again: you were claiming that custom specifically has
> problems with autoloads, citing Stefan's reply, where in fact he says
> that variables should not be autoloaded without as much as a mention as
> to custom.
>
> Thanks.
>

If you read further, you will also see one thing mentioned, that can only occur
with a defcustom.  Here I quote what you are trying but failing to contradict:
"Stefan mentions existence quirks and corner cases on some interactions of
autoloading and Customize."

Anyway, this is pointless.  You are wasting everyone's time here and spamming
the list.




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [External] : Re: Have Customize always use `custom-file`
  2022-01-04 10:44                 ` xenodasein--- via Emacs development discussions.
@ 2022-01-04 10:53                   ` Po Lu
  0 siblings, 0 replies; 17+ messages in thread
From: Po Lu @ 2022-01-04 10:53 UTC (permalink / raw)
  To: xenodasein--- via Emacs development discussions.; +Cc: xenodasein

xenodasein--- via "Emacs development discussions." <emacs-devel@gnu.org>
writes:

> If you read further, you will also see one thing mentioned, that can
> only occur with a defcustom.  Here I quote what you are trying but
> failing to contradict: "Stefan mentions existence quirks and corner
> cases on some interactions of autoloading and Customize."

I don't see anything in Stefan's reply, so would you please show which
part you refer to?

defcustom is also used for almost every user option in Emacs, and is
completely unrelated to custom-set-variables for our purposes.

> Anyway, this is pointless.  You are wasting everyone's time here and
> spamming the list.

I'm not making accusations towards anyone, so I suggest you stop as
well.



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [External] : Re: Have Customize always use `custom-file`
  2022-01-04 10:29             ` xenodasein--- via Emacs development discussions.
  2022-01-04 10:33               ` Po Lu
@ 2022-01-05  3:54               ` Richard Stallman
  2022-01-05  5:35                 ` tomas
  1 sibling, 1 reply; 17+ messages in thread
From: Richard Stallman @ 2022-01-05  3:54 UTC (permalink / raw)
  To: xenodasein; +Cc: luangruo, emacs-devel

[[[ 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. ]]]

Would everyoone in this thread please take another look at
https://gnu.org/philosophy/kind-communication.html, and think about
stating your different views in kinder ways?

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





^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [External] : Re: Have Customize always use `custom-file`
  2022-01-05  3:54               ` Richard Stallman
@ 2022-01-05  5:35                 ` tomas
  2022-01-06  3:57                   ` Richard Stallman
  0 siblings, 1 reply; 17+ messages in thread
From: tomas @ 2022-01-05  5:35 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 681 bytes --]

On Tue, Jan 04, 2022 at 10:54:24PM -0500, 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. ]]]
> 
> Would everyoone in this thread please take another look at
> https://gnu.org/philosophy/kind-communication.html, and think about
> stating your different views in kinder ways?

Folks,

should I've gone over the top in any post (here or otherwise), please
tell me. On- or offline, at your choice.

It's definitely not my intention, and I would be very sorry.

Cheers
-- 
t

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [External] : Re: Have Customize always use `custom-file`
  2022-01-05  5:35                 ` tomas
@ 2022-01-06  3:57                   ` Richard Stallman
  0 siblings, 0 replies; 17+ messages in thread
From: Richard Stallman @ 2022-01-06  3:57 UTC (permalink / raw)
  To: tomas; +Cc: emacs-devel

[[[ 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. ]]]

  > should I've gone over the top in any post (here or otherwise), please
  > tell me. On- or offline, at your choice.

  > It's definitely not my intention, and I would be very sorry.

That's the right way to look at it.  We all make mistakes --
especially subtle mistakes in judgment.  But if we think about trying
to be kind, we will be kindER.


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





^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2022-01-06  3:57 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-03 16:15 Have Customize always use `custom-file` Drew Adams
2022-01-03 16:20 ` xenodasein--- via Emacs development discussions.
2022-01-03 16:28   ` [External] : " Drew Adams
2022-01-03 17:02     ` xenodasein--- via Emacs development discussions.
2022-01-04  1:00       ` Po Lu
2022-01-04  9:41         ` xenodasein--- via Emacs development discussions.
2022-01-04  9:48           ` Po Lu
2022-01-04 10:29             ` xenodasein--- via Emacs development discussions.
2022-01-04 10:33               ` Po Lu
2022-01-04 10:44                 ` xenodasein--- via Emacs development discussions.
2022-01-04 10:53                   ` Po Lu
2022-01-05  3:54               ` Richard Stallman
2022-01-05  5:35                 ` tomas
2022-01-06  3:57                   ` Richard Stallman
  -- strict thread matches above, loose matches on Subject: below --
2022-01-03 17:55 Drew Adams
2022-01-03 18:31 ` xenodasein--- via Emacs development discussions.
2022-01-03 16:13 Drew Adams

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).