From: Glenn Morris <rgm@gnu.org>
To: Vincent Lefevre <vincent@vinc17.net>
Cc: 18851@debbugs.gnu.org
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 [thread overview]
Message-ID: <8k61f398u4.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <87h9ypiqmm.fsf@xvii.vinc17.org> (Vincent Lefevre's message of "Mon, 27 Oct 2014 14:33:37 +0100")
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. */
next prev parent reply other threads:[~2014-10-28 21:34 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 [this message]
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
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=8k61f398u4.fsf@fencepost.gnu.org \
--to=rgm@gnu.org \
--cc=18851@debbugs.gnu.org \
--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.