* bug#8440: [PATCH] eshell - Display ls -l dates in ISO 8601 format
@ 2011-04-07 16:11 Jari Aalto
2011-06-27 21:48 ` Chong Yidong
0 siblings, 1 reply; 2+ messages in thread
From: Jari Aalto @ 2011-04-07 16:11 UTC (permalink / raw)
To: 8440
[-- Attachment #1: Type: text/plain, Size: 1687 bytes --]
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@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
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-lisp-eshell-em-ls.el-use-ISO-8601-in-ls-l-output.patch --]
[-- Type: text/x-diff, Size: 1389 bytes --]
From 16f782c350b0e97cdf4b58e23797cd0607c82d5b Mon Sep 17 00:00:00 2001
From: Jari Aalto <jari.aalto@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@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
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-06-27 21:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-07 16:11 bug#8440: [PATCH] eshell - Display ls -l dates in ISO 8601 format Jari Aalto
2011-06-27 21:48 ` Chong Yidong
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.