unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: "xenodasein@tutanota.de" <xenodasein@tutanota.de>
Cc: "emacs-devel@gnu.org" <emacs-devel@gnu.org>
Subject: RE: FW: [External] : Re: Propose to add setup-wizard.el to ELPA
Date: Sun, 2 Jan 2022 21:29:57 +0000	[thread overview]
Message-ID: <SJ0PR10MB5488AF21FEB1065F673C7C21F3489@SJ0PR10MB5488.namprd10.prod.outlook.com> (raw)
In-Reply-To: <MsRB6uF--7-2@tutanota.de>

> >> Using customize-set-variable from Elisp is simply a hack, IIRC
> >> it has weird unwanted effects like when saving customizations
> >> from interface, it writes everything back into managed
> >> custom-set-variables.
> >
> > What you say there isn't too clear, to me.
> > `customize-set-variable' doesn't save...
> > Just what is the problem of saving option
> > and face settings to a particular place?
> >
> > Code written by code (when you say "save")
> > should be kept in its own place - separate
> > from code that users twiddle manually.
> > That's the purpose of variable `custom-file'.
> 
> When I used customize-set-variable to set some options,
> inside init.el, instead of setq, then used the interface to set
> some other options, and used the button saying "save for future
> sessions," not only options I set in the interface, but also the
> ones set before from init.el got written into the
> (custom-set-variables) form, effectively causing them to get
> duplicated and evaluated twice on the next start of Emacs.

Of course.  That's one reason I say that Customize
should not write to your init file.  That's the
problem behind your problem.  That's a bad Emacs
design choice, IMO.  It especially should not be
the default behavior.

Customize (whether UI or from any code) doesn't
interfere with any settings you yourself code
using its functions, provided either (1) you
don't code those in your init file or (2) you
use `custom-file', which prevents Customize
from writing to your init file.

While waiting (a few more decades perhaps?) for
Emacs to stop letting Customize write to your
init file, you can at least prevent the problem
you note by simply doing #1 or #2.  For #1, you
can just have your init file load some file
where you put such hand-crafted customize code.
For #2 you need just set variable `custom-file'
and load that file from your init file.

  reply	other threads:[~2022-01-02 21:29 UTC|newest]

Thread overview: 116+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-02  2:07 Propose to add setup-wizard.el to ELPA Yuan Fu
2022-01-02  2:37 ` Po Lu
2022-01-02  3:02   ` Yuan Fu
2022-01-02  3:22     ` Po Lu
2022-01-02  5:51       ` Yuan Fu
2022-01-02  6:30         ` Po Lu
2022-01-02  7:58           ` Yuan Fu
2022-01-02  8:07             ` Po Lu
2022-01-02  9:07               ` Yuan Fu
2022-01-02  9:22                 ` xenodasein--- via Emacs development discussions.
2022-01-02  9:45                   ` Eduardo Ochs
2022-01-02  9:45                   ` Po Lu
2022-01-02 10:09                     ` Eduardo Ochs
2022-01-02 10:15                       ` Po Lu
2022-01-02 10:25                         ` Eduardo Ochs
2022-01-02 10:34                           ` xenodasein--- via Emacs development discussions.
2022-01-02 10:52                             ` Eli Zaretskii
2022-01-02 10:57                               ` xenodasein--- via Emacs development discussions.
2022-01-02 11:14                                 ` Eli Zaretskii
2022-01-02 11:30                                   ` xenodasein--- via Emacs development discussions.
2022-01-02 11:38                                     ` Eli Zaretskii
2022-01-02 12:01                                     ` Po Lu
2022-01-02 11:31                                   ` xenodasein--- via Emacs development discussions.
     [not found]                             ` <CADs++6jtFBah1hhsuN6T_-kFyjc_pNmmVKA+16vOWa8OctOZLw@mail.gmail.com>
2022-01-02 11:02                               ` xenodasein--- via Emacs development discussions.
2022-01-02 11:17                             ` Po Lu
2022-01-02 11:36                               ` xenodasein--- via Emacs development discussions.
2022-01-02 12:03                                 ` Po Lu
2022-01-02 15:27                                 ` Stefan Kangas
     [not found]                               ` <MsPZqa9--3-2@tutanota.de-MsP_1xO----2>
2022-01-02 11:57                                 ` xenodasein--- via Emacs development discussions.
2022-01-02 12:05                                   ` Po Lu
2022-01-02 15:27                                   ` Stefan Kangas
2022-01-02 15:37                                     ` Eli Zaretskii
2022-01-02 16:43                                       ` xenodasein--- via Emacs development discussions.
2022-01-02 17:32                                         ` Stefan Kangas
2022-01-02 18:51                                         ` FW: [External] : " Drew Adams
2022-01-02 19:07                                           ` xenodasein--- via Emacs development discussions.
2022-01-02 21:29                                             ` Drew Adams [this message]
2022-01-02 22:14                                               ` Stefan Kangas
2022-01-03  6:42                                                 ` Sean Whitton
2022-01-03  7:02                                                   ` Stefan Kangas
2022-01-03  8:19                                                     ` xenodasein--- via Emacs development discussions.
2022-01-03  9:27                                                       ` Po Lu
2022-01-03  9:55                                                         ` xenodasein--- via Emacs development discussions.
2022-01-03 10:10                                                           ` Po Lu
2022-01-03 10:21                                                             ` xenodasein--- via Emacs development discussions.
2022-01-03 10:53                                                               ` Po Lu
2022-01-03 11:07                                                                 ` xenodasein--- via Emacs development discussions.
2022-01-03 11:25                                                                   ` Po Lu
2022-01-03 11:32                                                                     ` xenodasein--- via Emacs development discussions.
2022-01-03 12:13                                                                       ` Po Lu
2022-01-03 12:20                                                                         ` xenodasein--- via Emacs development discussions.
2022-01-03 12:32                                                                           ` Po Lu
2022-01-03 12:44                                                                             ` xenodasein--- via Emacs development discussions.
2022-01-03 12:55                                                                               ` Po Lu
2022-01-03 13:24                                                                                 ` xenodasein--- via Emacs development discussions.
2022-01-03 15:15                                                                                 ` xenodasein--- via Emacs development discussions.
2022-01-03 16:04                                                       ` Drew Adams
2022-01-04 21:19                                                     ` Sean Whitton
2022-01-04 21:28                                                       ` Drew Adams
2022-01-04 22:38                                                         ` Sean Whitton
2022-01-04 22:51                                                           ` Drew Adams
2022-01-05  5:28                                                         ` tomas
2022-01-05  7:43                                                           ` Drew Adams
2022-01-05  8:13                                                             ` tomas
2022-01-07 10:34                                                     ` Jean Louis
2022-01-03 16:03                                                   ` Drew Adams
2022-01-03 16:05                                                   ` Stefan Monnier
2022-01-04  1:50                                                     ` Yuan Fu
2022-01-04  2:53                                                       ` Po Lu
2022-01-04  4:13                                                       ` Stefan Monnier
2022-01-04  4:30                                                         ` Yuan Fu
2022-01-04  6:10                                                           ` Stefan Monnier
2022-01-04 15:04                                                       ` Lars Ingebrigtsen
2022-01-04 21:25                                                         ` Sean Whitton
2022-01-05  0:58                                                           ` Po Lu
2022-01-05 15:35                                                           ` Lars Ingebrigtsen
2022-01-06  6:32                                                             ` Sean Whitton
2022-01-03  0:42                                         ` Po Lu
2022-01-02 18:47                                       ` [External] : " Drew Adams
2022-01-02 11:58                             ` Philip Kaludercic
2022-01-07 10:09                     ` Jean Louis
2022-01-02 18:47                   ` [External] : " Drew Adams
2022-01-02  9:41                 ` Po Lu
2022-01-02 17:18                   ` Yuan Fu
2022-01-02 18:47                     ` [External] : " Drew Adams
2022-01-07 10:02               ` Jean Louis
2022-01-07 10:50                 ` Po Lu
2022-01-07 12:11                 ` Eli Zaretskii
2022-01-09 22:54                   ` Yuan Fu
2022-01-10  4:15                   ` Jean Louis
2022-01-10 15:45                     ` [External] : " Drew Adams
2022-01-10 17:24                     ` Eli Zaretskii
2022-01-11  4:47                       ` Jean Louis
2022-01-11  4:51                     ` Richard Stallman
2022-01-02  7:55 ` Eli Zaretskii
2022-01-02  8:07   ` Yuan Fu
2022-01-02 15:42     ` Stefan Kangas
2022-01-02 17:26       ` Yuan Fu
2022-01-02 17:36         ` xenodasein--- via Emacs development discussions.
     [not found]         ` <MsQrOAf--J-2@tutanota.de-MsQrQR2----2>
2022-01-02 17:55           ` xenodasein--- via Emacs development discussions.
2022-01-02 18:50         ` Stefan Kangas
2022-01-02 21:14           ` Yuan Fu
2022-01-03  0:45             ` Po Lu
2022-01-03  0:59               ` Yuan Fu
2022-01-03  1:02             ` Stefan Kangas
2022-01-03  9:12             ` Joost Kremers
2022-01-03 12:49               ` Eli Zaretskii
2022-01-03 13:00                 ` Po Lu
2022-01-03 19:30                 ` Joost Kremers
2022-01-02  8:07   ` Po Lu
2022-01-02 15:23     ` nanjunjie
2022-01-03  8:28       ` Philip Kaludercic
2022-01-04 16:09         ` Nan JunJie
2022-01-04 19:45           ` Philip Kaludercic
2022-01-02 12:02 ` Philip Kaludercic
2022-01-07  9:58 ` Jean Louis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=SJ0PR10MB5488AF21FEB1065F673C7C21F3489@SJ0PR10MB5488.namprd10.prod.outlook.com \
    --to=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    --cc=xenodasein@tutanota.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).