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

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

bug#18851: 24.4; emacs cannot be started if the current directory has be


From: Vincent Lefevre
Subject: bug#18851: 24.4; emacs cannot be started if the current directory has been removed
Date: Wed, 29 Oct 2014 02:28:02 +0100
User-agent: Mutt/1.5.23-6365-vl-r59709 (2014-09-07)

On 2014-10-28 17:34:59 -0400, Glenn Morris wrote:
> Vincent Lefevre wrote:
> 
> > Emacs cannot be started if the current directory has been removed:
> 
> It's easy to change that so that it switches to HOME instead (let's not
> worry about the case of HOME being missing too!); see patch at end.

Is there any reason to switch to another directory? Why doesn't
Emacs just ignore that the current directory has been removed
(and report errors only when an access to it is really needed)?
Note that the current directory can also be removed after Emacs
is started, so I expect that Emacs already supports cases like
that.

In the init_buffer() function, it seems that pwd is used only for:

  bset_directory (current_buffer, make_unibyte_string (pwd, len));

If the current directory has been removed, couldn't Qnil be used
(or, if not possible, ".")?

Note: this is the first time (well, almost) I look at the Emacs
C source.

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)





reply via email to

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