[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: emacs.exe --load FILE and current directory on w32
From: |
Eli Zaretskii |
Subject: |
Re: emacs.exe --load FILE and current directory on w32 |
Date: |
Sun, 05 Jun 2005 08:26:46 +0300 |
> Date: Sat, 04 Jun 2005 23:58:24 +0200
> From: Lennart Borgman <address@hidden>
> Cc: address@hidden
>
> Richard Stallman wrote:
>
> > Info says that the startup argujment load looks in the current directory
> > for the file to load. That does not seem to be correct, at least not on
> > w32.
> >
> >Would you please provide a complete test case?
> >
> Yes, of course.
>
> *** If we have loadme.el:
> (message "I am loaded, thank you!")
> **********************
>
> This works:
>
> emacs.exe -batch -no-site-file -q somefile.txt -l loadme.el
> I am loaded, thank you!
>
> However when somefile.txt is in another directory then it fails:
>
> emacs.exe -batch -no-site-file -q ..\somefile.txt -l loadme.el
> Cannot open load file: loadme.el
I get the same behavior on GNU/Linux, both with the current CVS and
with Emacs 21.3.
I think Emacs always behaved like that. The manual is simplifying a
bit: you will see in startup.el that we try to find the file in the
_default_ directory; if we visited a file before processing -l, that
is no longer the current directory, but rather the directory of the
visited file. I'm not sure this subtlety needs to be documented,
except, perhaps in a footnote.