[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#24999: closed (Re: bug#24999: 24.5; bad doc for invocation-directory

From: Eli Zaretskii
Subject: bug#24999: closed (Re: bug#24999: 24.5; bad doc for invocation-directory)
Date: Fri, 25 Nov 2016 15:27:01 +0200

> Date: Fri, 25 Nov 2016 09:44:00 +0100
> From: Francesco Potortì <address@hidden>
> Cc: address@hidden
> Now that I rethink of it.  I put this my .emacs:
> (setq start-directory (progn (set-buffer "*scratch*") default-directory))

What does this do when Emacs is invoked with "--chdir DIR"?

> and, while writing it, it struck me that "invocation-directory" should
> mean just that: the directory from which Emacs was invoked.  Maybe at
> some time in the past it was, or someone thought it should have been,
> which may explain the wrong docs in the Elisp manual.
> The current value of invocation-directory should be assigned to
> something like exec-directory, or executable-directory or something like
> that. 

No, it's too late to change the semantics of invocation-directory, it
has been with us in its present meaning far too long.  If you look at
how it's generated, you will understand: it starts with the value of
argv[0], there are fallbacks for when that doesn't include leading
directories (one of the fallbacks is to search PATH, for example).

Once again, Emacs knows its original current directory when it starts,
so exposing that to Lisp should be easy, if that is desired.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]