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 default-directory doesn't exist) Date: Sun, 15 Mar 2009 02:40:05 +0000 Message-ID: References: <87d4cjzf89.fsf@cyd.mit.edu> <87wsaxhv97.fsf@blah.blah> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----------=_1237084805-9137-0" X-Trace: ger.gmane.org 1237085052 30916 80.91.229.12 (15 Mar 2009 02:44:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 15 Mar 2009 02:44:12 +0000 (UTC) To: Chong Yidong Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Mar 15 03:45:29 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 1LigLw-0004hV-7Y for geb-bug-gnu-emacs@m.gmane.org; Sun, 15 Mar 2009 03:45:28 +0100 Original-Received: from localhost ([127.0.0.1]:55475 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LigKa-0004AQ-0X for geb-bug-gnu-emacs@m.gmane.org; Sat, 14 Mar 2009 22:44:04 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LigKN-00046k-1E for bug-gnu-emacs@gnu.org; Sat, 14 Mar 2009 22:43:51 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LigKH-00046I-Bv for bug-gnu-emacs@gnu.org; Sat, 14 Mar 2009 22:43:49 -0400 Original-Received: from [199.232.76.173] (port=60765 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LigKH-00046E-2w for bug-gnu-emacs@gnu.org; Sat, 14 Mar 2009 22:43:45 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:34368) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LigKG-0006fE-BJ for bug-gnu-emacs@gnu.org; Sat, 14 Mar 2009 22:43:44 -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 n2F2hgF2010395; Sat, 14 Mar 2009 19:43:42 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id n2F2e5nR009265; Sat, 14 Mar 2009 19:40:05 -0700 X-Mailer: MIME-tools 5.420 (Entity 5.420) X-Loop: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: closed 2631 X-Emacs-PR-Package: emacs X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) 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:26332 Archived-At: This is a multi-part message in MIME format... ------------=_1237084805-9137-0 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Your message dated Sat, 14 Mar 2009 22:34:14 -0400 with message-id <87d4cjzf89.fsf@cyd.mit.edu> and subject line Re: bug#2631: get-free-disk-space when default-directory d= oesn't exist has caused the Emacs bug report #2631, regarding get-free-disk-space when default-directory 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 ------------=_1237084805-9137-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)) --=-=-=-- ------------=_1237084805-9137-0 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 2631-done) by emacsbugs.donarmstrong.com; 15 Mar 2009 02:32:59 +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=-3.0 required=4.0 tests=HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 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.13.8/8.13.8/Debian-3) with ESMTP id n2F2Wuk0007749 for <2631-done@emacsbugs.donarmstrong.com>; Sat, 14 Mar 2009 19:32:57 -0700 Received: by cyd.mit.edu (Postfix, from userid 1000) id AFB9657E211; Sat, 14 Mar 2009 22:34:14 -0400 (EDT) From: Chong Yidong To: Stefan Monnier Cc: Kevin Ryde , Eli Zaretskii , 2631-done@emacsbugs.donarmstrong.com Subject: Re: bug#2631: get-free-disk-space when default-directory doesn't exist Date: Sat, 14 Mar 2009 22:34:14 -0400 Message-ID: <87d4cjzf89.fsf@cyd.mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Stefan Monnier wrote: > That would probably work OK, but why not bind default-directory to > dir? And even use process-file, while we're at it, so it has a chance > to work on Tramp. I don't think there's any chance to make get-free-disk-space to work on remote files without major surgery (it currently returns nil immediately if the file is remote). I've checked in a modified version of Kevin's patch, which sets default-directory to "~/" rather than "/", but only if the existing default-directory is not usable. ------------=_1237084805-9137-0--