[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: |
Glenn Morris |
Subject: |
bug#18851: 24.4; emacs cannot be started if the current directory has been removed |
Date: |
Tue, 28 Oct 2014 17:34:59 -0400 |
User-agent: |
Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) |
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.
But then you run into the problem that `emacs -Q some-file' starts
editing ~/some-file instead of /some/deleted/dir/some-file. So it
probably still needs to throw an error and abort processing of any
command-line option that involves a non-absolute file name (eg `emacs -l
some-file' would also presumably do the wrong thing).
So is it worth it?
> My old bug report in the Debian BTS:
>
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=687171
IMO there's really no point reporting Emacs problems that aren't
specific to Debian (and this issues obviously isn't) to the Debian bug
tracker. They just sit there for some lengthy period of time, and only
if they get forwarded here does something happen. (Although I do look at
the Debian Emacs bug reports and had looked at that one.)
*** src/buffer.c 2014-10-04 08:20:24 +0000
--- src/buffer.c 2014-10-04 18:59:30 +0000
***************
*** 5299,5305 ****
pwd = get_current_dir_name ();
if (!pwd)
! fatal ("`get_current_dir_name' failed: %s\n", strerror (errno));
/* Maybe this should really use some standard subroutine
whose definition is filename syntax dependent. */
--- 5299,5315 ----
pwd = get_current_dir_name ();
if (!pwd)
! {
! fprintf (stderr, "Warning: `get_current_dir_name' failed: %s\n\
! Trying to change to home directory...\n", strerror (errno));
! if (getenv ("HOME"))
! {
! chdir (getenv ("HOME"));
! pwd = get_current_dir_name ();
! }
! if (!pwd)
! fatal ("`get_current_dir_name' failed: %s\n", strerror (errno));
! }
/* Maybe this should really use some standard subroutine
whose definition is filename syntax dependent. */
- bug#18851: 24.4; emacs cannot be started if the current directory has been removed, Vincent Lefevre, 2014/10/27
- bug#18851: 24.4; emacs cannot be started if the current directory has been removed,
Glenn Morris <=
- bug#18851: 24.4; emacs cannot be started if the current directory has been removed, Vincent Lefevre, 2014/10/28
- bug#18851: 24.4; emacs cannot be started if the current directory has been removed, Eli Zaretskii, 2014/10/28
- bug#18851: 24.4; emacs cannot be started if the current directory has been removed, Vincent Lefevre, 2014/10/29
- bug#18851: 24.4; emacs cannot be started if the current directory has been removed, Stefan Monnier, 2014/10/29
- bug#18851: 24.4; emacs cannot be started if the current directory has been removed, Eli Zaretskii, 2014/10/29
- bug#18851: 24.4; emacs cannot be started if the current directory has been removed, Vincent Lefevre, 2014/10/29
- bug#18851: 24.4; emacs cannot be started if the current directory has been removed, Eli Zaretskii, 2014/10/29
- bug#18851: 24.4; emacs cannot be started if the current directory has been removed, Vincent Lefevre, 2014/10/29
- bug#18851: 24.4; emacs cannot be started if the current directory has been removed, Andreas Schwab, 2014/10/29
- bug#18851: 24.4; emacs cannot be started if the current directory has been removed, Vincent Lefevre, 2014/10/29