[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Auto load at startup
From: |
Sébastien Kirche |
Subject: |
Auto load at startup |
Date: |
Mon, 13 Oct 2003 16:43:33 +0200 |
Hi,
for auto-loading elisp libraries at startup from a custom directory,
I though it was necessary to add something like
(add-to-list 'load-path "~/.my_elisp_dir/")
but it seems like emacs don't care of subdirs of my_elisp_dir.
Thus I have errors at startup if I add some
(require 'package)
if the named package is in a subdir.
But i put inside my_elisp_dir a file subdirs.el that *sould* have load
these packages ?
Also, i found the following in the emacswiki :
,----[ Including subdirectories ]
|
| By default Emacs doesn't include subdirectories of a directory
| which is added to load-path. But you can do it by issuing a command
| in startup file:
|
| (normal-top-level-add-subdirs-to-load-path)
|
| which will add all subdirs of current directory. Note: current
directory
| is not necessary that one, where your script is executed at the
moment.
| So you first need to change directory to required one:
|
| (progn (cd "~/elisp") (normal-top-level-add-subdirs-to-load-path))
|
| In this example assumed that you want to add all subdirs of ~/elisp
directory.
`----
I tried this tip that seems to work, but I would like to understand why
the subdirs.el fails/isn't sufficient.
Thanks for help
Sébastien Kirche
- Auto load at startup,
Sébastien Kirche <=