all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* dired-ls-sorting-switches
@ 2003-10-19  9:40 joseph
  2003-10-19 10:26 ` dired-ls-sorting-switches era
  0 siblings, 1 reply; 7+ messages in thread
From: joseph @ 2003-10-19  9:40 UTC (permalink / raw)


To: bug-gnu-emacs@gnu.org
Subject: dired-ls-sorting-switches
Reply-to: josephpatterson@lucent.com
FCC: ~/rmail
--text follows this line--
This bug report will be sent to the Free Software Foundation,
not to your local site managers!
Please write in English, because the Emacs maintainers do not have
translators to read other languages for them.

Your bug report will be posted to the bug-gnu-emacs@gnu.org mailing list,
and to the gnu.emacs.bug news group.

In GNU Emacs 21.2.1 (i386-redhat-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2003-02-20 on porky.devel.redhat.com
configured using `configure  --host=i386-redhat-linux --build=i386-redhat-linux
--target=i386-redhat-linux-gnu --program-prefix= --prefix=/usr --exec-prefix=/usr
--bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share
--includedir=/usr/include --libdir=/usr/lib --libexecdir=/usr/libexec --localstatedir=/var
--sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info --with-gcc
--with-pop --with-sound'
Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8
  default-enable-multibyte-characters: t

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

Dired mode fails to honor the value of dired-ls-sorting-switches.  When I open an
xterm and type "ls -lav", I get the directory listing that I am accustomed to and 
greatly prefer.  When I set dired-ls-sorting-switches in my .emacs file to "lav",
there is no change in the sorting order of the same directory when in dired-mode in
an emacs window.  I really despise the default sorting order.  It is an abomination.

The help for dired-ls-sorting-switches indicates that it controls sorting
used in dired mode.  That help is as follows:

Documentation:
String of `ls' switches (single letters) except `t' that influence sorting.

I completely despise the default sorting rules forced on me by recent versions of
linux and they are exacerbated by Stallman's constructing ls as a bash shell builtin.
That prevents me from redefining ls to always use the -v option in my bin and setting
my bin ahead of all other PATH directories.  I am forced to the unpleasantness of
changing the name of ls to get it to default to sorting using the -v option.  I can
understand that emacs ought to follow the environmental defaults.  Emacs should at least
honor the changes to dired-ls-sorting-switches when in dired mode.  Stallman deserves
an angry email from each person who shares my irritation.  Feedback is an important
part of progress.

Joseph Patterson
joseph@vlsidesigntools.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: dired-ls-sorting-switches
  2003-10-19  9:40 dired-ls-sorting-switches joseph
@ 2003-10-19 10:26 ` era
  2003-10-19 11:41   ` dired-ls-sorting-switches era
  0 siblings, 1 reply; 7+ messages in thread
From: era @ 2003-10-19 10:26 UTC (permalink / raw)


On Sun, 19 Oct 2003 05:40:31 -0400, <joseph@vlsidesigntools.com> posted to
gmane.emacs.bugs:
 > Dired mode fails to honor the value of dired-ls-sorting-switches.
<...>
 > The help for dired-ls-sorting-switches indicates that it controls sorting
 > used in dired mode.  That help is as follows:
 > Documentation:
 > String of `ls' switches (single letters) except `t' that influence sorting.

It appears that you misunderstand the meaning of this variable. As per
a check against the source, it appears to be an internal variable for
keeping track of which option switches for ls, when present, will need
special handling because they will affect the sorting of the listing.

Try changing `dired-listing-switches' to "-lav" instead. (I believe
you will have to explicitly kill any existing dired buffers and run
dired on them anew for this to really take effect -- just pressing "g"
in a dired buffer is apparently not enough, nor will doing "q" and
rerunning dired on a directory you already have a listing of force it
to resort.)

Hope this helps,

/* era */

 > Stallman deserves an angry email from each person who shares my irritation.

I don't think that's a very constructive suggestion.

-- 
The email address era     the contact information   Just for kicks, imagine
at iki dot fi is heavily  link on my home page at   what it's like to get
spam filtered.  If you    <http://www.iki.fi/era/>  500 pieces of spam for
want to reach me, see     instead.                  each wanted message.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: dired-ls-sorting-switches
  2003-10-19 10:26 ` dired-ls-sorting-switches era
@ 2003-10-19 11:41   ` era
  2003-10-19 11:54     ` dired-ls-sorting-switches era
  0 siblings, 1 reply; 7+ messages in thread
From: era @ 2003-10-19 11:41 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 984 bytes --]

On 19 Oct 2003 13:26:11 +0300, era@iki.fi posted to gmane.emacs.bugs:
 > On Sun, 19 Oct 2003 05:40:31 -0400, <joseph@vlsidesigntools.com> posted to
 > gmane.emacs.bugs:
 >> Dired mode fails to honor the value of dired-ls-sorting-switches.
 > <...>
 >> The help for dired-ls-sorting-switches indicates that it controls sorting
 >> used in dired mode.  That help is as follows:
 >> Documentation:
 >> String of `ls' switches (single letters) except `t' that influence sorting.
 > It appears that you misunderstand the meaning of this variable. As per
 > a check against the source, it appears to be an internal variable for
 > keeping track of which option switches for ls, when present, will need
 > special handling because they will affect the sorting of the listing.

Here's a proposed patch against the current CVS. (See attached diff.)

Maybe this is a bit of overkill but at least some clarification and/or
disambiguation would be good to add to the doc string IMHO.

/* era */


[-- Attachment #2: Proposed patch against emacs/emacs/lisp/dired.el 1.269 --]
[-- Type: text/plain, Size: 534 bytes --]

--- /etc/cups/printers.conf~	Fri Jun 13 10:15:29 2003
+++ /etc/cups/printers.conf	Tue Oct 14 14:00:22 2003
@@ -1,6 +1,15 @@
 # Printer configuration file for CUPS v1.1.14
 # Written by cupsd on Fri Feb 14 13:38:35 2003
-<DefaultPrinter htc4>
+<DefaultPrinter htc5>
+DeviceURI smb://eriker:d3ltr33/w1nnt@dfntserver1/Floor5_Canon1
+State Idle
+Accepting Yes
+JobSheets none none
+QuotaPeriod 0
+PageLimit 0
+KLimit 0
+</Printer>
+<Printer htc4>
 DeviceURI smb://eriker:d3ltr33/w1nnt@dfntserver1/Floor4_Canon1
 State Idle
 Accepting Yes

[-- Attachment #3: Type: text/plain, Size: 303 bytes --]


-- 
The email address era     the contact information   Just for kicks, imagine
at iki dot fi is heavily  link on my home page at   what it's like to get
spam filtered.  If you    <http://www.iki.fi/era/>  500 pieces of spam for
want to reach me, see     instead.                  each wanted message.

[-- Attachment #4: Type: text/plain, Size: 148 bytes --]

_______________________________________________
Bug-gnu-emacs mailing list
Bug-gnu-emacs@gnu.org
http://mail.gnu.org/mailman/listinfo/bug-gnu-emacs

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: dired-ls-sorting-switches
  2003-10-19 11:41   ` dired-ls-sorting-switches era
@ 2003-10-19 11:54     ` era
  2003-10-19 14:40       ` dired-ls-sorting-switches Andreas Schwab
  0 siblings, 1 reply; 7+ messages in thread
From: era @ 2003-10-19 11:54 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 227 bytes --]

On 19 Oct 2003 14:41:41 +0300, era@iki.fi posted to gmane.emacs.bugs:
 > --- /etc/cups/printers.conf~	Fri Jun 13 10:15:29 2003

That was gifted. Changed my password :-& and here's the patch I
actually intended to send. Sorry.


[-- Attachment #2: Proposed patch against emacs/emacs/lisp/dired.el 1.269 --]
[-- Type: text/plain, Size: 909 bytes --]

Index: dired.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/dired.el,v
retrieving revision 1.269
diff -u -r1.269 dired.el
--- emacs/emacs/lisp/dired.el	30 Sep 2003 20:46:04 -0000	1.269
+++ emacs/emacs/lisp/dired.el	19 Oct 2003 11:37:06 -0000
@@ -2770,7 +2770,12 @@
 ;; So anything that does not contain these is sort "by name".
 
 (defvar dired-ls-sorting-switches "SXU"
-  "String of `ls' switches (single letters) except `t' that influence sorting.")
+  "String of switches \(single letters\) except `t' which when present
+influence the sort order of the output from `ls'.
+
+To change the default sorting order \(e.g. add a `-v' option\), see the
+variable `dired-listing-switches'. To temporarily override the listing
+format, use Dired with a prefix argument.")
 
 (defvar dired-sort-by-date-regexp
   (concat "^-[^" dired-ls-sorting-switches

[-- Attachment #3: Type: text/plain, Size: 314 bytes --]


/* era */

-- 
The email address era     the contact information   Just for kicks, imagine
at iki dot fi is heavily  link on my home page at   what it's like to get
spam filtered.  If you    <http://www.iki.fi/era/>  500 pieces of spam for
want to reach me, see     instead.                  each wanted message.

[-- Attachment #4: Type: text/plain, Size: 148 bytes --]

_______________________________________________
Bug-gnu-emacs mailing list
Bug-gnu-emacs@gnu.org
http://mail.gnu.org/mailman/listinfo/bug-gnu-emacs

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: dired-ls-sorting-switches
  2003-10-19 11:54     ` dired-ls-sorting-switches era
@ 2003-10-19 14:40       ` Andreas Schwab
  2003-10-19 16:07         ` dired-ls-sorting-switches era
       [not found]         ` <mailman.1981.1066579681.21628.bug-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 7+ messages in thread
From: Andreas Schwab @ 2003-10-19 14:40 UTC (permalink / raw)
  Cc: bug-gnu-emacs

era@iki.fi writes:

> On 19 Oct 2003 14:41:41 +0300, era@iki.fi posted to gmane.emacs.bugs:
>  > --- /etc/cups/printers.conf~	Fri Jun 13 10:15:29 2003
>
> That was gifted. Changed my password :-& and here's the patch I
> actually intended to send. Sorry.
>
> Index: dired.el
> ===================================================================
> RCS file: /cvsroot/emacs/emacs/lisp/dired.el,v
> retrieving revision 1.269
> diff -u -r1.269 dired.el
> --- emacs/emacs/lisp/dired.el	30 Sep 2003 20:46:04 -0000	1.269
> +++ emacs/emacs/lisp/dired.el	19 Oct 2003 11:37:06 -0000
> @@ -2770,7 +2770,12 @@
>  ;; So anything that does not contain these is sort "by name".
>  
>  (defvar dired-ls-sorting-switches "SXU"
> -  "String of `ls' switches (single letters) except `t' that influence sorting.")
> +  "String of switches \(single letters\) except `t' which when present

The first line of a doc string should be a complete sentence, *note
(elisp)Documentation Tips::.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: dired-ls-sorting-switches
  2003-10-19 14:40       ` dired-ls-sorting-switches Andreas Schwab
@ 2003-10-19 16:07         ` era
       [not found]         ` <mailman.1981.1066579681.21628.bug-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 7+ messages in thread
From: era @ 2003-10-19 16:07 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 463 bytes --]

On Sun, 19 Oct 2003 16:40:31 +0200, Andreas Schwab <schwab@suse.de>
posted to gmane.emacs.bugs:
 > era@iki.fi writes:
 >> (defvar dired-ls-sorting-switches "SXU"
 >> -  "String of `ls' switches (single letters) except `t' that influence sorting.")
 >> +  "String of switches \(single letters\) except `t' which when present
 > The first line of a doc string should be a complete sentence, *note
 > (elisp)Documentation Tips::.

Okay, how's this then?

/* era */


[-- Attachment #2: Proposed patch to emacs/lisp/dired.el v1.269, take II --]
[-- Type: text/plain, Size: 1000 bytes --]

? diff
Index: dired.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/dired.el,v
retrieving revision 1.269
diff -u -r1.269 dired.el
--- emacs/emacs/lisp/dired.el	30 Sep 2003 20:46:04 -0000	1.269
+++ emacs/emacs/lisp/dired.el	19 Oct 2003 16:01:56 -0000
@@ -2770,7 +2770,13 @@
 ;; So anything that does not contain these is sort "by name".
 
 (defvar dired-ls-sorting-switches "SXU"
-  "String of `ls' switches (single letters) except `t' that influence sorting.")
+  "String of `ls'switches \(single letters\) except `t' that influence sorting.
+This indicates to Dired which option switches to watch out for because they
+will change the sorting order behavior of `ls'.
+
+To change the default sorting order \(e.g. add a `-v' option\), see the
+variable `dired-listing-switches'. To temporarily override the listing
+format, use Dired with a prefix argument.")
 
 (defvar dired-sort-by-date-regexp
   (concat "^-[^" dired-ls-sorting-switches

[-- Attachment #3: Type: text/plain, Size: 303 bytes --]


-- 
The email address era     the contact information   Just for kicks, imagine
at iki dot fi is heavily  link on my home page at   what it's like to get
spam filtered.  If you    <http://www.iki.fi/era/>  500 pieces of spam for
want to reach me, see     instead.                  each wanted message.

[-- Attachment #4: Type: text/plain, Size: 148 bytes --]

_______________________________________________
Bug-gnu-emacs mailing list
Bug-gnu-emacs@gnu.org
http://mail.gnu.org/mailman/listinfo/bug-gnu-emacs

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: dired-ls-sorting-switches
       [not found]         ` <mailman.1981.1066579681.21628.bug-gnu-emacs@gnu.org>
@ 2003-10-20 16:25           ` Kevin Rodgers
  0 siblings, 0 replies; 7+ messages in thread
From: Kevin Rodgers @ 2003-10-20 16:25 UTC (permalink / raw)


era@iki.fi wrote:

> ? diff
> Index: dired.el
> ===================================================================
> RCS file: /cvsroot/emacs/emacs/lisp/dired.el,v
> retrieving revision 1.269
> diff -u -r1.269 dired.el
> --- emacs/emacs/lisp/dired.el	30 Sep 2003 20:46:04 -0000	1.269
> +++ emacs/emacs/lisp/dired.el	19 Oct 2003 16:01:56 -0000
> @@ -2770,7 +2770,13 @@
>  ;; So anything that does not contain these is sort "by name".
>  
>  (defvar dired-ls-sorting-switches "SXU"
> -  "String of `ls' switches (single letters) except `t' that influence sorting.")
> +  "String of `ls'switches \(single letters\) except `t' that influence sorting.
> +This indicates to Dired which option switches to watch out for because they
> +will change the sorting order behavior of `ls'.
> +
> +To change the default sorting order \(e.g. add a `-v' option\), see the
> +variable `dired-listing-switches'. To temporarily override the listing
> +format, use Dired with a prefix argument.")
>  
>  (defvar dired-sort-by-date-regexp
>    (concat "^-[^" dired-ls-sorting-switches

... use `\\[universal-argument] \\[dired]'.

-- 
Kevin Rodgers

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2003-10-20 16:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-19  9:40 dired-ls-sorting-switches joseph
2003-10-19 10:26 ` dired-ls-sorting-switches era
2003-10-19 11:41   ` dired-ls-sorting-switches era
2003-10-19 11:54     ` dired-ls-sorting-switches era
2003-10-19 14:40       ` dired-ls-sorting-switches Andreas Schwab
2003-10-19 16:07         ` dired-ls-sorting-switches era
     [not found]         ` <mailman.1981.1066579681.21628.bug-gnu-emacs@gnu.org>
2003-10-20 16:25           ` dired-ls-sorting-switches Kevin Rodgers

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.