unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Kaushal Modi <kaushal.modi@gmail.com>,
	David Reitter <david.reitter@gmail.com>
Cc: Bruce Connor <bruce.connor.am@gmail.com>,
	Emacs developers <emacs-devel@gnu.org>
Subject: RE: Customizable modes and package.el
Date: Sat, 7 Nov 2015 20:33:29 -0800 (PST)	[thread overview]
Message-ID: <0785150e-447a-4a1d-b785-624f8eb1a5b4@default> (raw)
In-Reply-To: <CAFyQvY2Q5rtyW99NCDDoiH8SY_ohNaAmWw_+vFJVhVyMUNRWgA@mail.gmail.com>

> I also concur that emacs should not try to modify the user's init file.

+1.

Customize can modify `custom-file'.  `bookmark.el' can modify
a user's bookmarks file(s).  `desktop.el' can modify a user's
desktop file(s).  `package.el' can modify package-related files...

But programmatic changes should not diddle with a user's init file.

The way things are now (still), such diddling is the default
behavior for Customize.  Shame.

To prevent this, a user needs to create and load a `custom-file'.

And s?he won't even find out about this possibility without
diving into the depths of the Customize section of the Emacs
manual.  Looking at node `Init File' won't give a clue about
this safer and more sane possibility.

My guess is that relatively few Emacs users have a `custom-file'.
Most just let Customize write to their init files (if they use
Customize at all).  That's not good.

Imagine if `bookmark.el', `desktop.el', and all the rest
wrote all of their Lisp code directly to a users init file!
It's high time that Customize learned to behave the same way.

Yes, this would mean that users would need to load their
`custom-file' somewhere in their init file.  And yes, just
where they choose to do that in the init file can make a
difference.  And yes, there are different use cases - it
is not as simple as always loading it first or last.

A start would be for the manual to encourage using a
`custom-file', in its discussion of init files.  And it
wouldn't hurt to include a simple example of defining it
and loading it in an init file.  A user doesn't have to
be an expert in all the intricacies of Customize to learn
how to define and load a `custom-file'.

[There should also perhaps be some mention of the possibly
confusing fact that `custom-file' is itself a user option,
i.e., something managed by Customize!  Clearly it is a
special option, in that you cannot depend on it becoming
properly defined by loading the file that defines it!]



  reply	other threads:[~2015-11-08  4:33 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-28  8:58 Customizable modes and package.el Sebastian Wiesner
2015-03-28  9:30 ` Philipp Stephani
2015-03-28 12:26 ` Stefan Monnier
2015-03-28 14:59   ` Sebastian Wiesner
2015-03-28 17:55     ` Artur Malabarba
2015-03-28 20:42       ` Stefan Monnier
2015-03-29 14:48         ` Artur Malabarba
2015-03-30  0:41           ` Stefan Monnier
2015-03-30  7:05             ` Artur Malabarba
2015-03-30 13:39               ` Stefan Monnier
2015-03-30 14:31                 ` Artur Malabarba
2015-03-30 14:55                   ` Robert Pluim
2015-03-30 16:07                     ` Artur Malabarba
2015-03-30 17:09                       ` Drew Adams
2015-03-30 17:28                     ` Stefan Monnier
2015-11-08  3:26                       ` David Reitter
2015-11-08  3:43                         ` Kaushal Modi
2015-11-08  4:33                           ` Drew Adams [this message]
2015-11-08 10:48                         ` Artur Malabarba
2015-11-08 10:50                           ` Artur Malabarba
2015-03-30 17:45               ` Achim Gratz
2015-04-18  1:52                 ` Ted Zlatanov
2015-04-18  4:30                   ` Stefan Monnier
2015-04-18  4:46                   ` Artur Malabarba
2015-03-30 19:06             ` Artur Malabarba
2015-03-30 20:36               ` Stefan Monnier
2015-03-31 20:14                 ` João Távora
  -- strict thread matches above, loose matches on Subject: below --
2015-04-18  8:36 Richard Y. Kim

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=0785150e-447a-4a1d-b785-624f8eb1a5b4@default \
    --to=drew.adams@oracle.com \
    --cc=bruce.connor.am@gmail.com \
    --cc=david.reitter@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=kaushal.modi@gmail.com \
    /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).