From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Ryde Newsgroups: gmane.emacs.bugs Subject: bug#2631: get-free-disk-space when default-directory doesn't exist Date: Tue, 17 Mar 2009 11:02:26 +1100 Message-ID: <877i2p9fu5.fsf@blah.blah> References: <87d4cjzf89.fsf@cyd.mit.edu> Reply-To: Kevin Ryde , 2631@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1237249445 12643 80.91.229.12 (17 Mar 2009 00:24:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 17 Mar 2009 00:24:05 +0000 (UTC) Cc: 2631@emacsbugs.donarmstrong.com To: Chong Yidong Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Mar 17 01:25:22 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LjN7O-0007sQ-WC for geb-bug-gnu-emacs@m.gmane.org; Tue, 17 Mar 2009 01:25:19 +0100 Original-Received: from localhost ([127.0.0.1]:57144 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LjN62-0002Og-Lv for geb-bug-gnu-emacs@m.gmane.org; Mon, 16 Mar 2009 20:23:54 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LjN5z-0002OR-98 for bug-gnu-emacs@gnu.org; Mon, 16 Mar 2009 20:23:51 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LjN5t-0002OD-KR for bug-gnu-emacs@gnu.org; Mon, 16 Mar 2009 20:23:49 -0400 Original-Received: from [199.232.76.173] (port=47146 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LjN5t-0002OA-Bt for bug-gnu-emacs@gnu.org; Mon, 16 Mar 2009 20:23:45 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:34310) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LjN5s-0007dW-Tt for bug-gnu-emacs@gnu.org; Mon, 16 Mar 2009 20:23:45 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n2H0NheE029324; Mon, 16 Mar 2009 17:23:43 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id n2H0A5Zl025913; Mon, 16 Mar 2009 17:10:05 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Kevin Ryde Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Tue, 17 Mar 2009 00:10:05 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 2631 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 2631-submit@emacsbugs.donarmstrong.com id=B2631.123724817323749 (code B ref 2631); Tue, 17 Mar 2009 00:10:05 +0000 Original-Received: (at 2631) by emacsbugs.donarmstrong.com; 17 Mar 2009 00:02:53 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from mailout1.pacific.net.au (mailout1-6.pacific.net.au [61.8.2.213]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n2H02nS8023743 for <2631@emacsbugs.donarmstrong.com>; Mon, 16 Mar 2009 17:02:51 -0700 Original-Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.2.162]) by mailout1.pacific.net.au (Postfix) with ESMTP id 39581455499; Tue, 17 Mar 2009 11:02:47 +1100 (EST) Original-Received: from blah.blah (ppp2309.dyn.pacific.net.au [61.8.35.9]) by mailproxy1.pacific.net.au (Postfix) with ESMTP id A052B8C29; Tue, 17 Mar 2009 11:02:46 +1100 (EST) Original-Received: from gg by blah.blah with local (Exim 4.69) (envelope-from ) id 1LjMlH-0001vM-5d; Tue, 17 Mar 2009 11:02:27 +1100 In-Reply-To: <87d4cjzf89.fsf@cyd.mit.edu> (Chong Yidong's message of "Sat, 14 Mar 2009 22:34:14 -0400") User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/22.2 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Mon, 16 Mar 2009 20:23:49 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:26409 Archived-At: --=-=-= Chong Yidong writes: > > default-directory to "~/" rather than "/" What is it that's not good about "/"? It doesn't have to be readable or anything I don't think, just somewhere capable of a chdir(). Wouldn't it be the only thing certain to work with chdir()? As I mentioned before there's other places using "/" for the same purpose if there's something wrong with it. Either way what I missed from my first post was that a change to default-directory ought to absolutize the given dir argument, so that say (get-free-disk-space ".") gives info about the original default-directory, not the mangled one. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=files.el.disk-space-expand.diff *** files.el 17 Mar 2009 10:35:50 +1100 1.1040 --- files.el 17 Mar 2009 10:53:40 +1100 *************** *** 5341,5346 **** --- 5341,5347 ---- (file-directory-p default-directory) (file-readable-p default-directory)) default-directory + (setq dir (expand-file-name dir)) (expand-file-name "~/")))) (eq (call-process directory-free-space-program nil t nil --=-=-=--