From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Shigeru Fukaya Newsgroups: gmane.emacs.bugs Subject: ls-lisp, likely bug Date: Wed, 02 Jun 2004 01:04:13 +0900 Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Message-ID: <70C447F2152D2Bshfukaya@yahoo.co.jp> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1086105960 24797 80.91.224.253 (1 Jun 2004 16:06:00 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 1 Jun 2004 16:06:00 +0000 (UTC) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jun 01 18:05:48 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BVBlr-0000aQ-00 for ; Tue, 01 Jun 2004 18:05:48 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BVBm6-0001En-Rw for geb-bug-gnu-emacs@m.gmane.org; Tue, 01 Jun 2004 12:06:02 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1BVBkq-0008W0-Ty for bug-gnu-emacs@gnu.org; Tue, 01 Jun 2004 12:04:45 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1BVBkl-0008SR-RB for bug-gnu-emacs@gnu.org; Tue, 01 Jun 2004 12:04:42 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BVBkl-0008S1-Od for bug-gnu-emacs@gnu.org; Tue, 01 Jun 2004 12:04:39 -0400 Original-Received: from [211.14.15.205] (helo=dns02.mail.yahoo.co.jp) by monty-python.gnu.org with smtp (Exim 4.34) id 1BVBkT-000422-Mz for bug-gnu-emacs@gnu.org; Tue, 01 Jun 2004 12:04:22 -0400 Original-Received: from unknown (HELO yahoo.co.jp) (221.21.76.33 with poptime) by dns02.mail.yahoo.co.jp with SMTP; 1 Jun 2004 16:04:15 -0000 X-Apparently-From: Original-To: bug-gnu-emacs@gnu.org X-Mailer: TuruKame 3.55 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.bugs:8091 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:8091 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/