unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Stephen J. Turnbull" <stephen@xemacs.org>
To: Evans Winner <ego111@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: `custom-file' and init-file [was: user-controlled load-path extension: load-dir]
Date: Thu, 10 Mar 2011 11:52:28 +0900	[thread overview]
Message-ID: <87ipvry9eb.fsf@uwakimon.sk.tsukuba.ac.jp> (raw)
In-Reply-To: <87y64oouuf.fsf@gmail.com>

Evans Winner writes:

 > Out of curiosity, would this complicate the process of Emacs
 > installation?

That depends on whether the recommendation to use a separate
custom-file is strong enough to put in an automatic "migration"
process.  XEmacs did that; many users went to the trouble of
acknowledging its convenience, but other users suffered data loss
while converting .emacs to XEmacs conventions.  That said, such data
loss is rather unlikely for Emacs users (the problem occurs if the
init file signals while loading; this is unlikely in Emacs -- few
users mess with installing a new Emacs while their .emacs is
non-working! -- but is somewhat likely if you load an .emacs designed
for Emacs into XEmacs).

 > Is the idea that the first time a user runs
 > Emacs, it checks to see if there is a .emacs in (getenv
 > "HOME"), and if not, creates it?

In Drew's scheme, that would probably be the way to go.  (This is very
safe compared to "migrating" an existing .emacs.)  In the XEmacs
scheme (which normally loads custom-file after the init file), it's
unnecessary.

 > Would that complicate things for system administrators?

Slightly.  Probably not a big deal though.  The .emacs file is
explicitly for users to customize, so system administrators should not
count on it being present or on it containing particular code.  That's
what the site init and default files are for.

 > The result, and I can't be alone in this, is that I make the
 > call to load the custom file at the beginning of my .emacs,
 > so that if I happen to have defined something twice by
 > mistake (or because I am too lazy to fix it) the result will
 > be whatever I have defined in my .emacs.

This requires a bit of extra one-time effort in the XEmacs scheme
(which implicitly loads custom-file after the init file).  We consider
it worth it because of the convenience and transparency of the process
for almost all users.

Since the snippet used is entirely generic, it could be wrapped up in
a function `load-custom-file-now' or similar.



  parent reply	other threads:[~2011-03-10  2:52 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-01 20:32 user-controlled load-path extension: load-dir Ted Zlatanov
2011-03-03 21:07 ` Dimitri Fontaine
2011-03-04  9:55   ` Julien Danjou
2011-03-04 17:18     ` Tom Tromey
2011-03-04 18:04       ` Ted Zlatanov
2011-03-04 18:37       ` Dimitri Fontaine
2011-03-04 19:35         ` Tom Tromey
2011-03-04 19:45           ` Dimitri Fontaine
2011-03-04 19:54             ` Ted Zlatanov
2011-03-04 20:21               ` Dimitri Fontaine
2011-03-04 20:25               ` Chad Brown
2011-03-04 20:46                 ` Ted Zlatanov
2011-03-05 19:24                   ` Chad Brown
2011-03-04 20:26               ` Chad Brown
2011-03-04 20:08             ` Tom Tromey
2011-03-04 20:24               ` Dimitri Fontaine
2011-03-04 21:17                 ` Tom Tromey
2011-03-04 21:33                   ` Dimitri Fontaine
2011-03-04 21:37                     ` Tom Tromey
2011-03-05  3:18                     ` Ted Zlatanov
2011-03-05 19:11                       ` Chad Brown
2011-03-06  7:21                       ` Mike Mattie
2011-03-07 16:24                         ` Ted Zlatanov
2011-03-07 17:18                           ` Chad Brown
2011-03-07 17:59                             ` Ted Zlatanov
2011-03-08 17:36                             ` Dimitri Fontaine
2011-03-08 18:30                               ` Chad Brown
2011-03-07 17:52                           ` Stefan Monnier
2011-03-07 20:39                             ` PJ Weisberg
2011-03-08  2:46                               ` Stefan Monnier
2011-03-08 10:26                                 ` Ted Zlatanov
2011-03-08 17:14                                   ` Chong Yidong
2011-03-08 18:47                                     ` Ted Zlatanov
2011-03-08 19:23                                       ` Julien Danjou
2011-03-09  2:54                                         ` Stefan Monnier
2011-03-09 19:57                                           ` Chong Yidong
2011-03-08 20:59                                   ` Stefan Monnier
2011-03-08 21:38                                     ` Ted Zlatanov
2011-03-09  7:06                                       ` Jan D.
2011-03-09  7:17                                         ` Christoph Scholtes
2011-03-09 10:01                                           ` Jan Djärv
2011-03-09 15:42                                             ` `custom-file' and init-file [was: user-controlled load-path extension: load-dir] Drew Adams
2011-03-09 17:54                                               ` `custom-file' and init-file Stephen J. Turnbull
2011-03-09 21:19                                               ` `custom-file' and init-file [was: user-controlled load-path extension: load-dir] Evans Winner
2011-03-09 21:39                                                 ` `custom-file' and init-file [was: user-controlled load-pathextension: load-dir] Drew Adams
2011-03-10  2:52                                                 ` Stephen J. Turnbull [this message]
2011-03-09 17:29                                             ` user-controlled load-path extension: load-dir Stephen J. Turnbull
2011-03-09 18:18                                               ` Ted Zlatanov
2011-03-09 19:33                                                 ` Stephen J. Turnbull
2011-03-09 19:57                                                   ` Ted Zlatanov
2011-03-10  3:20                                                     ` Stephen J. Turnbull
2011-03-10  5:01                                                       ` Ted Zlatanov
2011-03-10  7:08                                                         ` Stephen J. Turnbull
2011-03-10 13:15                                                           ` Ted Zlatanov
2011-03-11  2:10                                                             ` Stephen J. Turnbull
2011-03-09 21:57                                         ` Mike Mattie
2011-03-10  7:08                                           ` Jan Djärv
2011-03-09  6:03                                   ` Mike Mattie
2011-03-09  7:20                                     ` Jan D.
2011-03-09 23:44                                       ` Mike Mattie
2011-03-08  0:47                           ` Mike Mattie
2011-03-08 10:37                             ` Ted Zlatanov
2011-03-09  6:26                               ` Mike Mattie
2011-03-09 11:26                                 ` Ted Zlatanov

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=87ipvry9eb.fsf@uwakimon.sk.tsukuba.ac.jp \
    --to=stephen@xemacs.org \
    --cc=ego111@gmail.com \
    --cc=emacs-devel@gnu.org \
    /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).