From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: emacs.exe --load FILE and current directory on w32 Date: Sun, 05 Jun 2005 08:26:46 +0300 Message-ID: References: <42A09A56.3060705@student.lu.se> <42A22400.6090101@student.lu.se> Reply-To: Eli Zaretskii NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1117949054 1086 80.91.229.2 (5 Jun 2005 05:24:14 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 5 Jun 2005 05:24:14 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jun 05 07:24:13 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DencD-00066N-3a for ged-emacs-devel@m.gmane.org; Sun, 05 Jun 2005 07:24:05 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DeniF-0002nz-Ru for ged-emacs-devel@m.gmane.org; Sun, 05 Jun 2005 01:30:19 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Denhc-0002lo-C5 for emacs-devel@gnu.org; Sun, 05 Jun 2005 01:29:40 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Denhb-0002lO-Hg for emacs-devel@gnu.org; Sun, 05 Jun 2005 01:29:39 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Denhb-0002lE-BN for emacs-devel@gnu.org; Sun, 05 Jun 2005 01:29:39 -0400 Original-Received: from [192.114.186.24] (helo=legolas.inter.net.il) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Denhc-0007Ev-QT for emacs-devel@gnu.org; Sun, 05 Jun 2005 01:29:41 -0400 Original-Received: from HOME-C4E4A596F7 (IGLD-80-230-52-40.inter.net.il [80.230.52.40]) by legolas.inter.net.il (MOS 3.5.8-GR) with ESMTP id ENP72586 (AUTH halo1); Sun, 5 Jun 2005 08:26:43 +0300 (IDT) Original-To: Lennart Borgman In-reply-to: <42A22400.6090101@student.lu.se> (message from Lennart Borgman on Sat, 04 Jun 2005 23:58:24 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:38134 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:38134 > Date: Sat, 04 Jun 2005 23:58:24 +0200 > From: Lennart Borgman > Cc: emacs-devel@gnu.org > > 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.