From: Kevin Ryde <user42@zip.com.au>
To: bug-gnu-emacs@gnu.org
Subject: bug#2631: get-free-disk-space when default-directory doesn't exist
Date: Wed, 11 Mar 2009 09:24:04 +1100 [thread overview]
Message-ID: <87wsaxhv97.fsf@blah.blah> (raw)
[-- Attachment #1: Type: text/plain, Size: 1389 bytes --]
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
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: files.el.free-space.diff --]
[-- Type: text/x-diff, Size: 980 bytes --]
*** 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))
next reply other threads:[~2009-03-10 22:24 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <87d4cjzf89.fsf@cyd.mit.edu>
2009-03-10 22:24 ` Kevin Ryde [this message]
2009-03-11 2:10 ` bug#2631: get-free-disk-space when default-directory doesn't exist Stefan Monnier
2009-03-11 4:23 ` Eli Zaretskii
2009-03-11 21:00 ` Kevin Ryde
2009-03-15 2:40 ` bug#2631: marked as done (get-free-disk-space when default-directory doesn't exist) Emacs bug Tracking System
2009-08-16 0:40 ` bug#2631: marked as done (get-free-disk-space when home dir also " Emacs bug Tracking System
2009-03-17 0:02 ` bug#2631: get-free-disk-space when default-directory doesn't exist Kevin Ryde
2009-03-17 4:05 ` Eli Zaretskii
2009-03-27 23:32 ` Kevin Ryde
2009-03-27 23:17 ` Kevin Ryde
2009-03-27 23:25 ` Processed: " Emacs bug Tracking System
[not found] <871vnclhoz.fsf@cyd.mit.edu>
2009-07-23 22:19 ` bug#3911: 23.1.50; get-free-disk-space relative to non-existent default-directory Kevin Ryde
2009-08-16 0:40 ` bug#3911: marked as done (23.1.50; get-free-disk-space relative to non-existent default-directory) Emacs bug Tracking System
2009-10-02 0:35 ` bug#3911: marked as done (get-free-disk-space race condition on default-directory test) Emacs bug Tracking System
2009-08-18 0:23 ` bug#3911: get-free-disk-space when default-directory doesn't exist Kevin Ryde
2009-08-18 1:02 ` Chong Yidong
2009-08-19 21:43 ` Kevin Ryde
2009-08-19 22:03 ` Kevin Ryde
2009-08-22 3:57 ` Stefan Monnier
2009-08-24 23:45 ` Kevin Ryde
2009-08-25 18:29 ` Stefan Monnier
2009-08-29 1:32 ` Kevin Ryde
2009-08-29 3:37 ` Stefan Monnier
2009-09-01 1:37 ` Kevin Ryde
2009-09-01 6:05 ` Stefan Monnier
2009-09-07 0:28 ` Kevin Ryde
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wsaxhv97.fsf@blah.blah \
--to=user42@zip.com.au \
--cc=2631@emacsbugs.donarmstrong.com \
--cc=bug-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.