From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jari Aalto Newsgroups: gmane.emacs.bugs Subject: bug#8440: [PATCH] eshell - Display ls -l dates in ISO 8601 format Date: Thu, 07 Apr 2011 19:11:31 +0300 Message-ID: <87mxk2avnw.fsf@blue.sea.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: dough.gmane.org 1302194254 26678 80.91.229.12 (7 Apr 2011 16:37:34 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 7 Apr 2011 16:37:34 +0000 (UTC) To: 8440@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Apr 07 18:37:29 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Q7sD0-0003is-70 for geb-bug-gnu-emacs@m.gmane.org; Thu, 07 Apr 2011 18:37:26 +0200 Original-Received: from localhost ([127.0.0.1]:50588 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q7sCz-0003Ro-NV for geb-bug-gnu-emacs@m.gmane.org; Thu, 07 Apr 2011 12:37:25 -0400 Original-Received: from [140.186.70.92] (port=40736 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q7sCt-0003LU-7z for bug-gnu-emacs@gnu.org; Thu, 07 Apr 2011 12:37:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q7sCr-0003pT-Qg for bug-gnu-emacs@gnu.org; Thu, 07 Apr 2011 12:37:19 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:56228) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q7sCr-0003pP-Ov for bug-gnu-emacs@gnu.org; Thu, 07 Apr 2011 12:37:17 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1Q7roQ-0002z5-G3; Thu, 07 Apr 2011 12:12:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jari Aalto Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 07 Apr 2011 16:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 8440 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: submit@debbugs.gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.130219270611443 (code B ref -1); Thu, 07 Apr 2011 16:12:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 7 Apr 2011 16:11:46 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q7ro9-0002yW-HL for submit@debbugs.gnu.org; Thu, 07 Apr 2011 12:11:45 -0400 Original-Received: from emh04.mail.saunalahti.fi ([62.142.5.110]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q7ro7-0002yH-3Y for submit@debbugs.gnu.org; Thu, 07 Apr 2011 12:11:44 -0400 Original-Received: from saunalahti-vams (vs3-10.mail.saunalahti.fi [62.142.5.94]) by emh04-2.mail.saunalahti.fi (Postfix) with SMTP id 2B52413B780 for ; Thu, 7 Apr 2011 19:11:35 +0300 (EEST) Original-Received: from emh06.mail.saunalahti.fi ([62.142.5.116]) by vs3-10.mail.saunalahti.fi ([62.142.5.94]) with SMTP (gateway) id A014C920E66; Thu, 07 Apr 2011 19:11:35 +0300 Original-Received: from cante.net (a91-155-187-216.elisa-laajakaista.fi [91.155.187.216]) by emh06.mail.saunalahti.fi (Postfix) with ESMTP id F1D0CE51A5 for ; Thu, 7 Apr 2011 19:11:31 +0300 (EEST) Mail-Copies-To: poster X-Antivirus: VAMS X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Thu, 07 Apr 2011 12:12:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:45679 Archived-At: --=-=-= Content-Type: text/plain 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 * 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 --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-lisp-eshell-em-ls.el-use-ISO-8601-in-ls-l-output.patch >From 16f782c350b0e97cdf4b58e23797cd0607c82d5b Mon Sep 17 00:00:00 2001 From: Jari Aalto 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 --- 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 --=-=-=--