[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: default.el and version control
From: |
Jason Rumney |
Subject: |
Re: default.el and version control |
Date: |
Fri, 10 Aug 2012 20:25:58 -0700 (PDT) |
User-agent: |
G2/1.0 |
On Saturday, 11 August 2012 00:06:19 UTC+8, drain wrote:
> I'd like to do one of two things, though answers to both would be useful:
>
>
>
> (1) For Emacs to load default.el (containing basic configs), if one of my
>
> inits fails after an experiment
> But I want default.el to be ignored otherwise.
Choose a different filename such as "fallback.el". default.el is a standard
file for site defaults that is always loaded (unless you specify -q or
equivalent suppression options).
> Now I've scoured the web and
> I still don't understand what directory default.el must be in for the
> following command to work (which I added to one of the .el inits my .emacs
> is instructed to load):
> '(inhibit-default-init t)
(setq inhibit-default-init t) should work. The above by itself is not going to
do anything (but as part of a custom-set-variable it may work, depending on
when the customizations are applied - I recall there may be some delay until
after initialization that prevents this particular option from being effective
when set by customize)
> I tried copying default.el to usr/share/emacs23/site-lisp, I added that
> address to the .emacs load-path list, didn't work. default.el was not
> inhibited.
If it is loaded, it is in the right place.
> I'd like the .emacs to run default.el if one of the normal inits (eight of
>
> them collected into a directory) fail to initialize. I want to avoid
>
> bouncing back to vanilla Emacs settings every time an init mistake is made.
Try using condition-case around the section of your .emacs that loads these
files to catch the error.
> (2) Even better than relying on default.el, I'd like .emacs to load version
> controlled backups of these eight init files, going farther and farther back
> until loading without error.
This is more complex, but again, it should be possible to roll a
load-versioned-until-success function using condition-case.