all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Francesco Potortì" <pot@gnu.org>
Cc: 24999@debbugs.gnu.org
Subject: bug#24999: closed (Re: bug#24999: 24.5; bad doc for invocation-directory)
Date: Fri, 25 Nov 2016 15:27:01 +0200	[thread overview]
Message-ID: <834m2v4rmi.fsf@gnu.org> (raw)
In-Reply-To: <E1cAC6y-00048U-SC@tucano.isti.cnr.it> (message from Francesco Potortì on Fri, 25 Nov 2016 09:44:00 +0100)

> Date: Fri, 25 Nov 2016 09:44:00 +0100
> From: Francesco Potortì <pot@gnu.org>
> Cc: 24999@debbugs.gnu.org
> 
> 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	other threads:[~2016-11-25 13:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-23 10:23 bug#24999: 24.5; bad doc for invocation-directory Francesco Potortì
2016-11-24 17:23 ` Eli Zaretskii
     [not found] ` <handler.24999.D24999.148000823832450.notifdone@debbugs.gnu.org>
2016-11-24 17:45   ` bug#24999: closed (Re: bug#24999: 24.5; bad doc for invocation-directory) Francesco Potortì
2016-11-24 17:53     ` Eli Zaretskii
2016-11-24 18:02       ` Eli Zaretskii
2016-11-24 18:08         ` Francesco Potortì
2016-11-24 18:19           ` Eli Zaretskii
2016-11-25  8:44       ` Francesco Potortì
2016-11-25 13:27         ` Eli Zaretskii [this message]
2016-11-26  1:07           ` Richard Stallman
2016-11-26  7:20             ` Eli Zaretskii
2016-11-26  1:07         ` 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=834m2v4rmi.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=24999@debbugs.gnu.org \
    --cc=pot@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.