GNU bug report logs - #8440
[PATCH] eshell - Display ls -l dates in ISO 8601 format

Previous Next

Package: emacs;

Reported by: Jari Aalto <jari.aalto <at> cante.net>

Date: Thu, 7 Apr 2011 16:12:02 UTC

Severity: wishlist

Tags: patch

Found in version 23.2+1-7

Done: Chong Yidong <cyd <at> stupidchicken.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 8440 in the body.
You can then email your comments to 8440 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 owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8440; Package emacs. (Thu, 07 Apr 2011 16:12:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jari Aalto <jari.aalto <at> cante.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 07 Apr 2011 16:12:02 GMT) Full text and rfc822 format available.

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

From: Jari Aalto <jari.aalto <at> cante.net>
To: submit <at> debbugs.gnu.org
Subject: [PATCH] eshell - Display ls -l dates in ISO 8601 format
Date: Thu, 07 Apr 2011 19:11:31 +0300
[Message part 1 (text/plain, inline)]
Package: emacs
Version: 23.2+1-7
Severity: wishlist

The use of locale for displaying dates is problematic outside of English;
An example using FI locale:

    eshell$ ls -l
    -rw-rw-rw-   1 user          users   39269 maalis  7 18:29 align.elc
    -rw-rw-rw-   1 user          users  297856 helmi 23 11:11 allout.el
    -rw-rw-rw-   1 user          users  213672 maalis  7 18:29 allout.elc
    -rw-rw-rw-   1 user          users   25176 tammi  8 11:45 ansi-color.el

The output appears rugged and is hard to read. The following patch make "ls
-l" use international ISO 8601 date format:

    -rw-rw-rw-   1 user          users   39269 2011-03-07 18:29 align.elc
    -rw-rw-rw-   1 user          users  297856 2011-02-23 11:11 allout.el
    -rw-rw-rw-   1 user          users  213672 2011-03-07 18:29 allout.elc
    -rw-rw-rw-   1 user          users   25176 2011-01-08 11:45 ansi-color.el

2011-04-07  Jari Aalto  <jari.aalto <at> cante.net>

        * eshell/em-ls.el
        (eshell-ls-date-format): New variable. Show dates in ISO 8601
        format by default.
        (eshell-ls-file): Use `eshell-ls-date-format'.

-- System Information
Debian Release: wheezy/sid
  APT Prefers testing
  APT policy: (990, testing) (500, unstable) (1, experimental)
Architecture: amd64
Kernel: Linux picasso 2.6.32-5-amd64 #1 SMP Wed Jan 12 03:40:32 UTC 2011 x86_64 GNU/Linux
Locale: LANG=en_US.UTF-8, LC_ALL=

-- Versions of packages `emacs depends on'.
Depends:
emacs23         23.2+1-7        GNU Emacs is the extensible self-documenting 
emacs23-lucid   23.2+1-7        GNU Emacs is the extensible self-documenting 
emacs23-nox     23.2+1-7        GNU Emacs is the extensible self-documenting 

[0001-lisp-eshell-em-ls.el-use-ISO-8601-in-ls-l-output.patch (text/x-diff, inline)]
From 16f782c350b0e97cdf4b58e23797cd0607c82d5b Mon Sep 17 00:00:00 2001
From: Jari Aalto <jari.aalto <at> cante.net>
Date: Thu, 7 Apr 2011 19:00:46 +0300
Subject: [PATCH] lisp/eshell/em-ls.el: use ISO 8601 in ls -l output
Organization: Private
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit


Signed-off-by: Jari Aalto <jari.aalto <at> cante.net>
---
 lisp/eshell/em-ls.el |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/lisp/eshell/em-ls.el b/lisp/eshell/em-ls.el
index 4ef259d..c7da459 100644
--- a/lisp/eshell/em-ls.el
+++ b/lisp/eshell/em-ls.el
@@ -57,6 +57,13 @@ properties to colorize its output based on the setting of
   :type 'hook
   :group 'eshell-ls)
 
+(defcustom eshell-ls-date-format "%Y-%m-%d "
+  "*How to display time information in `eshell-ls-file'.
+For current locale, use \"%b \%e".
+See `format-time-string'."
+  :type 'string)
+  :group 'eshell-ls)
+
 (defcustom eshell-ls-initial-args nil
   "If non-nil, this list of args is included before any call to `ls'.
 This is useful for enabling human-readable format (-h), for example."
@@ -508,7 +515,7 @@ whose cdr is the list of file attributes."
 		    str))
 		" " (format-time-string
 		     (concat
-		      "%b %e "
+		      eshell-ls-date-format
 		      (if (= (nth 5 (decode-time (current-time)))
 			     (nth 5 (decode-time
 				     (nth (cond
-- 
1.7.4.1


Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8440; Package emacs. (Mon, 27 Jun 2011 21:49:01 GMT) Full text and rfc822 format available.

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

From: Chong Yidong <cyd <at> stupidchicken.com>
To: Jari Aalto <jari.aalto <at> cante.net>
Cc: 8440 <at> debbugs.gnu.org
Subject: Re: bug#8440: [PATCH] eshell - Display ls -l dates in ISO 8601 format
Date: Mon, 27 Jun 2011 17:48:28 -0400
Jari Aalto <jari.aalto <at> cante.net> writes:

> The following patch make "ls -l" use international ISO 8601 date
> format:

Thanks.  Committed to trunk.  BTW, it's no longer necessary nor
desireable to start option docstrings with *.




bug closed, send any further explanations to 8440 <at> debbugs.gnu.org and Jari Aalto <jari.aalto <at> cante.net> Request was from Chong Yidong <cyd <at> stupidchicken.com> to control <at> debbugs.gnu.org. (Mon, 27 Jun 2011 21:49:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 26 Jul 2011 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 13 years and 337 days ago.

Previous Next


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