Recipes to confirm bug 50630 https://debbugs.gnu.org/cgi/bugreport.cgi?bug=50630 These will show two buffers with a directory listing for the same directory, but with different available space depending on the default-directory when executing. On Windows, I confirmed the bug using two different drive letters for pwd-a and pwd-b. But my main testing was doing all 3 of these on GNU/Linux. On Windows, ls-lisp will probably always be used unless it's disabled. for lisp/files.el (already fixed): emacs -Q --eval "\ (progn \ (setq pwd-a \"/\") \ (setq pwd-b \"/proc\") \ (setq list-dir \"~\") \ (with-current-buffer-window \"a\" nil nil \ (cd pwd-a) \ (insert-directory list-dir \"-l\" nil t) \ (insert (format \"listing of %s in cwd %s\" list-dir (pwd)))) \ (with-current-buffer-window \"b\" nil nil \ (cd pwd-b) \ (insert-directory list-dir \"-l\" nil t) \ (insert (format \"listing of %s in cwd %s\" list-dir (pwd)))) \ (switch-to-buffer \"a\") \ (switch-to-buffer-other-window \"b\"))" for lisp/ls-lisp.el: emacs -Q --eval "\ (progn \ (setq pwd-a \"/\") \ (setq pwd-b \"/proc\") \ (setq list-dir \"~\") \ (require 'ls-lisp) \ (setq ls-lisp-use-insert-directory-program nil) \ (with-current-buffer-window \"a\" nil nil \ (cd pwd-a) \ (insert-directory list-dir \"-l\" nil t) \ (insert (format \"listing of %s in cwd %s\" list-dir (pwd)))) \ (with-current-buffer-window \"b\" nil nil \ (cd pwd-b) \ (insert-directory list-dir \"-l\" nil t) \ (insert (format \"listing of %s in cwd %s\" list-dir (pwd)))) \ (switch-to-buffer \"a\") \ (switch-to-buffer-other-window \"b\"))" for lisp/net/tramp-sh.el: emacs -Q --eval "\ (progn \ (setq pwd-a \"/\") \ (setq pwd-b \"/proc\") \ (setq list-dir \"/ssh:emacsdev@localhost:~/\") \ (require 'tramp) \ (setq ls-lisp-use-insert-directory-program t) \ (with-current-buffer-window \"a\" nil nil \ (cd pwd-a) \ (insert-directory list-dir \"-l\" nil t) \ (insert (format \"listing of %s in cwd %s\" list-dir (pwd)))) \ (with-current-buffer-window \"b\" nil nil \ (cd pwd-b) \ (insert-directory list-dir \"-l\" nil t) \ (insert (format \"listing of %s in cwd %s\" list-dir (pwd)))) \ (switch-to-buffer \"a\") \ (switch-to-buffer-other-window \"b\"))"