From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: owner@emacsbugs.donarmstrong.com (Emacs bug Tracking System) Newsgroups: gmane.emacs.bugs Subject: bug#2631: marked as done (get-free-disk-space when home dir also doesn't exist) Date: Sun, 16 Aug 2009 00:40:11 +0000 Message-ID: References: <871vnclhoz.fsf@cyd.mit.edu> <87wsaxhv97.fsf@blah.blah> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----------=_1250383211-19695-0" X-Trace: ger.gmane.org 1250383642 32505 80.91.229.12 (16 Aug 2009 00:47:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 16 Aug 2009 00:47:22 +0000 (UTC) To: Chong Yidong Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Aug 16 02:47:15 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 1McTty-0006jI-PX for geb-bug-gnu-emacs@m.gmane.org; Sun, 16 Aug 2009 02:47:15 +0200 Original-Received: from localhost ([127.0.0.1]:46856 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1McTty-0002Yh-1M for geb-bug-gnu-emacs@m.gmane.org; Sat, 15 Aug 2009 20:47:14 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1McTti-0002UE-Mj for bug-gnu-emacs@gnu.org; Sat, 15 Aug 2009 20:46:58 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1McTte-0002Tk-2u for bug-gnu-emacs@gnu.org; Sat, 15 Aug 2009 20:46:58 -0400 Original-Received: from [199.232.76.173] (port=49164 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1McTtd-0002TJ-G9 for bug-gnu-emacs@gnu.org; Sat, 15 Aug 2009 20:46:53 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:41812) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1McTtc-0004jF-Kt for bug-gnu-emacs@gnu.org; Sat, 15 Aug 2009 20:46:53 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7G0knTd020783; Sat, 15 Aug 2009 17:46:50 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n7G0eBZe019748; Sat, 15 Aug 2009 17:40:11 -0700 X-Mailer: MIME-tools 5.427 (Entity 5.427) X-Loop: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: closed 2631 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: patch X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) 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:30250 Archived-At: This is a multi-part message in MIME format... ------------=_1250383211-19695-0 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Your message dated Sat, 15 Aug 2009 20:34:52 -0400 with message-id <871vnclhoz.fsf@cyd.mit.edu> and subject line Re: get-free-disk-space when default-directory doesn't exi= st has caused the Emacs bug report #2631, regarding get-free-disk-space when home dir also doesn't exist to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact owner@emacsbugs.donarmstrong.com immediately.) --=20 2631: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=3D2631 Emacs Bug Tracking System Contact owner@emacsbugs.donarmstrong.com with problems ------------=_1250383211-19695-0 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by emacsbugs.donarmstrong.com; 10 Mar 2009 22:24:46 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=0.1 required=4.0 tests=FOURLA autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n2AMOfL0028789 for ; Tue, 10 Mar 2009 15:24:43 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LhANN-0007jw-Lp for bug-gnu-emacs@gnu.org; Tue, 10 Mar 2009 18:24:41 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LhANN-0007j3-0I for bug-gnu-emacs@gnu.org; Tue, 10 Mar 2009 18:24:41 -0400 Received: from [199.232.76.173] (port=53023 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LhANM-0007is-OR for bug-gnu-emacs@gnu.org; Tue, 10 Mar 2009 18:24:40 -0400 Received: from mailout2-2.pacific.net.au ([61.8.2.225]:37345 helo=mailout2.pacific.net.au) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LhANL-0005Kb-Rb for bug-gnu-emacs@gnu.org; Tue, 10 Mar 2009 18:24:40 -0400 Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.2.163]) by mailout2.pacific.net.au (Postfix) with ESMTP id 020581B3FB0 for ; Wed, 11 Mar 2009 09:24:30 +1100 (EST) Received: from blah.blah (ppp26D7.dyn.pacific.net.au [61.8.38.215]) by mailproxy2.pacific.net.au (Postfix) with ESMTP id 0D4C027431 for ; Wed, 11 Mar 2009 09:24:28 +1100 (EST) Received: from gg by blah.blah with local (Exim 4.69) (envelope-from ) id 1LhAMn-0005hd-Kd for bug-gnu-emacs@gnu.org; Wed, 11 Mar 2009 09:24:05 +1100 From: Kevin Ryde To: bug-gnu-emacs@gnu.org Subject: get-free-disk-space when default-directory doesn't exist Date: Wed, 11 Mar 2009 09:24:04 +1100 Message-ID: <87wsaxhv97.fsf@blah.blah> User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) --=-=-= Evaluating (with-temp-buffer (setq default-directory "/no/such/dir") (get-free-disk-space "/tmp")) gets an error (file-error "Setting current directory" "no such file or directory" "/no/such/dir") where I hoped it wouldn't care about default-directory, only the given directory argument. Perhaps a let-bind per below. In GNU Emacs 22.2.1 (i486-pc-linux-gnu, GTK+ Version 2.12.11) of 2008-11-10 on raven, modified by Debian configured using `configure '--build=i486-linux-gnu' '--host=i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs22:/etc/emacs:/usr/local/share/emacs/22.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/22.2/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/22.2/leim' '--with-x=yes' '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars' 'build_alias=i486-linux-gnu' 'host_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -g -O2' 'LDFLAGS=-g' 'CPPFLAGS='' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_AU locale-coding-system: iso-8859-1 default-enable-multibyte-characters: t --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=files.el.free-space.diff *** files.el 11 Mar 2009 08:46:04 +1100 1.1038 --- files.el 11 Mar 2009 09:14:14 +1100 *************** *** 5336,5345 **** (save-match-data (with-temp-buffer (when (and directory-free-space-program ! (eq 0 (call-process directory-free-space-program ! nil t nil ! directory-free-space-args ! dir))) ;; Usual format is a header line followed by a line of ;; numbers. (goto-char (point-min)) --- 5336,5346 ---- (save-match-data (with-temp-buffer (when (and directory-free-space-program ! (let ((default-directory "/")) ! (eq 0 (call-process directory-free-space-program ! nil t nil ! directory-free-space-args ! dir)))) ;; Usual format is a header line followed by a line of ;; numbers. (goto-char (point-min)) --=-=-=-- ------------=_1250383211-19695-0 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 2631-done) by emacsbugs.donarmstrong.com; 16 Aug 2009 00:33:55 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-1.6 required=4.0 tests=AWL autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from cyd.mit.edu (CYD.MIT.EDU [18.115.2.24]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7G0XrPo018728; Sat, 15 Aug 2009 17:33:54 -0700 Received: by cyd.mit.edu (Postfix, from userid 1000) id 69DA657E21C; Sat, 15 Aug 2009 20:34:52 -0400 (EDT) From: Chong Yidong To: Kevin Ryde Cc: 2631-done@emacsbugs.donarmstrong.com, 3911-done@emacsbugs.donarmstrong.com Subject: Re: get-free-disk-space when default-directory doesn't exist Date: Sat, 15 Aug 2009 20:34:52 -0400 Message-ID: <871vnclhoz.fsf@cyd.mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii > 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()... If > both default-directory and home directory both don't exist > get-free-disk-space still gets an error You're right; it's probably better to fall back on / instead of ~. I've just checked in your suggested change. > (let ((default-directory "/no/such/dir")) > (get-free-disk-space ".")) > => 3705637 I checked in your suggestion to do expand-file-name before changing the default-directory, as well. Thanks. ------------=_1250383211-19695-0--