GNU bug report logs - #2261
Dired with long ls switches

Previous Next

Package: emacs;

Reported by: <dmbrown <at> icubed.com>

Date: Tue, 10 Feb 2009 06:15:03 UTC

Severity: normal

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (Emacs bug Tracking System)
To: <dmbrown <at> icubed.com>
Subject: bug#2261 closed by Chong Yidong <cyd <at> stupidchicken.com> (Re: 
 Dired with long ls switches)
Date: Wed, 11 Feb 2009 14:55:09 +0000
[Message part 1 (text/plain, inline)]
This is an automatic notification regarding your bug report
which was filed against the emacs package:

#2261: Dired with long ls switches

It has been closed by Chong Yidong <cyd <at> stupidchicken.com>.

Their explanation is attached below along with your original report.
If this explanation is unsatisfactory and you have not received a
better one in a separate message then please contact Chong Yidong <cyd <at> stupidchicken.com> by
replying to this email.


-- 
2261: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=2261
Emacs Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Chong Yidong <cyd <at> stupidchicken.com>
To: "David Brown" <dmbrown <at> icubed.com>
Cc: 2261-done <at> debbugs.gnu.org
Subject: Re: Dired with long ls switches
Date: Wed, 11 Feb 2009 09:47:52 -0500
> In dired, when I do a file operation such as R-rename or M-chmod, the
> system file operation works, but the dired buffer does not update
> properly, giving: Listing directory failed but `access-file' worked
>
> This is because a character "d" is being appended to
> dired-actual-switches about 50 lines into dired-add-entry:

Thanks for spotting and analyzing this bug.  I've checked a fix into
CVS.

[Message part 3 (message/rfc822, inline)]
From: "David Brown" <dmbrown <at> icubed.com>
To: <bug-gnu-emacs <at> gnu.org>
Subject: Dired with long ls switches
Date: Tue, 10 Feb 2009 01:06:48 -0500
[Message part 4 (text/plain, inline)]
I have "GNU Emacs 22.2.1 (i486-pc-linux-gnu, GTK+ Version 2.14.1) of
2008-09-05 on vernadsky, modified by Ubuntu," known as emacs22-gtk by my
distro.

I like --group-directories-first as an ls switch:  (setq
dired-listing-switches "-al --group-directories-first")

In dired, when I do a file operation such as R-rename or M-chmod, the system
file operation works, but the dired buffer does not update properly, giving:
Listing directory failed but `access-file' worked

This is because a character "d" is being appended to dired-actual-switches
about 50 lines into dired-add-entry:
  (dired-insert-directory directory
     (concat dired-actual-switches "d")
     (list filename)))

Just concatenating "d" assumes short switches.  For example "-ald" works
fine.  But "-al --group-directories-firstd" fails.

I fixed my installation by putting " -d" instead of "d".  This seems to work
just fine for files and directories

Here is the debugger backtrace:

Debugger entered--Lisp error: (error "Listing directory failed but
`access-file' worked")
  signal(error ("Listing directory failed but `access-file' worked"))
  error("Listing directory failed but `access-file' worked")
  insert-directory("foobar" "--dired -al --group-directories-firstd" nil
nil)
  dired-insert-directory("/home/dmb/bin/" "-al --group-directories-firstd"
("foobar"))
  (let ((default-directory directory)) (dired-insert-directory directory
(concat dired-actual-switches "d") (list filename)))
  (let (buffer-read-only opoint) (beginning-of-line) (setq opoint (point))
(let (...) (dired-insert-directory directory ... ...)) (goto-char opoint)
(when marker-char (let ... ...)) (goto-char opoint) (let (...) (if ... ...
...)) (forward-line -1) (if dired-after-readin-hook (save-excursion ...))
(dired-move-to-filename))
  (catch (quote not-found) (if (string= directory cur-dir) (progn ... ...
...) (if ... ... ...)) (let (buffer-read-only opoint) (beginning-of-line)
(setq opoint ...) (let ... ... ...) (goto-char opoint) (when marker-char
...) (goto-char opoint) (let ... ...) (forward-line -1) (if
dired-after-readin-hook ...) (dired-move-to-filename)) nil)
  (setq filename (if relative (file-relative-name filename directory)
(file-name-nondirectory filename)) reason (catch (quote not-found) (if ...
... ...) (let ... ... ... ... ... ... ... ... ... ... ...) nil))
  (let* ((opoint ...) (cur-dir ...) (orig-file-name filename) (directory
...) reason) (setq filename (if relative ... ...) reason (catch ... ... ...
nil)) (if reason (goto-char opoint)) (not reason))
  dired-add-entry("/home/dmb/bin/foobar" nil)
  apply(dired-add-entry ("/home/dmb/bin/foobar" nil))
  dired-fun-in-all-buffers("/home/dmb/bin/" "foobar" dired-add-entry
"/home/dmb/bin/foobar" nil)
  dired-add-file("/home/dmb/bin/foobar" nil)
  byte-code(" \n#ˆ\fƒ


[Message part 5 (text/html, inline)]

This bug report was last modified 16 years and 161 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.