all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#16533: 24.3.50; "s" no longer works as documented in dired
@ 2014-01-24  0:33 Markus Triska
  2014-01-24  3:10 ` Glenn Morris
  0 siblings, 1 reply; 8+ messages in thread
From: Markus Triska @ 2014-01-24  0:33 UTC (permalink / raw)
  To: 16533

When I do:

   $ emacs -Q

and then view my home directory in dired with:

   C-x C-f RET

and then list all files in decreasing order of their file sizes with:

   C-u s S RET

(making the switches read: "-alS")

and then press "s", dired says "Dired by date" but still orders by size.

This works as expected in Emacs 22.1.1, where "s" then sorts by date.


In GNU Emacs 24.3.50.2 (x86_64-apple-darwin10.8.0, X toolkit, Xaw3d scroll bars)
 of 2014-01-04 on mt-imac.local
Windowing system distributor `The X.Org Foundation', version 11.0.11404000
Configured using:
 `configure CFLAGS=-I/opt/local/include LDFLAGS=-L/opt/local/lib'





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

* bug#16533: 24.3.50; "s" no longer works as documented in dired
  2014-01-24  0:33 bug#16533: 24.3.50; "s" no longer works as documented in dired Markus Triska
@ 2014-01-24  3:10 ` Glenn Morris
  2014-01-24  3:13   ` Glenn Morris
  0 siblings, 1 reply; 8+ messages in thread
From: Glenn Morris @ 2014-01-24  3:10 UTC (permalink / raw)
  To: Markus Triska; +Cc: 16533

Markus Triska wrote:

> When I do:
>
>    $ emacs -Q
>
> and then view my home directory in dired with:
>
>    C-x C-f RET
>
> and then list all files in decreasing order of their file sizes with:
>
>    C-u s S RET
>
> (making the switches read: "-alS")
>
> and then press "s", dired says "Dired by date" but still orders by size.

So is the complaint that it says "Dired by date"?
I can't reproduce this.

> This works as expected in Emacs 22.1.1, where "s" then sorts by date.

I don't understand. "-alS" means ls should sort by size.
Sort by date would be "-alt".

> In GNU Emacs 24.3.50.2 (x86_64-apple-darwin10.8.0, X toolkit, Xaw3d scroll bars)
>  of 2014-01-04 on mt-imac.local





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

* bug#16533: 24.3.50; "s" no longer works as documented in dired
  2014-01-24  3:10 ` Glenn Morris
@ 2014-01-24  3:13   ` Glenn Morris
  2014-01-24 17:23     ` Markus Triska
  0 siblings, 1 reply; 8+ messages in thread
From: Glenn Morris @ 2014-01-24  3:13 UTC (permalink / raw)
  To: Markus Triska; +Cc: 16533

Glenn Morris wrote:

>> This works as expected in Emacs 22.1.1, where "s" then sorts by date.
>
> I don't understand.

Oh, I see. Works for me.

What is the value of dired-use-ls-dired?





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

* bug#16533: 24.3.50; "s" no longer works as documented in dired
  2014-01-24  3:13   ` Glenn Morris
@ 2014-01-24 17:23     ` Markus Triska
  2014-01-24 18:32       ` Glenn Morris
  2014-01-25 11:02       ` Eli Zaretskii
  0 siblings, 2 replies; 8+ messages in thread
From: Markus Triska @ 2014-01-24 17:23 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 16533

Glenn Morris <rgm@gnu.org> writes:

> What is the value of dired-use-ls-dired?

Its value is nil. When I start dired after "$ emacs -Q", it displays:

  ls does not support --dired; see `dired-use-ls-dired' for more details.

Following the instructions in the documentation of `dired-use-ls-dired',
I tried Emacs's own emulation of "ls" by evaluating (in "$ emacs -Q"):

  (setq ls-lisp-use-insert-directory-program nil)
  (require 'ls-lisp)

The original problem shows up with this emulation as well.





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

* bug#16533: 24.3.50; "s" no longer works as documented in dired
  2014-01-24 17:23     ` Markus Triska
@ 2014-01-24 18:32       ` Glenn Morris
  2014-01-25 11:22         ` Eli Zaretskii
  2014-01-25 11:02       ` Eli Zaretskii
  1 sibling, 1 reply; 8+ messages in thread
From: Glenn Morris @ 2014-01-24 18:32 UTC (permalink / raw)
  To: Markus Triska; +Cc: 16533

Markus Triska wrote:

> The original problem shows up with this emulation as well.

Not for me.

Please confirm what the problem actually is - just that it says "by
date" in the mode line?

When it does so, what are the values of

dired-ls-sorting-switches
dired-sort-by-date-regexp
dired-actual-switches





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

* bug#16533: 24.3.50; "s" no longer works as documented in dired
  2014-01-24 17:23     ` Markus Triska
  2014-01-24 18:32       ` Glenn Morris
@ 2014-01-25 11:02       ` Eli Zaretskii
  1 sibling, 0 replies; 8+ messages in thread
From: Eli Zaretskii @ 2014-01-25 11:02 UTC (permalink / raw)
  To: Markus Triska; +Cc: 16533

> From: Markus Triska <markus.triska@gmx.at>
> Date: Fri, 24 Jan 2014 18:23:43 +0100
> Cc: 16533@debbugs.gnu.org
> 
> Glenn Morris <rgm@gnu.org> writes:
> 
> > What is the value of dired-use-ls-dired?
> 
> Its value is nil. When I start dired after "$ emacs -Q", it displays:
> 
>   ls does not support --dired; see `dired-use-ls-dired' for more details.
> 
> Following the instructions in the documentation of `dired-use-ls-dired',
> I tried Emacs's own emulation of "ls" by evaluating (in "$ emacs -Q"):
> 
>   (setq ls-lisp-use-insert-directory-program nil)
>   (require 'ls-lisp)
> 
> The original problem shows up with this emulation as well.

Aren't you using ls-lisp emulation by default?  What does the
following produce in "emacs -Q"?

  M-: (featurep 'ls-lisp) RET





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

* bug#16533: 24.3.50; "s" no longer works as documented in dired
  2014-01-24 18:32       ` Glenn Morris
@ 2014-01-25 11:22         ` Eli Zaretskii
  2014-01-26  1:31           ` Glenn Morris
  0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2014-01-25 11:22 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 16533, markus.triska

> From: Glenn Morris <rgm@gnu.org>
> Date: Fri, 24 Jan 2014 13:32:55 -0500
> Cc: 16533@debbugs.gnu.org
> 
> Please confirm what the problem actually is - just that it says "by
> date" in the mode line?

I think the problem is that is says "by date", but the actual sorting
is not changed, i.e. it stays by size in this case.

> When it does so, what are the values of
> 
> dired-ls-sorting-switches

"SXU"

> dired-sort-by-date-regexp

"\\(\\`\\| \\)-[^- ]*t[^ SXU]*\\(\\(\\`\\| +\\)\\(--[^ ]+\\|-[^- tSXU]+\\)\\)* *$"

> dired-actual-switches

"-alSt"

And the latter is the root cause of the problem, IMO: the -S switch is
not removed from dired-actual-switches.

The problem here seems to be that dired-sort-toggle blindly adds the
"-t" flag to dired-actual-switches, although in this case the sorting
is not by date at all.  I don't understand the logic here; it seems
like dired-sort-toggle assumes without testing that the directory is
sorted either by date or by name, which is of course false.

Is it a portable assumption that the last switch that determines the
sorting order overrides all the previous ones?  If so, ls-lisp.el
should be fixed to implement that requirement.  But if not, we need to
fix dired.el not to put more than one sorting option into
dired-actual-switches.  In particular, the logic in dired-sort-toggle
seems to be flawed.





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

* bug#16533: 24.3.50; "s" no longer works as documented in dired
  2014-01-25 11:22         ` Eli Zaretskii
@ 2014-01-26  1:31           ` Glenn Morris
  0 siblings, 0 replies; 8+ messages in thread
From: Glenn Morris @ 2014-01-26  1:31 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 16533, markus.triska

Eli Zaretskii wrote:

> The problem here seems to be that dired-sort-toggle blindly adds the
> "-t" flag to dired-actual-switches, although in this case the sorting
> is not by date at all.  I don't understand the logic here; it seems
> like dired-sort-toggle assumes without testing that the directory is
> sorted either by date or by name, which is of course false.
>
> Is it a portable assumption that the last switch that determines the
> sorting order overrides all the previous ones?  If so, ls-lisp.el
> should be fixed to implement that requirement.  But if not, we need to
> fix dired.el not to put more than one sorting option into
> dired-actual-switches.  In particular, the logic in dired-sort-toggle
> seems to be flawed.

Duh, I seem to have been very thick here, since the original report
seems clear now. I guess I missed the 'then press "s"'.

I guess it is not a portable assumption, since presumably whatever
crappy ls Mac OS X uses does not work that way.

Prior to r101356, dired-sort-toggle removed dired-ls-sorting-switches.
Now it seems not to. That change was made to fix another bug,
http://debbugs.gnu.org/6987





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

end of thread, other threads:[~2014-01-26  1:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-24  0:33 bug#16533: 24.3.50; "s" no longer works as documented in dired Markus Triska
2014-01-24  3:10 ` Glenn Morris
2014-01-24  3:13   ` Glenn Morris
2014-01-24 17:23     ` Markus Triska
2014-01-24 18:32       ` Glenn Morris
2014-01-25 11:22         ` Eli Zaretskii
2014-01-26  1:31           ` Glenn Morris
2014-01-25 11:02       ` Eli Zaretskii

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.