From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: John Cummings Newsgroups: gmane.emacs.bugs Subject: bug#50630: 28.0.50; list-directory shows free space for current directory, not the specified one Date: Thu, 16 Sep 2021 23:00:50 +0000 Message-ID: Reply-To: John Cummings Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="b1_YwdiKnKrvnmWgFCo7QO8fo3kxWR7EcJHVETZI87VkC4" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19253"; mail-complaints-to="usenet@ciao.gmane.io" To: 50630@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Sep 17 01:40:09 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mR0z9-0004l1-4D for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 17 Sep 2021 01:40:07 +0200 Original-Received: from localhost ([::1]:46894 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mR0z7-0001Jk-M0 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 16 Sep 2021 19:40:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52810) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mR0y6-0001JX-UP for bug-gnu-emacs@gnu.org; Thu, 16 Sep 2021 19:39:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46317) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mR0y6-0002vy-Le for bug-gnu-emacs@gnu.org; Thu, 16 Sep 2021 19:39:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mR0y6-0004aE-JC for bug-gnu-emacs@gnu.org; Thu, 16 Sep 2021 19:39:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: John Cummings Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 16 Sep 2021 23:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 50630 X-GNU-PR-Package: emacs X-Debbugs-Original-To: "bug-gnu-emacs@gnu.org" Original-Received: via spool by submit@debbugs.gnu.org id=B.163183548717550 (code B ref -1); Thu, 16 Sep 2021 23:39:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 16 Sep 2021 23:38:07 +0000 Original-Received: from localhost ([127.0.0.1]:57863 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mR0xC-0004Yz-Lg for submit@debbugs.gnu.org; Thu, 16 Sep 2021 19:38:07 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:47820) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mR0NU-0003HZ-Gd for submit@debbugs.gnu.org; Thu, 16 Sep 2021 19:01:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42508) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mR0NT-0003mP-Qi for bug-gnu-emacs@gnu.org; Thu, 16 Sep 2021 19:01:11 -0400 Original-Received: from mail-0301.mail-europe.com ([188.165.51.139]:50473) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mR0NP-0007CZ-DS for bug-gnu-emacs@gnu.org; Thu, 16 Sep 2021 19:01:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rootabega.net; s=protonmail; t=1631833254; bh=Rk9dVYkgalshPPNvo9bTBNt0dryCWGm3QobHx7A6D9U=; h=Date:To:From:Reply-To:Subject:From; b=b7uQgsdTtEng4Vz5etaT1Zb9O+NgR/29EZEkvz+8ip+U2XlqvAa7waE05a3jwjmtl +uS2NAUTr/l8HCBDrvAgfckphJ4CUBT0YqXsRg+mDAiCQd+VmD4QYnpqQW95yYVgog ZN3bKw9CRkC62zH9PyrJ2OOIXIeRnzMhiiHUFgCJ5rppNWuKxrOAqYcy9OmrqC9yAN Q2RtgrsbFXecvXODDA6r+88CKPR93wMZqyLxw+w7LNVg8h/LDg/UZ9WcupkhX4sk/v EDct7h9NHfdGTIej6/tR5AjXlr7c0E0WRRzmfdsASM0jvxt64OU99VBjetbDsT/tK0 ELCe/LOlPvU6A== Received-SPF: pass client-ip=188.165.51.139; envelope-from=john@rootabega.net; helo=mail-0301.mail-europe.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Thu, 16 Sep 2021 19:38:05 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:214517 Archived-At: This is a multi-part message in MIME format. --b1_YwdiKnKrvnmWgFCo7QO8fo3kxWR7EcJHVETZI87VkC4 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello, long time emacs user; first time reporter. Apologies if I do anythin= g wrong here. The verbose output for list-directory always shows the free space for the c= urrent directory of the buffer where it was called, not the target director= y that is supplied as an argument. This may have been first introduced in 849051903e7, while fixing this repor= t: https://lists.gnu.org/archive/html/bug-gnu-emacs/2002-03/msg00251.html The result was that, while the *Directory* output buffer's current director= y was set correctly, setting it last meant that the free space calculation = always took place in "." rather than the argument to list-directory. Here are commands/output to demonstrate. Note that the free space changes f= or the same directory argument when I change the current directory, since t= he two different directories are on different disks. (eval-expression (pwd) t) "Directory ~/emacs/" (eval-expression (list-directory "~" t) t) "/home/emacsdev/" (insert-buffer-substring "*Directory*") Directory /home/emacsdev total used in directory 0 available 15.5 GiB lrwxrwxrwx 1 /emacsdev /emacsdev 26 Sep 16 17:45 emacs -> /media/ubuntu/t= urkey/emacs lrwxrwxrwx 1 /emacsdev /emacsdev 34 Sep 16 17:44 emacs-project -> /media/= ubuntu/turkey/emacs-project (cd "/") (eval-expression (pwd) t) "Directory /" (eval-expression (list-directory "~" t) t) "/home/emacsdev/" (insert-buffer-substring "*Directory*") Directory /home/emacsdev total used in directory 0 available 7.7 GiB lrwxrwxrwx 1 /emacsdev /emacsdev 26 Sep 16 17:45 emacs -> /media/ubuntu/t= urkey/emacs lrwxrwxrwx 1 /emacsdev /emacsdev 34 Sep 16 17:44 emacs-project -> /media/= ubuntu/turkey/emacs-project Changing the call to get-free-disk-space seemed to work in the attached pat= ch, but I haven't attempted to dig deeper and check for any regressions. I = would be glad to do that, but would need more time to research and would pr= obably ask for more help to do it. Thanks for everything! In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.20, c= airo version 1.16.0) of 2021-09-10 built on ubuntu Repository revision: ceb60225bacc7650b5e52032c0c33b9d67f9a6d7 Repository branch: master System Description: Ubuntu 20.04.1 LTS Configured features: CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG LIBSELINUX LIBXML2 MODULES NOTIFY INOTIFY PDUMPER PNG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM GTK3 ZLIB Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util rmail rmail-loaddefs auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json map time-date mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils subr-x pcase misearch multi-isearch vc-git diff-mode easy-mmode vc-dispatcher bug-reference find-func cl-extra shortdoc text-property-search seq mule-diag thingatpt help-fns radix-tree help-mode cl-loaddefs cl-lib term/xterm xterm byte-opt gv bytecomp byte-compile cconv iso-transl tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads dbusbind inotify dynamic-setting system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 99674 10407) (symbols 48 8011 1) (strings 32 25795 958) (string-bytes 1 846999) (vectors 16 13457) (vector-slots 8 152638 6184) (floats 8 90 749) (intervals 56 1088 62) (buffers 992 16)) --b1_YwdiKnKrvnmWgFCo7QO8fo3kxWR7EcJHVETZI87VkC4 Content-Type: text/x-patch; name=0001-text-verbose-dir-fix.patch Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=0001-text-verbose-dir-fix.patch RnJvbSA4N2RiZjczYzIwOWU3MDM4MmRiNjRjMmQxOTZiNzYxZDY1NmRmNDA5IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBlbWFjcyBkZXYgPG5vb25lQGV4YW1wbGUuY29tPgpEYXRlOiBU aHUsIDE2IFNlcCAyMDIxIDE4OjQ5OjQzIC0wNDAwClN1YmplY3Q6IFtQQVRDSF0gdGV4dCB2ZXJi b3NlIGRpciBmaXgKCi0tLQogbGlzcC9maWxlcy5lbCB8IDIgKy0KIDEgZmlsZSBjaGFuZ2VkLCAx IGluc2VydGlvbigrKSwgMSBkZWxldGlvbigtKQoKZGlmZiAtLWdpdCBhL2xpc3AvZmlsZXMuZWwg Yi9saXNwL2ZpbGVzLmVsCmluZGV4IDdlNGJkYWI1MDcuLmVmMGM0YWM0NTggMTAwNjQ0Ci0tLSBh L2xpc3AvZmlsZXMuZWwKKysrIGIvbGlzcC9maWxlcy5lbApAQCAtNzYwOCw3ICs3NjA4LDcgQEAg aW5zZXJ0LWRpcmVjdG9yeQogCQkgIDs7IFJlcGxhY2UgInRvdGFsIiB3aXRoICJ0b3RhbCB1c2Vk IGluIGRpcmVjdG9yeSIgdG8KIAkJICA7OyBhdm9pZCBjb25mdXNpb24uCiAJCSAgKHJlcGxhY2Ut bWF0Y2ggInRvdGFsIHVzZWQgaW4gZGlyZWN0b3J5IiBuaWwgbmlsIG5pbCAxKQotCQkgIChsZXQg KChhdmFpbGFibGUgKGdldC1mcmVlLWRpc2stc3BhY2UgIi4iKSkpCisJCSAgKGxldCAoKGF2YWls YWJsZSAoZ2V0LWZyZWUtZGlzay1zcGFjZSBmaWxlKSkpCiAJCSAgICAod2hlbiBhdmFpbGFibGUK IAkJICAgICAgKGVuZC1vZi1saW5lKQogCQkgICAgICAoaW5zZXJ0ICIgYXZhaWxhYmxlICIgYXZh aWxhYmxlKSkpKSkpKSkpKQotLSAKMi4yNS4xCgo= --b1_YwdiKnKrvnmWgFCo7QO8fo3kxWR7EcJHVETZI87VkC4--