all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#27693: 26.0.50; ls-lisp: Wrong file size format
@ 2017-07-14 15:31 Tino Calancha
  2017-07-15 12:40 ` Eli Zaretskii
  0 siblings, 1 reply; 3+ messages in thread
From: Tino Calancha @ 2017-07-14 15:31 UTC (permalink / raw
  To: 27693

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@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).")
 \f
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
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





^ permalink raw reply related	[flat|nested] 3+ messages in thread

* bug#27693: 26.0.50; ls-lisp: Wrong file size format
  2017-07-14 15:31 bug#27693: 26.0.50; ls-lisp: Wrong file size format Tino Calancha
@ 2017-07-15 12:40 ` Eli Zaretskii
  2017-07-15 15:35   ` Tino Calancha
  0 siblings, 1 reply; 3+ messages in thread
From: Eli Zaretskii @ 2017-07-15 12:40 UTC (permalink / raw
  To: Tino Calancha; +Cc: 27693

> From: Tino Calancha <tino.calancha@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@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.





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#27693: 26.0.50; ls-lisp: Wrong file size format
  2017-07-15 12:40 ` Eli Zaretskii
@ 2017-07-15 15:35   ` Tino Calancha
  0 siblings, 0 replies; 3+ messages in thread
From: Tino Calancha @ 2017-07-15 15:35 UTC (permalink / raw
  To: 27693-done

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Tino Calancha <tino.calancha@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@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





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-07-15 15:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-14 15:31 bug#27693: 26.0.50; ls-lisp: Wrong file size format Tino Calancha
2017-07-15 12:40 ` Eli Zaretskii
2017-07-15 15:35   ` Tino Calancha

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.