* [shfukaya@yahoo.co.jp: ls-lisp, likely bug]
@ 2004-06-02 17:37 Richard Stallman
0 siblings, 0 replies; only message in thread
From: Richard Stallman @ 2004-06-02 17:37 UTC (permalink / raw)
Would those who work on ls-lisp.el please DTRT?
------- Start of forwarded message -------
X-Apparently-From: <shfukaya@yahoo.co.jp>
From: Shigeru Fukaya <shfukaya@yahoo.co.jp>
To: bug-gnu-emacs@gnu.org
Date: Wed, 02 Jun 2004 01:04:13 +0900
Subject: ls-lisp, likely bug
Sender: bug-gnu-emacs-bounces+rms=gnu.org@gnu.org
X-Spam-Status: No, hits=0.0 required=5.0
tests=none
version=2.55
X-Spam-Level:
X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp)
Hello,
I found ls-lisp is not compatible with the ls command when -c or -u is
specified in sort and displayed information.
% ls --help
-c with -lt: sort by, and show, ctime (time of last
modification of file status information)
with -l: show ctime and sort by name
otherwise: sort by ctime
-t sort by modification time
-u with -lt: sort by, and show, access time
with -l: show access time and sort by name
otherwise: sort by access time
To correct it:
ls-lisp.el (emacs 21.1.1 through 21.3)
(1) ls-lisp-handle-switches
original: (always sorted by creation/modification time)
((setq index (ls-lisp-time-index switches))
(lambda (x y) ; sorted on time
(ls-lisp-time-lessp (nth index (cdr y))
revised:
((and (setq index (ls-lisp-time-index switches))
(or (memq ?t switches) (null (memq ?l switches))))
(lambda (x y) ; sorted on time
(ls-lisp-time-lessp (nth index (cdr y))
(nth index (cdr x)))))
(2) ls-lisp-time-index
original:
(cond ((memq ?c switches) 6) ; last mode change
((memq ?t switches) 5) ; last modtime
((memq ?u switches) 4))) ; last access
revised: (things go better when -t is the last choice)
(cond ((memq ?c switches) 6) ; last mode change
((memq ?u switches) 4) ; last access
((memq ?t switches) 5) ; last modtime
))
Regards,
Shigeru
__________________________________________________
Do You Yahoo!?
http://bb.yahoo.co.jp/
_______________________________________________
Bug-gnu-emacs mailing list
Bug-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-gnu-emacs
------- End of forwarded message -------
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-06-02 17:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-02 17:37 [shfukaya@yahoo.co.jp: ls-lisp, likely bug] Richard Stallman
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.