all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lennart Borgman <lennart.borgman.073@student.lu.se>
Cc: emacs-devel@gnu.org
Subject: Re: emacs.exe --load FILE and current directory on w32
Date: Sun, 05 Jun 2005 10:06:37 +0200	[thread overview]
Message-ID: <42A2B28D.8060508@student.lu.se> (raw)
In-Reply-To: <uslzx9xwp.fsf@gnu.org>

Eli Zaretskii wrote:

> 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.
>
Info says:

`-l FILE'
`--load=FILE'
     Load a Lisp library named FILE with the function `load'.  *Note
     Lisp Libraries::.  If FILE is not an absolute file name, the
     library can be found either in the current directory, or in the
     Emacs library search path as specified with `EMACSLOADPATH' (*note
     General Variables::).

I think "current directory" in this context must mean the current 
directory for the program starting Emacs.

I would say that the preffered way to work would be just that. The 
current behaviour is unexpected and confusing. load-library does not 
search Emacs current directory. Then why should the --load startup 
argument do that?

However what is preferred to do in this situation is another thing. 
Maybe just change it to something like:

     FILE is not an absolute file name, the library can be found either in
     Emacs current directory, or in the Emacs library search path as
     specified with `EMACSLOADPATH' (*note General Variables::).

     Note: Emacs current directory might be different from the current
     directory in the context where Emacs is invoked. This will be the
     case when for example a file to visit is found before --load on
     the command line.

But I think it is rather ugly and I do not know if it is correct. Must 
the file to visit be before --load? This subtle difficulties could be 
avoided if the behaviour was changed.

  reply	other threads:[~2005-06-05  8:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-03 17:58 emacs.exe --load FILE and current directory on w32 Lennart Borgman
2005-06-04 17:59 ` Richard Stallman
2005-06-04 21:58   ` Lennart Borgman
2005-06-05  5:26     ` Eli Zaretskii
2005-06-05  8:06       ` Lennart Borgman [this message]
2005-06-05 20:25       ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=42A2B28D.8060508@student.lu.se \
    --to=lennart.borgman.073@student.lu.se \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.