GNU bug report logs -
#24999
24.5; bad doc for invocation-directory
Previous Next
Reported by: Francesco Potortì <pot <at> gnu.org>
Date: Wed, 23 Nov 2016 10:25:02 UTC
Severity: minor
Found in version 24.5
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #28 received at 24999 <at> debbugs.gnu.org (full text, mbox):
>> >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.
This bug report was last modified 8 years and 242 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.