[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: relative load-file
From: |
Tassilo Horn |
Subject: |
Re: relative load-file |
Date: |
Wed, 11 Nov 2009 20:54:36 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) |
Rocky Bernstein <address@hidden> writes:
Hi Rocky,
> I don't see that this does what I need or meant to convey:
> one wants to load an Emacs Lisp file *relative [to] the* *[directory of
> the]* *file that issues the load *
>
> Here my test of the above suggestion..
>
> $ find /tmp/proj -type f -print -exec cat {} \;
> /tmp/proj/subdir/subload.el
> (load-file "../test1.el")
> /tmp/proj/test1.el
> (load-file "test3.el")
> /tmp/proj/test3.el
> (message "test3 here")
>
> Now inside emacs I edit /tmp/proj/subdir/subload.el, and M-x
> eval-current-buffer. I get:
>
> load-file: Cannot open load file: /tmp/proj/subdir/test3.el
>
> This is loading relative to the directory I started at,
> /tmp/proj/subdir, not relative to the directory that of the file that
> issued the load, /tmp/proj/test1.el.
I see. Well, generally those problems don't occur, because all elisp
projects I know put all the *.el files into one directory, and the files
are all named proj-xxx.el with one proj.el. This prefixing is kind of a
convention (not only for files, but vars and funs, too), because there
are no namspaces in elisp.
Emacs itself has some subdirs, but all of them are added to the
load-path. In both cases, the usual provide/require mechanics suffice.
Bye,
Tassilo
- relative load-file, Rocky Bernstein, 2009/11/11
- Re: relative load-file, Tassilo Horn, 2009/11/11
- Re: relative load-file, Rocky Bernstein, 2009/11/11
- Re: relative load-file,
Tassilo Horn <=
- Re: relative load-file, Stefan Monnier, 2009/11/11
- Re: relative load-file, Rocky Bernstein, 2009/11/11
- Re: relative load-file, Stefan Monnier, 2009/11/11
- Re: relative load-file, Rocky Bernstein, 2009/11/11
- Re: relative load-file, Stefan Monnier, 2009/11/11
- Re: relative load-file, Rocky Bernstein, 2009/11/11
- Re: relative load-file, Stefan Monnier, 2009/11/11
- Re: relative load-file, Rocky Bernstein, 2009/11/12
- Re: relative load-file, address@hidden, 2009/11/12
- Re: relative load-file, Andreas Schwab, 2009/11/12