From: Eli Zaretskii <eliz@gnu.org>
To: Antoine Levitt <antoine.levitt@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: Shell commands in deleted directories
Date: Sun, 13 Feb 2011 23:13:11 +0200 [thread overview]
Message-ID: <83oc6fpriw.fsf@gnu.org> (raw)
In-Reply-To: <87d3mvir6d.fsf@gmail.com>
> From: Antoine Levitt <antoine.levitt@gmail.com>
> Date: Sun, 13 Feb 2011 22:02:34 +0100
>
> if (NILP (Ffile_accessible_directory_p (current_dir)))
> - report_file_error ("Setting current directory",
> - Fcons (current_buffer->directory, Qnil));
> + {
> + /* If current_dir is unreachable (typically, does not exist), use
> + ~/ as default */
> + current_dir = build_string ("~/");
> + current_dir = expand_and_dir_to_file (current_dir, Qnil);
> + current_dir = Ffile_name_as_directory (current_dir);
> + if (NILP (Ffile_accessible_directory_p (current_dir)))
> + {
> + report_file_error ("Setting current directory to ~/", Qnil);
> + }
> + }
And "who is watching the watchdog"? That is, what if "~" does not
exist, either?
next prev parent reply other threads:[~2011-02-13 21:13 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-13 21:02 Shell commands in deleted directories Antoine Levitt
2011-02-13 21:07 ` Paul Eggert
2011-02-13 21:21 ` Antoine Levitt
2011-02-13 21:34 ` Ted Zlatanov
2011-02-13 22:05 ` Antoine Levitt
2011-02-14 15:00 ` Ted Zlatanov
2011-02-13 21:13 ` Eli Zaretskii [this message]
2011-02-13 21:16 ` Antoine Levitt
2011-02-14 18:30 ` Stefan Monnier
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=83oc6fpriw.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=antoine.levitt@gmail.com \
--cc=emacs-devel@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.