[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: elisp: isn't default-directory always the dir of current file??
From: |
Lennart Borgman |
Subject: |
Re: elisp: isn't default-directory always the dir of current file?? |
Date: |
Mon, 2 Mar 2009 11:32:06 +0100 |
On Mon, Mar 2, 2009 at 8:46 AM, Xah Lee <xahlee@gmail.com> wrote:
>> but that didn't. The following works though:
>> (add-to-list 'load-path (file-name-directory load-file-name))
>
> Ugh, this is quite painful. Spend 2+ hours on this.
>
> If i use this:
> (add-to-list 'load-path (file-name-directory load-file-name))
>
> it works if the file is loaded by elisp. But doesn't work if the file
> is run with eval-buffer.
Use buffer-file-name if load-file-name is nil.
Re: elisp: isn't default-directory always the dir of current file??, Alan Mackenzie, 2009/03/02