bug-gnu-emacs
[Top][All Lists]
Advanced

[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: Francesco Potortì
Subject: bug#24999: closed (Re: bug#24999: 24.5; bad doc for invocation-directory)
Date: Fri, 25 Nov 2016 09:44:00 +0100

>> >The only way I found for obtaining the directory from which
>> >Emacs was invoked is to get the default-directory of the *scratch*
>> >buffer.
>> 
>> Can this be considered as a bug?  Or at least a wishlist?  Having a
>> variable that contains the invocation directory?
>
>IMO it's not meaningful in Emacs to ask which directory was the
>"current" when Emacs started.  That's because Emacs pretends the
>current directory is different for every buffer.

Now that I rethink of it.  I put this my .emacs:

(setq start-directory (progn (set-buffer "*scratch*") default-directory))

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. 





reply via email to

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