GNU bug report logs - #50630
28.0.50; list-directory shows free space for current directory, not the specified one

Previous Next

Package: emacs;

Reported by: John Cummings <john <at> rootabega.net>

Date: Thu, 16 Sep 2021 23:39:02 UTC

Severity: normal

Found in version 28.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #31 received at 50630-done <at> debbugs.gnu.org (full text, mbox):

From: John Cummings <john <at> rootabega.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 50630-done <at> debbugs.gnu.org
Subject: Re: bug#50630: [External] : bug#50630: 28.0.50;
 list-directory shows free space for current directory, not the
 specified one
Date: Sat, 18 Sep 2021 10:04:47 +0000
On Saturday, September 18th, 2021 at 1:56 AM, Eli Zaretskii <eliz <at> gnu.org> wrote:

> > The values look wrong to me here.
>
> In my testing, they reflect the correct volume (because the call is in
> the buffer whose default-directory is set to the directory we are
> going to display), which is why I installed the changes. Please tell
> how you test, starting from "emacs -Q", because I'd like to look at
> this.

Here's a dirty manual way to confirm it. I just chose directories that
I know are on different volumes, but I also confirmed it works with a loopback
filesystem created with something like losetup. This worked, i.e. showed me different
free space, with emacs -Q on a clean build of c1356d3a05a789555c327dd4cb0f444fdf7be205


;;doesn't matter; just use an existing dir
(setq ld-target "~")

;;two dirs on different volumes
(setq ld-working-dirs '("/" "~/emacs/"))


(require 'ls-lisp)
;;make sure to use the ls-lisp functionality
(setq ls-lisp-use-insert-directory-program nil)


;;shows the list-directory output for all working dirs
(defun insert-ld-bug ()
  (dolist (ld-working-dir ld-working-dirs)
    (let ((default-directory ld-working-dir))
      (list-directory ld-target t)
      (insert-buffer-substring "*Directory*")
      (insert "=====\n\n\n"))))

(with-current-buffer-window "ld-bug" nil nil
  (insert-ld-bug))




This bug report was last modified 3 years and 285 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.