From gg@zip.com.au Thu Jul 23 15:21:29 2009 Received: (at submit) by emacsbugs.donarmstrong.com; 23 Jul 2009 22:21:30 +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.5 required=4.0 tests=AWL,FOURLA autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n6NMLOj5007682 for ; Thu, 23 Jul 2009 15:21:25 -0700 Received: from mx10.gnu.org ([199.232.76.166]:52480) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1MU6fD-0006qE-BM for emacs-pretest-bug@gnu.org; Thu, 23 Jul 2009 18:21:23 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1MU6f9-00061L-77 for emacs-pretest-bug@gnu.org; Thu, 23 Jul 2009 18:21:21 -0400 Received: from mailout1-1.pacific.net.au ([61.8.2.208]:43106 helo=mailout1.pacific.net.au) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MU6f8-00060X-BN for emacs-pretest-bug@gnu.org; Thu, 23 Jul 2009 18:21:19 -0400 Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.2.163]) by mailout1.pacific.net.au (Postfix) with ESMTP id 2BE124FD5DA for ; Fri, 24 Jul 2009 08:21:10 +1000 (EST) Received: from blah.blah (ppp280A.dyn.pacific.net.au [61.8.40.10]) by mailproxy2.pacific.net.au (Postfix) with ESMTP id 6A7CB27428 for ; Fri, 24 Jul 2009 08:21:03 +1000 (EST) Received: from gg by blah.blah with local (Exim 4.69) (envelope-from ) id 1MU6do-0002Ax-0S for emacs-pretest-bug@gnu.org; Fri, 24 Jul 2009 08:19:56 +1000 From: Kevin Ryde To: emacs-pretest-bug@gnu.org Subject: 23.1.50; get-free-disk-space relative to non-existent default-directory Date: Fri, 24 Jul 2009 08:19:54 +1000 Message-ID: <87tz13jb3p.fsf@blah.blah> User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/22.3 (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) --=-=-= On a non-existent directory get-free-disk-space returns nil, eg. (get-free-disk-space "/no/such/dir") => nil But if it's done by a relative path from a default-directory which doesn't exist, then the answer is the space in your home directory (let ((default-directory "/no/such/dir")) (get-free-disk-space ".")) => 3705637 I hoped the two answers would be the same. This is with the "df"-running code in get-free-disk-space, ie. no `file-system-info' function. Perhaps absolutize per below with an inserted setq, the diff being just re-indent. (I still think the use of the home dir there is either complicated and unnecessary, or complicated and necessary everywhere. Or maybe better call-process could not attempt a chdir at all if a caller doesn't care about the current directory. But leaving that unchanged as yet.) 2009-07-24 Kevin Ryde * files.el (get-free-disk-space): Absolutize the dir before changing default-directory, so as not to answer about a different directory. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=files.el.disk-space-absolutize.diff *** files.el 24 Jul 2009 07:35:37 +1000 1.1063 --- files.el 24 Jul 2009 08:07:01 +1000 *************** *** 5394,5410 **** (save-match-data (with-temp-buffer (when (and directory-free-space-program ! (let ((default-directory ! (if (and (not (file-remote-p default-directory)) ! (file-directory-p default-directory) ! (file-readable-p default-directory)) ! default-directory ! (expand-file-name "~/")))) ! (eq (call-process directory-free-space-program ! nil t nil ! directory-free-space-args ! dir) ! 0))) ;; Usual format is a header line followed by a line of ;; numbers. (goto-char (point-min)) --- 5394,5413 ---- (save-match-data (with-temp-buffer (when (and directory-free-space-program ! (progn ! ;; absolutize before changing default-directory ! (setq dir (expand-file-name dir)) ! (let ((default-directory ! (if (and (not (file-remote-p default-directory)) ! (file-directory-p default-directory) ! (file-readable-p default-directory)) ! default-directory ! (expand-file-name "~/")))) ! (eq (call-process directory-free-space-program ! nil t nil ! directory-free-space-args ! dir) ! 0)))) ;; Usual format is a header line followed by a line of ;; numbers. (goto-char (point-min)) --=-=-= In GNU Emacs 23.1.50.4 (i586-pc-linux-gnu, GTK+ Version 2.16.4) of 2009-07-24 on blah.blah configured using `configure 'CFLAGS=-O -g' '--prefix=/down/emacs/b/inst' '--with-x-toolkit=gtk'' 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 value of $XMODIFIERS: nil locale-coding-system: iso-latin-1-unix default-enable-multibyte-characters: t --=-=-=-- From cyd@stupidchicken.com Sat Aug 15 17:33:54 2009 Received: (at 3911-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=unavailable 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@debbugs.gnu.org, 3911-done@debbugs.gnu.org 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 X-CrossAssassin-Score: 2 > 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. From gg@zip.com.au Mon Aug 17 17:23:26 2009 Received: (at 3911) by emacsbugs.donarmstrong.com; 18 Aug 2009 00:23:26 +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.1 required=4.0 tests=AWL autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mailout2.pacific.net.au (mailout2-10.pacific.net.au [125.255.80.137]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7I0NOF7005442 for <3911@emacsbugs.donarmstrong.com>; Mon, 17 Aug 2009 17:23:26 -0700 Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.2.162]) by mailout2.pacific.net.au (Postfix) with ESMTP id A787818AC09; Tue, 18 Aug 2009 10:23:22 +1000 (EST) Received: from blah.blah (ppp2002.dyn.pacific.net.au [61.8.32.2]) by mailproxy1.pacific.net.au (Postfix) with ESMTP id BD7428C23; Tue, 18 Aug 2009 10:23:21 +1000 (EST) Received: from gg by blah.blah with local (Exim 4.69) (envelope-from ) id 1MdCTl-0005N2-Qt; Tue, 18 Aug 2009 10:23:09 +1000 From: Kevin Ryde To: Chong Yidong Cc: 3911@debbugs.gnu.org Subject: Re: get-free-disk-space when default-directory doesn't exist References: <871vnclhoz.fsf@cyd.mit.edu> Date: Tue, 18 Aug 2009 10:23:08 +1000 In-Reply-To: <871vnclhoz.fsf@cyd.mit.edu> (Chong Yidong's message of "Sat, 15 Aug 2009 20:34:52 -0400") Message-ID: <87bpme9dhv.fsf@blah.blah> User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/22.3 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Chong Yidong writes: > > You're right; it's probably better to fall back on / instead of ~. I think the test for file-remote-p is covered by the first line of the func so it's not needed in the dir condition bit, per below. I still think "/" might as well be used unconditionally though. The reason I'm still banging on about that is that there's probably 3 or 4 other places in emacs which also don't care about the current directory when spawning a program. They would make use of the same idiom, whatever it might best be. (I arrived at this first when some of my own code bombed in a non-existent default-directory. I've seen it in other people's code too.) --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=files.el.disk-space-noremote.diff *** files.el 18 Aug 2009 08:51:19 +1000 1.1068 --- files.el 18 Aug 2009 10:12:22 +1000 *************** *** 5400,5407 **** ;; not exist (Bug#2631, Bug#3911). (let ((default-directory default-directory)) (setq dir (expand-file-name dir)) ! (unless (and (not (file-remote-p default-directory)) ! (file-directory-p default-directory) (file-readable-p default-directory)) (setq default-directory "/")) (eq (call-process directory-free-space-program --- 5400,5406 ---- ;; not exist (Bug#2631, Bug#3911). (let ((default-directory default-directory)) (setq dir (expand-file-name dir)) ! (unless (and (file-directory-p default-directory) (file-readable-p default-directory)) (setq default-directory "/")) (eq (call-process directory-free-space-program --=-=-=-- From unknown Fri Jun 20 07:25:18 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: Did not alter fixed versions and reopened. Date: Thu, 20 Aug 2009 20:01:54 +0000 User-Agent: Fakemail v42.6.9 # A New Hope # A long time ago, in a galaxy far, far away # something happened. # # Magically this resulted in the following # action being taken, but this fake control # message doesn't tell you why it happened # # The action: # Did not alter fixed versions and reopened. thanks # This fakemail brought to you by your local debbugs # administrator From gg@zip.com.au Wed Aug 19 15:21:30 2009 Received: (at control) by emacsbugs.donarmstrong.com; 19 Aug 2009 22:21:30 +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=-2.0 required=4.0 tests=AWL,MURPHY_DRUGS_REL8, VALID_BTS_CONTROL autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mailout2.pacific.net.au (mailout2-10.pacific.net.au [125.255.80.137]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7JMLSdS003089 for ; Wed, 19 Aug 2009 15:21:29 -0700 Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.2.162]) by mailout2.pacific.net.au (Postfix) with ESMTP id C887918827B for ; Thu, 20 Aug 2009 08:21:26 +1000 (EST) Received: from blah.blah (ppp27D5.dyn.pacific.net.au [61.8.39.213]) by mailproxy1.pacific.net.au (Postfix) with ESMTP id 650338C3C for ; Thu, 20 Aug 2009 08:21:26 +1000 (EST) Received: from gg by blah.blah with local (Exim 4.69) (envelope-from ) id 1MdtWp-0002C1-2S for control@emacsbugs.donarmstrong.com; Thu, 20 Aug 2009 08:21:11 +1000 From: Kevin Ryde To: control@debbugs.gnu.org Subject: Re: get-free-disk-space when default-directory doesn't exist References: <871vnclhoz.fsf@cyd.mit.edu> <87bpme9dhv.fsf@blah.blah> <87my5yexy4.fsf@stupidchicken.com> <87r5v7xxz5.fsf@blah.blah> Date: Thu, 20 Aug 2009 08:21:10 +1000 In-Reply-To: <87r5v7xxz5.fsf@blah.blah> (Kevin Ryde's message of "Thu, 20 Aug 2009 08:03:42 +1000") Message-ID: <87fxbnxx61.fsf@blah.blah> User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/22.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii reopen 3911 retitle 3911 get-free-disk-space race condition on default-directory test tags 3911 +patch thanks Works better when sent to the right bug tracking system! From cyd@stupidchicken.com Mon Aug 17 18:02:35 2009 Received: (at 3911) by emacsbugs.donarmstrong.com; 18 Aug 2009 01:02:35 +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.5 required=4.0 tests=AWL autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from pantheon-po41.its.yale.edu (pantheon-po41.its.yale.edu [130.132.50.98]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7I12XMo011923 for <3911@emacsbugs.donarmstrong.com>; Mon, 17 Aug 2009 18:02:35 -0700 Received: from furry (dhcp128036161229.central.yale.edu [128.36.161.229]) (authenticated bits=0) by pantheon-po41.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id n7I12R6c020707 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 17 Aug 2009 21:02:27 -0400 Received: by furry (Postfix, from userid 1000) id 9B188C070; Mon, 17 Aug 2009 21:02:27 -0400 (EDT) From: Chong Yidong To: Kevin Ryde Cc: 3911@debbugs.gnu.org Subject: Re: get-free-disk-space when default-directory doesn't exist References: <871vnclhoz.fsf@cyd.mit.edu> <87bpme9dhv.fsf@blah.blah> Date: Mon, 17 Aug 2009 21:02:27 -0400 In-Reply-To: <87bpme9dhv.fsf@blah.blah> (Kevin Ryde's message of "Tue, 18 Aug 2009 10:23:08 +1000") Message-ID: <87my5yexy4.fsf@stupidchicken.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) Kevin Ryde writes: > I think the test for file-remote-p is covered by the first line of the > func so it's not needed in the dir condition bit, per below. But that applies to DIR, not default-directory. > I still think "/" might as well be used unconditionally though. Principle of least surprise. If we don't have to change the default directory, let's not, even if it seems harmless (because we can never be sure of every eventuality). From gg@zip.com.au Wed Aug 19 14:43:51 2009 Received: (at 3911) by emacsbugs.donarmstrong.com; 19 Aug 2009 21:43:51 +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.1 required=4.0 tests=AWL autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mailout2.pacific.net.au (mailout2-10.pacific.net.au [125.255.80.137]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7JLhntS028206 for <3911@emacsbugs.donarmstrong.com>; Wed, 19 Aug 2009 14:43:51 -0700 Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.2.162]) by mailout2.pacific.net.au (Postfix) with ESMTP id 95F5F183F00; Thu, 20 Aug 2009 07:43:48 +1000 (EST) Received: from blah.blah (ppp27D5.dyn.pacific.net.au [61.8.39.213]) by mailproxy1.pacific.net.au (Postfix) with ESMTP id E49BB8C1C; Thu, 20 Aug 2009 07:43:47 +1000 (EST) Received: from gg by blah.blah with local (Exim 4.69) (envelope-from ) id 1MdswO-0001WF-Ah; Thu, 20 Aug 2009 07:43:32 +1000 From: Kevin Ryde To: Chong Yidong Cc: 3911@debbugs.gnu.org Subject: Re: get-free-disk-space when default-directory doesn't exist References: <871vnclhoz.fsf@cyd.mit.edu> <87bpme9dhv.fsf@blah.blah> <87my5yexy4.fsf@stupidchicken.com> Date: Thu, 20 Aug 2009 07:43:32 +1000 Message-ID: <87zl9vxywr.fsf@blah.blah> User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/22.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Chong Yidong writes: > > But that applies to DIR, not default-directory. Oops, I confused myself thinking the given dir could be used there. > Principle of least surprise. If we don't have to change the default > directory, let's not, Err, well, I think the unhappy surprise may be if an operation about one directory depends on what's happening in another directory ... From gg@zip.com.au Wed Aug 19 15:04:02 2009 Received: (at 3911) by emacsbugs.donarmstrong.com; 19 Aug 2009 22:04:02 +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=-2.0 required=4.0 tests=AWL,MURPHY_DRUGS_REL8, VALID_BTS_CONTROL autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mailout1.pacific.net.au (mailout1-1.pacific.net.au [61.8.2.208]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7JM409k031614 for <3911@emacsbugs.donarmstrong.com>; Wed, 19 Aug 2009 15:04:01 -0700 Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.2.163]) by mailout1.pacific.net.au (Postfix) with ESMTP id 1148E5035B2; Thu, 20 Aug 2009 08:03:59 +1000 (EST) Received: from blah.blah (ppp27D5.dyn.pacific.net.au [61.8.39.213]) by mailproxy2.pacific.net.au (Postfix) with ESMTP id 394852742D; Thu, 20 Aug 2009 08:03:58 +1000 (EST) Received: from gg by blah.blah with local (Exim 4.69) (envelope-from ) id 1MdtFu-0001bQ-SF; Thu, 20 Aug 2009 08:03:42 +1000 From: Kevin Ryde To: control@bugs.debian.org, 3911@debbugs.gnu.org Cc: Chong Yidong Subject: Re: get-free-disk-space when default-directory doesn't exist References: <871vnclhoz.fsf@cyd.mit.edu> <87bpme9dhv.fsf@blah.blah> <87my5yexy4.fsf@stupidchicken.com> Date: Thu, 20 Aug 2009 08:03:42 +1000 Message-ID: <87r5v7xxz5.fsf@blah.blah> User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/22.3 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= reopen 3911 retitle 3911 get-free-disk-space race condition on default-directory test tags 3911 +patch thanks If the default-directory is flicking in and out of existence then the code in get-free-disk-space which chooses between default-directory and "/" can suffer a race condition. default-directory can exist for the test, but then be gone by the time call-process tries to use it. I can provoke this on my pc with one emacs making a directory flicker, (while t (make-directory "/tmp/somedir") (delete-directory "/tmp/somedir")) And in another emacs a loop (while t (let ((default-directory "/tmp/somedir/")) (get-free-disk-space "/"))) The latter loop errors out after 5 or 10 minutes. I hoped that asking get-free-disk-space about the space on some directory would not depend on the value of default-directory. The problem can be provoked much quicker with a (sit-for 0.1) between the test and the call-process. Otherwise I presume it requires a random context switch just at the inopportune time. The perils of "test before use" come up in shell scripts often (because it's hard to do better), and in sloppy perl code. Alas the tendency is to work most of the time, but lack robustness in special circumstances. I suppose the rule for call-process would be: if the operation is not related to default-directory then go to "/" so as to be independent of default-directory's existence, or bouncing in and out of existence. I expect that's why other places have "/". It sounds fairly simple, dunno if that's too obvious to have a crib in the manual (under "Subprocess Creation"). At any rate, umm, third time lucky with what I posted first ... 2009-08-20 Kevin Ryde * files.el (get-free-disk-space): Bind default-directory to "/", to be independent of default-directory existence. (Cannot test usability of default-directory first since it may disappear in between the test and the call-process.) --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=files.el.disk-space-root-2.diff *** files.el 18 Aug 2009 08:51:19 +1000 1.1068 --- files.el 20 Aug 2009 08:03:13 +1000 *************** *** 5398,5409 **** (when (and directory-free-space-program ;; Avoid failure if the default directory does ;; not exist (Bug#2631, Bug#3911). ! (let ((default-directory default-directory)) ! (setq dir (expand-file-name dir)) ! (unless (and (not (file-remote-p default-directory)) ! (file-directory-p default-directory) ! (file-readable-p default-directory)) ! (setq default-directory "/")) (eq (call-process directory-free-space-program nil t nil directory-free-space-args --- 5398,5405 ---- (when (and directory-free-space-program ;; Avoid failure if the default directory does ;; not exist (Bug#2631, Bug#3911). ! (setq dir (expand-file-name dir)) ! (let ((default-directory "/")) (eq (call-process directory-free-space-program nil t nil directory-free-space-args --=-=-=-- From monnier@iro.umontreal.ca Fri Aug 21 20:57:28 2009 Received: (at 3911) by emacsbugs.donarmstrong.com; 22 Aug 2009 03:57:29 +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=-4.8 required=4.0 tests=AWL,FOURLA,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from ironport2-out.teksavvy.com (ironport2-out.pppoe.ca [206.248.154.182]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7M3vQCF030604 for <3911@emacsbugs.donarmstrong.com>; Fri, 21 Aug 2009 20:57:28 -0700 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqgEAP0Ij0pFxIHU/2dsb2JhbACBU9MnhBoFh1Y X-IronPort-AV: E=Sophos;i="4.44,254,1249272000"; d="scan'208";a="43952716" Received: from 69-196-129-212.dsl.teksavvy.com (HELO ceviche.home) ([69.196.129.212]) by ironport2-out.teksavvy.com with ESMTP; 21 Aug 2009 23:56:38 -0400 Received: by ceviche.home (Postfix, from userid 20848) id DD59BB40E4; Fri, 21 Aug 2009 23:57:20 -0400 (EDT) From: Stefan Monnier To: Kevin Ryde Cc: 3911@debbugs.gnu.org, control@bugs.debian.org, Chong Yidong Subject: Re: bug#3911: get-free-disk-space when default-directory doesn't exist Message-ID: References: <871vnclhoz.fsf@cyd.mit.edu> <87bpme9dhv.fsf@blah.blah> <87my5yexy4.fsf@stupidchicken.com> <87r5v7xxz5.fsf@blah.blah> Date: Fri, 21 Aug 2009 23:57:20 -0400 In-Reply-To: <87r5v7xxz5.fsf@blah.blah> (Kevin Ryde's message of "Thu, 20 Aug 2009 08:03:42 +1000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii How 'bout this patch instead (which could even work on Tramp directories)? Stefan --- files.el.~1.1069.~ 2009-08-21 23:47:30.000000000 -0400 +++ files.el 2009-08-21 23:56:57.000000000 -0400 @@ -782,9 +782,12 @@ ;; nil))) (defun locate-dominating-file (file name) - "Look up the directory hierarchy from FILE for a file named NAME. + "Look up the directory hierarchy from FILE for a directory containing NAME. Stop at the first parent directory containing a file NAME, -and return the directory. Return nil if not found." +and return the directory. Return nil if not found. +Instead of a string, NAME can also be a predicate taking one argument +\(a directory) and returning a non-nil value if that directory is the one for +which we're looking." ;; We used to use the above locate-dominating-files code, but the ;; directory-files call is very costly, so we're much better off doing ;; multiple calls using the code in here. @@ -812,13 +815,15 @@ ;; (setq user (nth 2 (file-attributes file))) ;; (and prev-user (not (equal user prev-user)))) (string-match locate-dominating-stop-dir-regexp file))) - (setq try (file-exists-p (expand-file-name name file))) + (setq try (if (stringp name) + (file-exists-p (expand-file-name name file)) + (funcall name file))) (cond (try (setq root file)) ((equal file (setq prev-file file file (file-name-directory (directory-file-name file)))) (setq file nil)))) - root)) + (file-name-as-directory root))) (defun executable-find (command) @@ -5398,21 +5403,18 @@ (let ((fsinfo (file-system-info dir))) (if fsinfo (format "%.0f" (/ (nth 2 fsinfo) 1024)))) + (setq dir (expand-file-name dir)) (save-match-data (with-temp-buffer (when (and directory-free-space-program ;; Avoid failure if the default directory does ;; not exist (Bug#2631, Bug#3911). - (let ((default-directory default-directory)) - (setq dir (expand-file-name dir)) - (unless (and (not (file-remote-p default-directory)) - (file-directory-p default-directory) - (file-readable-p default-directory)) - (setq default-directory "/")) + (let ((default-directory + (locate-dominating-file dir 'file-directory-p))) (eq (call-process directory-free-space-program nil t nil directory-free-space-args - dir) + (file-relative-name dir)) 0))) ;; Usual format is a header line followed by a line of ;; numbers. From gg@zip.com.au Mon Aug 24 16:46:06 2009 Received: (at 3911) by emacsbugs.donarmstrong.com; 24 Aug 2009 23:46:06 +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=-2.5 required=4.0 tests=AWL,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mailout1.pacific.net.au (mailout1-1.pacific.net.au [61.8.2.208]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7ONk4sB023707 for <3911@emacsbugs.donarmstrong.com>; Mon, 24 Aug 2009 16:46:06 -0700 Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.2.162]) by mailout1.pacific.net.au (Postfix) with ESMTP id 07805503E01; Tue, 25 Aug 2009 09:46:03 +1000 (EST) Received: from blah.blah (ppp2D80.dyn.pacific.net.au [61.8.45.128]) by mailproxy1.pacific.net.au (Postfix) with ESMTP id 124448C4C; Tue, 25 Aug 2009 09:46:01 +1000 (EST) Received: from gg by blah.blah with local (Exim 4.69) (envelope-from ) id 1MfjEI-00011v-WF; Tue, 25 Aug 2009 09:45:39 +1000 From: Kevin Ryde To: Stefan Monnier Cc: 3911@debbugs.gnu.org, Chong Yidong Subject: Re: bug#3911: get-free-disk-space when default-directory doesn't exist References: <871vnclhoz.fsf@cyd.mit.edu> <87bpme9dhv.fsf@blah.blah> <87my5yexy4.fsf@stupidchicken.com> <87r5v7xxz5.fsf@blah.blah> Date: Tue, 25 Aug 2009 09:45:37 +1000 In-Reply-To: (Stefan Monnier's message of "Fri, 21 Aug 2009 23:57:20 -0400") Message-ID: <877hwsbwta.fsf@blah.blah> User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Stefan Monnier writes: > > How 'bout this patch instead (which could even work on Tramp > directories)? I don't think so. It's still a race condition in between choosing an apparently existent directory and then making use of that directory, isn't it? I think "/" is the only place certain to exist and not go away. It's also the simplest approach. `sha1-string-external' is another place this comes up. In that case the operation is completely unrelated to any directory, and so really should go to "/" so as to be independent of default-directory or whether that dir is coming or going. From monnier@IRO.UMontreal.CA Tue Aug 25 11:29:40 2009 Received: (at 3911) by emacsbugs.donarmstrong.com; 25 Aug 2009 18:29:41 +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=-4.3 required=4.0 tests=AWL,FOURLA,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from chene.dit.umontreal.ca (chene.dit.umontreal.ca [132.204.246.20]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7PITcZZ009066 for <3911@emacsbugs.donarmstrong.com>; Tue, 25 Aug 2009 11:29:40 -0700 Received: from faina.iro.umontreal.ca (faina.iro.umontreal.ca [132.204.26.177]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id n7PITbw7029103; Tue, 25 Aug 2009 14:29:37 -0400 Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 26D553A06B; Tue, 25 Aug 2009 14:29:37 -0400 (EDT) From: Stefan Monnier To: Kevin Ryde Cc: 3911@debbugs.gnu.org, Chong Yidong Subject: Re: bug#3911: get-free-disk-space when default-directory doesn't exist Message-ID: References: <871vnclhoz.fsf@cyd.mit.edu> <87bpme9dhv.fsf@blah.blah> <87my5yexy4.fsf@stupidchicken.com> <87r5v7xxz5.fsf@blah.blah> <877hwsbwta.fsf@blah.blah> Date: Tue, 25 Aug 2009 14:29:37 -0400 In-Reply-To: <877hwsbwta.fsf@blah.blah> (Kevin Ryde's message of "Tue, 25 Aug 2009 09:45:37 +1000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV3348=0 >> How 'bout this patch instead (which could even work on Tramp >> directories)? > I don't think so. It's still a race condition in between choosing an > apparently existent directory and then making use of that directory, > isn't it? Emacs is made of such race conditions. But there's a big difference between DIR and/or its parents appearing/disappearing (as in my patch), vs $HOME or some other unrealted directory appearing/disappearing. > I think "/" is the only place certain to exist and not go > away. It's also the simplest approach. I'd like to make it work for Tramp dirs as well. > `sha1-string-external' is another place this comes up. In that case the > operation is completely unrelated to any directory, and so really should > go to "/" so as to be independent of default-directory or whether that > dir is coming or going. For that one, yes, "/" is clearly a better choice. Stefan From gg@zip.com.au Fri Aug 28 18:33:15 2009 Received: (at 3911) by emacsbugs.donarmstrong.com; 29 Aug 2009 01:33:16 +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=-2.5 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mailout1.pacific.net.au (mailout1-1.pacific.net.au [61.8.2.208]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7T1XESP032376 for <3911@emacsbugs.donarmstrong.com>; Fri, 28 Aug 2009 18:33:15 -0700 Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.2.163]) by mailout1.pacific.net.au (Postfix) with ESMTP id 49964501B9F; Sat, 29 Aug 2009 11:33:12 +1000 (EST) Received: from blah.blah (ppp283F.dyn.pacific.net.au [61.8.40.63]) by mailproxy2.pacific.net.au (Postfix) with ESMTP id B2C0727403; Sat, 29 Aug 2009 11:33:11 +1000 (EST) Received: from gg by blah.blah with local (Exim 4.69) (envelope-from ) id 1MhCoA-0005vl-4v; Sat, 29 Aug 2009 11:32:46 +1000 From: Kevin Ryde To: Stefan Monnier Cc: 3911@debbugs.gnu.org, Chong Yidong Subject: Re: bug#3911: get-free-disk-space when default-directory doesn't exist References: <871vnclhoz.fsf@cyd.mit.edu> <87bpme9dhv.fsf@blah.blah> <87my5yexy4.fsf@stupidchicken.com> <87r5v7xxz5.fsf@blah.blah> <877hwsbwta.fsf@blah.blah> Date: Sat, 29 Aug 2009 11:32:45 +1000 In-Reply-To: (Stefan Monnier's message of "Tue, 25 Aug 2009 14:29:37 -0400") Message-ID: <87fxbbo14y.fsf@blah.blah> User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Stefan Monnier writes: > > Emacs is made of such race conditions. But this one is easy to avoid. I really don't understand why this bug has gone on and on. What's the objection to "/"? As far as I can tell it's smaller, faster, and certain to work. (Faster especially if there's some nfs or ftpfs or similar involved where a system chdir may do some evil remote query.) > I'd like to make it work for Tramp dirs as well. Sounds good. Tramp holds open a session doesn't it, so at least there'd be no call-process to worry about for it. :) From monnier@iro.umontreal.ca Fri Aug 28 20:37:34 2009 Received: (at 3911) by emacsbugs.donarmstrong.com; 29 Aug 2009 03:37:35 +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=-2.7 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from ironport2-out.teksavvy.com (ironport2-out.pppoe.ca [206.248.154.182]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7T3bWDe022537 for <3911@emacsbugs.donarmstrong.com>; Fri, 28 Aug 2009 20:37:34 -0700 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhsFAMwzmEpFpYuS/2dsb2JhbACBU9cJhBkFh2Y X-IronPort-AV: E=Sophos;i="4.44,294,1249272000"; d="scan'208";a="44464680" Received: from 69-165-139-146.dsl.teksavvy.com (HELO pastel.home) ([69.165.139.146]) by ironport2-out.teksavvy.com with ESMTP; 28 Aug 2009 23:36:27 -0400 Received: by pastel.home (Postfix, from userid 20848) id D42877F42; Fri, 28 Aug 2009 23:37:26 -0400 (EDT) From: Stefan Monnier To: Kevin Ryde Cc: 3911@debbugs.gnu.org, Chong Yidong Subject: Re: bug#3911: get-free-disk-space when default-directory doesn't exist Message-ID: References: <871vnclhoz.fsf@cyd.mit.edu> <87bpme9dhv.fsf@blah.blah> <87my5yexy4.fsf@stupidchicken.com> <87r5v7xxz5.fsf@blah.blah> <877hwsbwta.fsf@blah.blah> <87fxbbo14y.fsf@blah.blah> Date: Fri, 28 Aug 2009 23:37:26 -0400 In-Reply-To: <87fxbbo14y.fsf@blah.blah> (Kevin Ryde's message of "Sat, 29 Aug 2009 11:32:45 +1000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii >> Emacs is made of such race conditions. > But this one is easy to avoid. I really don't understand why this bug > has gone on and on. What's the objection to "/"? As far as I can tell > it's smaller, faster, and certain to work. (Faster especially if > there's some nfs or ftpfs or similar involved where a system chdir may > do some evil remote query.) The objection to / is only that it doesn't work for Tramp. >> I'd like to make it work for Tramp dirs as well. > Sounds good. Tramp holds open a session doesn't it, so at least there'd > be no call-process to worry about for it. :) I don't know what you're referring to. Stefan From gg@zip.com.au Mon Aug 31 18:37:59 2009 Received: (at 3911) by emacsbugs.donarmstrong.com; 1 Sep 2009 01:38:00 +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=-2.5 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mailout2.pacific.net.au (mailout2-10.pacific.net.au [125.255.80.137]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n811bwSM019664 for <3911@emacsbugs.donarmstrong.com>; Mon, 31 Aug 2009 18:37:59 -0700 Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.2.162]) by mailout2.pacific.net.au (Postfix) with ESMTP id 6F7DA18BBF5; Tue, 1 Sep 2009 11:37:56 +1000 (EST) Received: from blah.blah (ppp2B6F.dyn.pacific.net.au [61.8.43.111]) by mailproxy1.pacific.net.au (Postfix) with ESMTP id 9EDA78C52; Tue, 1 Sep 2009 11:37:55 +1000 (EST) Received: from gg by blah.blah with local (Exim 4.69) (envelope-from ) id 1MiIJH-0006Vp-4c; Tue, 01 Sep 2009 11:37:23 +1000 From: Kevin Ryde To: Stefan Monnier Cc: 3911@debbugs.gnu.org Subject: Re: bug#3911: get-free-disk-space when default-directory doesn't exist References: <871vnclhoz.fsf@cyd.mit.edu> <87bpme9dhv.fsf@blah.blah> <87my5yexy4.fsf@stupidchicken.com> <87r5v7xxz5.fsf@blah.blah> <877hwsbwta.fsf@blah.blah> <87fxbbo14y.fsf@blah.blah> Date: Tue, 01 Sep 2009 11:37:21 +1000 In-Reply-To: (Stefan Monnier's message of "Fri, 28 Aug 2009 23:37:26 -0400") Message-ID: <87prab5tta.fsf@blah.blah> User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Stefan Monnier writes: > > The objection to / is only that it doesn't work for Tramp. Umm, now it's me that doesn't understand! - the "df"-running part is for local queries, ie. not-tramp, isn't it? (No remotes at all, so not ange-ftp or whatnot either ...?) From monnier@iro.umontreal.ca Mon Aug 31 23:05:25 2009 Received: (at 3911) by emacsbugs.donarmstrong.com; 1 Sep 2009 06:05:25 +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=-2.8 required=4.0 tests=AWL,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from ironport2-out.teksavvy.com (ironport2-out.pppoe.ca [206.248.154.182]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8165NOf011284 for <3911@emacsbugs.donarmstrong.com>; Mon, 31 Aug 2009 23:05:25 -0700 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApsEAPJWnEpFpYuS/2dsb2JhbACBU9cchBoFh2c X-IronPort-AV: E=Sophos;i="4.44,310,1249272000"; d="scan'208";a="44690378" Received: from 69-165-139-146.dsl.teksavvy.com (HELO pastel.home) ([69.165.139.146]) by ironport2-out.teksavvy.com with ESMTP; 01 Sep 2009 02:04:03 -0400 Received: by pastel.home (Postfix, from userid 20848) id AE7AD7F24; Tue, 1 Sep 2009 02:05:09 -0400 (EDT) From: Stefan Monnier To: Kevin Ryde Cc: 3911@debbugs.gnu.org Subject: Re: bug#3911: get-free-disk-space when default-directory doesn't exist Message-ID: References: <871vnclhoz.fsf@cyd.mit.edu> <87bpme9dhv.fsf@blah.blah> <87my5yexy4.fsf@stupidchicken.com> <87r5v7xxz5.fsf@blah.blah> <877hwsbwta.fsf@blah.blah> <87fxbbo14y.fsf@blah.blah> <87prab5tta.fsf@blah.blah> Date: Tue, 01 Sep 2009 02:05:09 -0400 In-Reply-To: <87prab5tta.fsf@blah.blah> (Kevin Ryde's message of "Tue, 01 Sep 2009 11:37:21 +1000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii >> The objection to / is only that it doesn't work for Tramp. > Umm, now it's me that doesn't understand! - the "df"-running part is for > local queries, ie. not-tramp, isn't it? (No remotes at all, so not > ange-ftp or whatnot either ...?) Right now, it is. But using my patch, together with changing `call-process' with `process-file' would make it possible to remove the file-remote-p check. Stefan From gg@zip.com.au Sun Sep 6 17:29:00 2009 Received: (at 3911) by emacsbugs.donarmstrong.com; 7 Sep 2009 00:29:01 +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=-2.5 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mailout1.pacific.net.au (mailout1-1.pacific.net.au [61.8.2.208]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n870Sws1001090 for <3911@emacsbugs.donarmstrong.com>; Sun, 6 Sep 2009 17:29:00 -0700 Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.2.163]) by mailout1.pacific.net.au (Postfix) with ESMTP id 66B475034A0; Mon, 7 Sep 2009 10:28:56 +1000 (EST) Received: from blah.blah (ppp25DF.dyn.pacific.net.au [61.8.37.223]) by mailproxy2.pacific.net.au (Postfix) with ESMTP id 7F4972740E; Mon, 7 Sep 2009 10:28:55 +1000 (EST) Received: from gg by blah.blah with local (Exim 4.69) (envelope-from ) id 1MkS6D-0002Le-4C; Mon, 07 Sep 2009 10:28:49 +1000 From: Kevin Ryde To: Stefan Monnier Cc: 3911@debbugs.gnu.org Subject: Re: bug#3911: get-free-disk-space when default-directory doesn't exist References: <871vnclhoz.fsf@cyd.mit.edu> <87bpme9dhv.fsf@blah.blah> <87my5yexy4.fsf@stupidchicken.com> <87r5v7xxz5.fsf@blah.blah> <877hwsbwta.fsf@blah.blah> <87fxbbo14y.fsf@blah.blah> <87prab5tta.fsf@blah.blah> Date: Mon, 07 Sep 2009 10:28:47 +1000 In-Reply-To: (Stefan Monnier's message of "Tue, 01 Sep 2009 02:05:09 -0400") Message-ID: <878wgrbnsw.fsf@blah.blah> User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Stefan Monnier writes: > > Right now, it is. Prospective remote support isn't a reason to leave it dodgy for locals now is it? > `process-file' The cd in tramp-handle-process-file will have the same problem as the local cd in call-process. If there has to be a cd then it should be a safe place like the root dir or similar. Perhaps default-directory as the remote root dir would get close. Is there a func to figure that? Except I think remote support should go through the file-name-handler thingie to allow for remotes with their own free-space query mechanism, rather than running "df" (or assuming that `directory-free-space-program' for the local machine is also good on the remote, etc). From gg@zip.com.au Thu Oct 1 17:26:13 2009 Received: (at 3911-done) by emacsbugs.donarmstrong.com; 2 Oct 2009 00:26:13 +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=-2.4 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mailout2.pacific.net.au (mailout2-4.pacific.net.au [61.8.2.227]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n920QBRs029506 for <3911-done@emacsbugs.donarmstrong.com>; Thu, 1 Oct 2009 17:26:13 -0700 Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.2.162]) by mailout2.pacific.net.au (Postfix) with ESMTP id 8CE8619346A for <3911-done@emacsbugs.donarmstrong.com>; Fri, 2 Oct 2009 10:26:10 +1000 (EST) Received: from blah.blah (ppp24D8.dyn.pacific.net.au [61.8.36.216]) by mailproxy1.pacific.net.au (Postfix) with ESMTP id EEDC18C2C for <3911-done@emacsbugs.donarmstrong.com>; Fri, 2 Oct 2009 10:26:04 +1000 (EST) Received: from gg by blah.blah with local (Exim 4.69) (envelope-from ) id 1MtVx3-0006td-Tw for 3911-done@emacsbugs.donarmstrong.com; Fri, 02 Oct 2009 10:24:49 +1000 From: Kevin Ryde To: 3911-done@debbugs.gnu.org Subject: Re: bug#3911: get-free-disk-space when default-directory doesn't exist References: <871vnclhoz.fsf@cyd.mit.edu> <87bpme9dhv.fsf@blah.blah> <87my5yexy4.fsf@stupidchicken.com> <87r5v7xxz5.fsf@blah.blah> <877hwsbwta.fsf@blah.blah> <87fxbbo14y.fsf@blah.blah> <87prab5tta.fsf@blah.blah> <878wgrbnsw.fsf@blah.blah> Date: Fri, 02 Oct 2009 10:24:49 +1000 In-Reply-To: <878wgrbnsw.fsf@blah.blah> (Kevin Ryde's message of "Mon, 07 Sep 2009 10:28:47 +1000") Message-ID: <87bpkq7icu.fsf@blah.blah> User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Installed by Stefan. From unknown Fri Jun 20 07:25:18 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 30 Oct 2009 14:24:12 +0000 User-Agent: Fakemail v42.6.9 # A New Hope # A long time ago, in a galaxy far, far away # something happened. # # Magically this resulted in the following # action being taken, but this fake control # message doesn't tell you why it happened # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 04 04:21:45 2011 Received: (at control) by debbugs.gnu.org; 4 Mar 2011 09:21:45 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PvRCi-0004OD-Oe for submit@debbugs.gnu.org; Fri, 04 Mar 2011 04:21:44 -0500 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PvRCh-0004O0-BP for control@debbugs.gnu.org; Fri, 04 Mar 2011 04:21:43 -0500 Received: from localhost ([127.0.0.1]:42418) by fencepost.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PvRCc-0003Ss-5k; Fri, 04 Mar 2011 04:21:38 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <19824.44833.816623.443441@fencepost.gnu.org> Date: Fri, 4 Mar 2011 04:21:37 -0500 From: Glenn Morris To: control Subject: emacs X-Attribution: GM X-Mailer: VM (www.wonderworks.com/vm), GNU Emacs (www.gnu.org/software/emacs) X-Hue: magenta X-Ran: L[A}.[}%S592P$,3~}HCxvVVivoWd3>H4]C3"4'aVrbg(8@b'0BeMzdE6cc@G29;5hmyIp X-Debbugs-No-Ack: yes X-Spam-Score: -6.3 (------) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.3 (------) unarchive 2631 unarchive 3911 merge 2631 3911 From unknown Fri Jun 20 07:25:18 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 01 Apr 2011 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator