all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: vincent@vinc17.net, 18851@debbugs.gnu.org
Subject: bug#18851: 24.4; emacs cannot be started if the current directory has been removed
Date: Wed, 29 Oct 2014 16:27:13 +0200	[thread overview]
Message-ID: <83r3xr0x4u.fsf@gnu.org> (raw)
In-Reply-To: <jwv7fzj9gwi.fsf-monnier+emacsbugs@gnu.org>

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: Eli Zaretskii <eliz@gnu.org>,  18851@debbugs.gnu.org
> Date: Wed, 29 Oct 2014 08:57:16 -0400
> 
> > The shell has no problems when the current directory has been
> > removed. It can still run without needing to switch to $HOME.
> 
> The problem is that the `emacs' process only access files using absolute
> file names (it basically doesn't use the process's current working
> directory, because every buffer has its own "current working
> directory"), so when the Emacs user thinks he's using a relative file
> name, Emacs really concatenates this relative file name to the value of
> `default-directory' and passes *that* to the OS.
> 
> So the current Emacs C code really has no way to access a directory/file
> which is not accessible from the root directory.

That's true, but my reading of the code is that the value of the
directory where Emacs was started is used for the following:

  . the default-directory of *scratch*
  . invocation-name and invocation-directory, if Emacs was invoked via
    a relative file name, like "../foo/bar/emacs".

In the first case, we could try using nil instead, maybe not all hell
will break lose.  The second case is rare even without the removal
(and makes no sense to me).

But I'd still like to hear the real-life use case behind this report.





  reply	other threads:[~2014-10-29 14:27 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-27 13:33 bug#18851: 24.4; emacs cannot be started if the current directory has been removed Vincent Lefevre
2014-10-28 21:34 ` Glenn Morris
2014-10-29  1:28   ` Vincent Lefevre
2014-10-29  3:50     ` Eli Zaretskii
2014-10-29  8:09       ` Vincent Lefevre
2014-10-29 12:57         ` Stefan Monnier
2014-10-29 14:27           ` Eli Zaretskii [this message]
2014-10-29 15:39             ` Vincent Lefevre
2014-10-29 16:07               ` Eli Zaretskii
2014-10-29 16:44                 ` Vincent Lefevre
2014-10-29 16:15               ` Andreas Schwab
2014-10-29 16:51                 ` Vincent Lefevre
2014-10-29 17:31                   ` Andreas Schwab
2014-10-29 17:45                     ` Vincent Lefevre
2014-10-29 18:23                       ` Ivan Shmakov
2014-10-29 21:11                         ` Andreas Schwab
2014-10-30  0:39               ` Stefan Monnier
2015-06-12  0:39                 ` Glenn Morris
2015-06-12  7:53                   ` Eli Zaretskii
2015-06-12 15:45                     ` Glenn Morris
2015-06-12 19:31                       ` Eli Zaretskii
2015-06-13  1:29                         ` Glenn Morris
2015-06-13  7:56                           ` Eli Zaretskii
2015-06-13 23:45                             ` Glenn Morris
2014-10-29 14:23         ` Eli Zaretskii
2014-10-29 15:39           ` Andreas Schwab
2014-10-29 16:00             ` Eli Zaretskii
2014-10-29 16:05           ` Vincent Lefevre
2014-10-29 16:21             ` Eli Zaretskii
2014-10-29  3:40   ` Eli Zaretskii
2014-10-29 10:57   ` Emacs bugs at the Debian BTS Ivan Shmakov

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=83r3xr0x4u.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=18851@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=vincent@vinc17.net \
    /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.