From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Shell commands in deleted directories Date: Sun, 13 Feb 2011 23:13:11 +0200 Message-ID: <83oc6fpriw.fsf@gnu.org> References: <87d3mvir6d.fsf@gmail.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1297631637 22782 80.91.229.12 (13 Feb 2011 21:13:57 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 13 Feb 2011 21:13:57 +0000 (UTC) Cc: emacs-devel@gnu.org To: Antoine Levitt Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Feb 13 22:13:49 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PojGP-0001Rw-Ak for ged-emacs-devel@m.gmane.org; Sun, 13 Feb 2011 22:13:49 +0100 Original-Received: from localhost ([127.0.0.1]:52124 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PojGO-0007KR-Bz for ged-emacs-devel@m.gmane.org; Sun, 13 Feb 2011 16:13:48 -0500 Original-Received: from [140.186.70.92] (port=50575 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PojGF-0007I5-7M for emacs-devel@gnu.org; Sun, 13 Feb 2011 16:13:40 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PojGE-0005V9-4T for emacs-devel@gnu.org; Sun, 13 Feb 2011 16:13:38 -0500 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:60405) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PojGD-0005Ux-Nw for emacs-devel@gnu.org; Sun, 13 Feb 2011 16:13:38 -0500 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0LGK00C00QUS1H00@a-mtaout22.012.net.il> for emacs-devel@gnu.org; Sun, 13 Feb 2011 23:13:15 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([84.229.171.5]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LGK00AWDQXZI7F0@a-mtaout22.012.net.il>; Sun, 13 Feb 2011 23:13:12 +0200 (IST) In-reply-to: <87d3mvir6d.fsf@gmail.com> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 80.179.55.172 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:135973 Archived-At: > From: Antoine Levitt > 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?