[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Dired Sort Bug



I was doing a dired sort on size on our bulletin boards and noticed that
the sort came out incorrectly.  The problem turned out to be some of the
author names like TCP-IP-REQUEST and any author names with a dash.  The
solution is quite simple.

Change the following in & DIRED Sort:
	q0-≡F"e @ft Filename◊ :i1 ◊ :i2 ◊ 1;'
	:i1 -2s-$α -@:fα_≥⊃ $@l ◊ :i2 fs fdconv$◊
to:
	q0-≡F"e @ft Filename◊ :i1 ◊ :i2 ◊ 1;'
	:i1 -2sα$α -2s-$α -@:fα_≥⊃ $@l ◊ :i2 fs fdconv$◊

By the way, I added Sort on Author if anyone is interested.  The changes
follow after the equal signs.

	- Peter

========================================================================
;COMPARISON OF DREA:<EMACS>DIRED.EMACS.46 AND DREA:<EMACS>DIRED.EMACS.48
;OPTIONS ARE    /3

**** FILE DREA:<EMACS>DIRED.EMACS.46, 1-2 (18)
!* <GERGELY.NEMACS>DIRED.EMACS.12, 26-Sep-83 15:19:49, Edit by GERGELY!
**** FILE DREA:<EMACS>DIRED.EMACS.48, 1-2 (18)
!* <EMACS>DIRED.EMACS.48, 12-Dec-85 22:09:26, Edit by GERGELY!
***************

**** FILE DREA:<EMACS>DIRED.EMACS.46, 17-7 (16235)
	q0-≡C"e @ft Chronological_◊ 1;'
	q0-≡F"e @ft Filename◊ :i1 ◊ :i2 ◊ 1;'
	:i1 -2s-$α -@:fα_≥⊃ $@l ◊ :i2 fs fdconv$◊
**** FILE DREA:<EMACS>DIRED.EMACS.48, 17-7 (16226)
	q0-≡A"e @ft Author◊ 1;'
	q0-≡C"e @ft Chronological_◊ 1;'
	q0-≡F"e @ft Filename◊ :i1 ◊ :i2 ◊ 1;'
	:i1 -2sα$α -2s-$α -@:fα_≥⊃ $@l ◊ :i2 fs fdconv$◊
***************

**** FILE DREA:<EMACS>DIRED.EMACS.46, 17-13 (16428)
	:i1 ≥∪1 -fw@l◊ :i2 \ ◊
	q0-≡S"e @ft Size◊ 1;'
	q0-≡?"e @ft (C_Chronologically,_F_Filename,_S_Size,_R_Read_date,_W_Write_date)
**** FILE DREA:<EMACS>DIRED.EMACS.48, 17-14 (16452)
	:i1 ≥∪1 -fwl◊ :i2 \ ◊
	q0-≡S"e @ft Size◊ 1;'
	q0-≡?"e @ft (A_Author,_C_Chronological,_F_File,_S_Size,_R_Read_date,_W_Write_date)
***************

**** FILE DREA:<EMACS>DIRED.EMACS.46, 17-29 (16928)
    Q0-≡F"E			    !* Special sort for filenames!
**** FILE DREA:<EMACS>DIRED.EMACS.48, 17-31 (16957)
    Q0-≡A"E
	1F[^PCaseâ—Š
	→"L:'⊂ :@L -S__$α◊:@L◊1@L◊
	≤'
    Q0-≡F"E			    !* Special sort for filenames!
	1F[^PCaseâ—Š
***************

-------