GNU bug report logs - #27693
26.0.50; ls-lisp: Wrong file size format

Previous Next

Package: emacs;

Reported by: Tino Calancha <tino.calancha <at> gmail.com>

Date: Fri, 14 Jul 2017 15:32:01 UTC

Severity: normal

Found in version 26.0.50

Done: Tino Calancha <tino.calancha <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 27693 in the body.
You can then email your comments to 27693 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#27693; Package emacs. (Fri, 14 Jul 2017 15:32:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Tino Calancha <tino.calancha <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 14 Jul 2017 15:32:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Tino Calancha <tino.calancha <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.0.50; ls-lisp: Wrong file size format
Date: Sat, 15 Jul 2017 00:31:37 +0900
emacs -Q -l dired -l ls-lisp -eval '(setq ls-lisp-use-insert-directory-program nil)'
M-: (dired (list (expand-file-name "lisp" source-directory) "simple.el"
"subr.el")) RET
;; No space between the group name and the file size.


--8<-----------------------------cut here---------------start------------->8---
commit f2bb26b2e028e69d0d9ca77a37c5d29c1a071b4f
Author: Tino Calancha <tino.calancha <at> gmail.com>
Date:   Sat Jul 15 00:28:12 2017 +0900

    ls-lisp: Fix file size format
    
    * lisp/ls-lisp.el (ls-lisp-filesize-d-fmt, ls-lisp-filesize-f-fmt)
    (ls-lisp-filesize-b-fmt): Add space in front (Bug#27693).
    * test/lisp/dired-tests.el (dired-test-bug27693): Add test.

diff --git a/lisp/ls-lisp.el b/lisp/ls-lisp.el
index 7ae2343441..b368efbbc9 100644
--- a/lisp/ls-lisp.el
+++ b/lisp/ls-lisp.el
@@ -245,11 +245,11 @@ ls-lisp-gid-d-fmt
   "Format to display integer GIDs.")
 (defvar ls-lisp-gid-s-fmt " %s"
   "Format to display user group names.")
-(defvar ls-lisp-filesize-d-fmt "%d"
+(defvar ls-lisp-filesize-d-fmt " %d"
   "Format to display integer file sizes.")
-(defvar ls-lisp-filesize-f-fmt "%.0f"
+(defvar ls-lisp-filesize-f-fmt " %.0f"
   "Format to display float file sizes.")
-(defvar ls-lisp-filesize-b-fmt "%.0f"
+(defvar ls-lisp-filesize-b-fmt " %.0f"
   "Format to display file sizes in blocks (for the -s switch).")
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
diff --git a/test/lisp/dired-tests.el b/test/lisp/dired-tests.el
index 1b814baac5..208e1c2509 100644
--- a/test/lisp/dired-tests.el
+++ b/test/lisp/dired-tests.el
@@ -84,5 +84,17 @@
       (advice-remove 'dired-query "advice-dired-query")
       (advice-remove 'completing-read "advice-completing-read"))))
 
+(ert-deftest dired-test-bug27693 ()
+  "Test for http://debbugs.gnu.org/27693 ."
+  (require 'ls-lisp)
+  (let ((size "")
+	ls-lisp-use-insert-directory-program)
+    (dired (list (expand-file-name "lisp" source-directory) "simple.el" "subr.el"))
+    (setq size (number-to-string
+                (file-attribute-size
+                 (file-attributes (dired-get-filename)))))
+    (search-backward-regexp size nil t)
+    (should (looking-back "[[:space:]]" (1- (point))))))
+
 (provide 'dired-tests)
 ;; dired-tests.el ends here
--8<-----------------------------cut here---------------end--------------->8---

In GNU Emacs 26.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.11)
 of 2017-07-14
Repository revision: 6e2d6d54e1236216462c13655ea1fe573d9672e7




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#27693; Package emacs. (Sat, 15 Jul 2017 12:41:01 GMT) Full text and rfc822 format available.

Message #8 received at 27693 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Tino Calancha <tino.calancha <at> gmail.com>
Cc: 27693 <at> debbugs.gnu.org
Subject: Re: bug#27693: 26.0.50; ls-lisp: Wrong file size format
Date: Sat, 15 Jul 2017 15:40:30 +0300
> From: Tino Calancha <tino.calancha <at> gmail.com>
> Date: Sat, 15 Jul 2017 00:31:37 +0900
> 
> emacs -Q -l dired -l ls-lisp -eval '(setq ls-lisp-use-insert-directory-program nil)'
> M-: (dired (list (expand-file-name "lisp" source-directory) "simple.el"
> "subr.el")) RET
> ;; No space between the group name and the file size.
> 
> 
> --8<-----------------------------cut here---------------start------------->8---
> commit f2bb26b2e028e69d0d9ca77a37c5d29c1a071b4f
> Author: Tino Calancha <tino.calancha <at> gmail.com>
> Date:   Sat Jul 15 00:28:12 2017 +0900
> 
>     ls-lisp: Fix file size format
>     
>     * lisp/ls-lisp.el (ls-lisp-filesize-d-fmt, ls-lisp-filesize-f-fmt)
>     (ls-lisp-filesize-b-fmt): Add space in front (Bug#27693).
>     * test/lisp/dired-tests.el (dired-test-bug27693): Add test.

Thanks, please push.




Reply sent to Tino Calancha <tino.calancha <at> gmail.com>:
You have taken responsibility. (Sat, 15 Jul 2017 15:36:01 GMT) Full text and rfc822 format available.

Notification sent to Tino Calancha <tino.calancha <at> gmail.com>:
bug acknowledged by developer. (Sat, 15 Jul 2017 15:36:02 GMT) Full text and rfc822 format available.

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

From: Tino Calancha <tino.calancha <at> gmail.com>
To: 27693-done <at> debbugs.gnu.org
Subject: Re: bug#27693: 26.0.50; ls-lisp: Wrong file size format
Date: Sun, 16 Jul 2017 00:35:41 +0900
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Tino Calancha <tino.calancha <at> gmail.com>
>> Date: Sat, 15 Jul 2017 00:31:37 +0900
>> 
>> emacs -Q -l dired -l ls-lisp -eval '(setq ls-lisp-use-insert-directory-program nil)'
>> M-: (dired (list (expand-file-name "lisp" source-directory) "simple.el"
>> "subr.el")) RET
>> ;; No space between the group name and the file size.
>> 
>> 
>> --8<-----------------------------cut here---------------start------------->8---
>> commit f2bb26b2e028e69d0d9ca77a37c5d29c1a071b4f
>> Author: Tino Calancha <tino.calancha <at> gmail.com>
>> Date:   Sat Jul 15 00:28:12 2017 +0900
>> 
>>     ls-lisp: Fix file size format
>>     
>>     * lisp/ls-lisp.el (ls-lisp-filesize-d-fmt, ls-lisp-filesize-f-fmt)
>>     (ls-lisp-filesize-b-fmt): Add space in front (Bug#27693).
>>     * test/lisp/dired-tests.el (dired-test-bug27693): Add test.
>
> Thanks, please push.
Sir, yes, sir! (S. Kubrick tribute)
Pushed to master as commit
66683f46b877a8c2baa5fdedfb332618a1973db5




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 13 Aug 2017 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 7 years and 104 days ago.

Previous Next


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