emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: user-controlled load-path extension: load-dir


From: Stephen J. Turnbull
Subject: Re: user-controlled load-path extension: load-dir
Date: Thu, 10 Mar 2011 02:29:02 +0900

Jan Djärv writes:

 > Christoph Scholtes skrev 2011-03-09 08.17:
 > > On 3/9/2011 12:06 AM, Jan D. wrote:
 > >
 > >> Another thing I really would like is for customize to
 > >> save its stuff in its own file and not in my .emacs. With a load-dir
 > >> this would be trivial.

 > > How about this:

 > > (setq custom-file "~/.emacs.d/init-custom.el")
 > > (load custom-file)

 > Yes, but this is missing the point.  I can make an load-dir feature
 > in .emacs too.  It is having this in emacs core, working without
 > extra user work that is the point.

Yeah, except that as proposed you'll have to enable it in the init
file anyway since it's off by default.

It's also not entirely trivial, as experience in XEmacs shows that the
decision about whether to load such things (specifically custom-file)
*before* or *after* the user init file is a delicate one.  I can only
imagine that a load-dir would very likely be the source of numerous
bugs as some snippets conflict with or depend on others but the
automatic loader gets them in the wrong order.

Note also that .d directories generally use some convention (such as
file names starting with fixed width integers) that ensure that
snippets sort in the right order.  More modern systems use (please sit
down, you're in for a shock) full-blown dependency systems (requires,
provides, conflicts, etc) in the snippets, which avoids the need to
maintain explicit order in favor of a partial order.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]