bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#50630: [External] : bug#50630: 28.0.50; list-directory shows free sp


From: John Cummings
Subject: 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@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))





reply via email to

[Prev in Thread] Current Thread [Next in Thread]