From: Tino Calancha <tino.calancha@gmail.com>
To: 27693@debbugs.gnu.org
Subject: bug#27693: 26.0.50; ls-lisp: Wrong file size format
Date: Sat, 15 Jul 2017 00:31:37 +0900 [thread overview]
Message-ID: <87pod3vxuu.fsf@calancha-pc> (raw)
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
next reply other threads:[~2017-07-14 15:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-14 15:31 Tino Calancha [this message]
2017-07-15 12:40 ` bug#27693: 26.0.50; ls-lisp: Wrong file size format Eli Zaretskii
2017-07-15 15:35 ` Tino Calancha
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87pod3vxuu.fsf@calancha-pc \
--to=tino.calancha@gmail.com \
--cc=27693@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).