[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: An alternative to a monolithic ~/.emacs init file
From: |
rustom |
Subject: |
Re: An alternative to a monolithic ~/.emacs init file |
Date: |
Sat, 10 Nov 2007 12:18:19 -0000 |
User-agent: |
G2/1.0 |
Thanks Sebastian for a detailed response. But I cant see how it will
work. Let me try and collect the pieces of the jigsaw as I understand
them.
Firstly the organization
On Nov 9, 7:18 pm, Sebastian Tennant <seb...@smolny.plus.com> wrote:
> With this arrangement, library functions I've written that I don't always
> want to load at startup, but I do want to have
> to hand, go in ~/elisp/lib, and customisations (and functions I do always
> want to load at startup) go in
> ~/elisp/dotemacs.
Second the scales:
Lets assume that elisp/lib contains thousands of lines of lisp
distilled into say about 10 autoloads and a few customizations. In
general the user is never expected to use the 10 autoloads together.
Now the call: (apply 'update-directory-autoloads '("~/elisp/lib"))
or (update-directory-autoloads "~/elisp/lib")
will traverse the whole lib file-set -- all the thousands of lines --
at startup losing the advantage of autoloading.
For using an elisp module let us say foo I guess we need the following
three phases:
Phase 1 (To be run only when foo is added to elisp/lib) Run update-
file-autloads and generate the autoloads into loaddefs.el in elisp/lib/
foo
Phase 2. Add a set of user customizations (called say
customizations.el) to elisp/lib/foo [Also one-time like the above]
Phase 3. In .emacs -- run on emacs startup -- Have a function say load-
loaddefs-from-directory that goes through each subdirectory in lib,
finds all files called loaddefs.el and loads them.
This way the .emacs can be nothing more than the two lines
(load-loaddefs-from-directory "~/elisp/lib")
(load-customizations-from-directory "~/elisp/lib")
And there are no superfluous file traversals at emacs startup time
Knowing emacs and its community I guess this functionality is already
available!
Question is what is it called :-)
- Re: An alternative to a monolithic ~/.emacs init file, rustom, 2007/11/07
- Re: An alternative to a monolithic ~/.emacs init file, Sebastian Tennant, 2007/11/08
- Message not available
- Re: An alternative to a monolithic ~/.emacs init file, rustom, 2007/11/08
- Re: An alternative to a monolithic ~/.emacs init file, Sebastian Tennant, 2007/11/09
- Message not available
- Re: An alternative to a monolithic ~/.emacs init file,
rustom <=
- Re: An alternative to a monolithic ~/.emacs init file, Tom Tromey, 2007/11/10
- Message not available
- Re: An alternative to a monolithic ~/.emacs init file, rustom, 2007/11/11
- Re: An alternative to a monolithic ~/.emacs init file, Tim X, 2007/11/12
- Re: An alternative to a monolithic ~/.emacs init file, rustom, 2007/11/12
- Re: An alternative to a monolithic ~/.emacs init file, Tim X, 2007/11/13
- Re: An alternative to a monolithic ~/.emacs init file, rustom, 2007/11/13
- Message not available
- Re: An alternative to a monolithic ~/.emacs init file, rustom, 2007/11/12
- Re: An alternative to a monolithic ~/.emacs init file, Francisco Miguel Colaço, 2007/11/10