GNU bug report logs - #5597
Dired unable to properly recognize file names

Previous Next

Package: emacs;

Reported by: "Otto Maddox" <ottomaddox <at> fastmail.fm>

Date: Thu, 18 Feb 2010 15:43:02 UTC

Severity: normal

Merged with 3710, 4044, 9039

Found in version 24.0.50

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 5597 in the body.
You can then email your comments to 5597 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5597; Package emacs. (Thu, 18 Feb 2010 15:43:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Otto Maddox" <ottomaddox <at> fastmail.fm>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 18 Feb 2010 15:43:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "Otto Maddox" <ottomaddox <at> fastmail.fm>
To: bug-gnu-emacs <at> gnu.org
Subject: Dired unable to properly recognize file names
Date: Thu, 18 Feb 2010 15:27:03 +0000
In the shell create a new file:

$ touch ~/2010-02-18\ foo

Then in Emacs:

C-x d ~ RET

and move down to the line file you just created. Only the "foo" portion
is recognized as belonging to the file name. Trying to visit the file
with RET then gives:

dired-get-file-for-visit: File no longer exists; type `g' to update
dired buffer

In GNU Emacs 22.3.1 (i386-apple-darwin9.4.0, Carbon Version 1.6.0)
 of 2008-09-16
Windowing system distributor `Apple Inc.', version 10.5.8
configured using `configure  '--enable-carbon-app''

-- 
http://www.fastmail.fm - Or how I learned to stop worrying and
                          love email again






Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5597; Package emacs. (Fri, 19 Feb 2010 00:27:02 GMT) Full text and rfc822 format available.

Message #8 received at 5597 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: "Otto Maddox" <ottomaddox <at> fastmail.fm>
Cc: 5597 <at> debbugs.gnu.org
Subject: Re: bug#5597: Dired unable to properly recognize file names
Date: Thu, 18 Feb 2010 19:26:44 -0500
"Otto Maddox" wrote:

> In the shell create a new file:
>
> $ touch ~/2010-02-18\ foo
>
> Then in Emacs:
>
> C-x d ~ RET

This works fine for me in GNU/Linux with `emacs -Q', in Emacs 22.3,
23.1, and the current trunk. Maybe this is Mac-specific? Seems odd.

> In GNU Emacs 22.3.1 (i386-apple-darwin9.4.0, Carbon Version 1.6.0)




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5597; Package emacs. (Fri, 19 Feb 2010 04:44:02 GMT) Full text and rfc822 format available.

Message #11 received at 5597 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 5597 <at> debbugs.gnu.org, Otto Maddox <ottomaddox <at> fastmail.fm>
Subject: Re: bug#5597: Dired unable to properly recognize file names
Date: Thu, 18 Feb 2010 23:42:59 -0500
>> In the shell create a new file:
>> $ touch ~/2010-02-18\ foo
>> Then in Emacs:
>> C-x d ~ RET

> This works fine for me in GNU/Linux with `emacs -Q', in Emacs 22.3,
> 23.1, and the current trunk. Maybe this is Mac-specific? Seems odd.

I think it depends on whether your `ls' supports --dired.


        Stefan




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5597; Package emacs. (Sun, 21 Feb 2010 02:31:02 GMT) Full text and rfc822 format available.

Message #14 received at 5597 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 5597 <at> debbugs.gnu.org, Otto Maddox <ottomaddox <at> fastmail.fm>
Subject: Re: bug#5597: Dired unable to properly recognize file names
Date: Sat, 20 Feb 2010 21:30:21 -0500
Stefan Monnier wrote:

> I think it depends on whether your `ls' supports --dired.

Indeed it fails if one sets dired-use-ls-dired to nil.

That variable is initialized in a funny way, via

(string-match "gnu" system-configuration)

I guess (?) many Mac users do indeed have access to GNU ls, despite
not having "gnu" in their `system-configuration'.

It also doesn't really seem to be documented anywhere that dired will
perform less well if the underlying ls does not support --dired.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5597; Package emacs. (Sun, 21 Feb 2010 21:28:02 GMT) Full text and rfc822 format available.

Message #17 received at 5597 <at> debbugs.gnu.org (full text, mbox):

From: Chong Yidong <cyd <at> stupidchicken.com>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 5597 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>,
	Otto Maddox <ottomaddox <at> fastmail.fm>
Subject: Re: bug#5597: Dired unable to properly recognize file names
Date: Sun, 21 Feb 2010 16:27:24 -0500
Glenn Morris <rgm <at> gnu.org> writes:

> Stefan Monnier wrote:
>
>> I think it depends on whether your `ls' supports --dired.
>
> Indeed it fails if one sets dired-use-ls-dired to nil.

The trouble is that directory-listing-before-filename-regexp matches
that last possible string that looks like a date.  It has to do this
because, without knowing anything else about the locale, we can't
distinguish (say) user-names from month names.

However, when we are using the iso date format, it's possible to be
stricter, and I have changed the regexp accordingly.  This fixes the bug
for the current specific case.  Though I'm not sure how to fix it for,
say, files named "Aug  7 2009 foo".




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#5597; Package emacs. (Sun, 18 Sep 2011 12:13:02 GMT) Full text and rfc822 format available.

Message #20 received at 5597 <at> debbugs.gnu.org (full text, mbox):

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Glenn Morris <rgm <at> gnu.org>, 5597 <at> debbugs.gnu.org,
	Otto Maddox <ottomaddox <at> fastmail.fm>
Subject: Re: bug#5597: Dired unable to properly recognize file names
Date: Sun, 18 Sep 2011 13:59:05 +0200
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

> I think it depends on whether your `ls' supports --dired.

Speaking of which, is there any particular reason why dired still uses
an external program?  If it's because `ls-lisp' is too slow, wouldn't it
be rather easy to, say, extend `directory-files' to return a list of
stat structures instead?

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#5597; Package emacs. (Sun, 18 Sep 2011 15:17:02 GMT) Full text and rfc822 format available.

Message #23 received at 5597 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Cc: 5597 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca, ottomaddox <at> fastmail.fm
Subject: Re: bug#5597: Dired unable to properly recognize file names
Date: Sun, 18 Sep 2011 18:10:14 +0300
> From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
> Date: Sun, 18 Sep 2011 13:59:05 +0200
> Cc: 5597 <at> debbugs.gnu.org, Otto Maddox <ottomaddox <at> fastmail.fm>
> 
> Speaking of which, is there any particular reason why dired still uses
> an external program?  If it's because `ls-lisp' is too slow

I don't think it's slow on a Posix system, where the `stat' function
is highly optimized and very fast.  I think the main reasons are 
(a) inertia, and (b) ls-lisp doesn't support all of the switches
available with GNU `ls'.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#5597; Package emacs. (Mon, 19 Sep 2011 11:59:01 GMT) Full text and rfc822 format available.

Message #26 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Andy Moreton <andrewjmoreton <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#5597: Dired unable to properly recognize file names
Date: Mon, 19 Sep 2011 12:52:59 +0100
On Sun 18 Sep 2011, Eli Zaretskii wrote:

>> From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
>> Date: Sun, 18 Sep 2011 13:59:05 +0200
>> Cc: 5597 <at> debbugs.gnu.org, Otto Maddox <ottomaddox <at> fastmail.fm>
>> 
>> Speaking of which, is there any particular reason why dired still uses
>> an external program?  If it's because `ls-lisp' is too slow
>
> I don't think it's slow on a Posix system, where the `stat' function
> is highly optimized and very fast.  I think the main reasons are 
> (a) inertia, and (b) ls-lisp doesn't support all of the switches
> available with GNU `ls'.

On Windows it is useful to be able to run Cygwin ls as a program
to see Cygwin's symlinks and permissions.

    AndyM





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#5597; Package emacs. (Mon, 19 Sep 2011 12:53:02 GMT) Full text and rfc822 format available.

Message #29 received at 5597 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Andy Moreton <andrewjmoreton <at> gmail.com>
Cc: 5597 <at> debbugs.gnu.org
Subject: Re: bug#5597: Dired unable to properly recognize file names
Date: Mon, 19 Sep 2011 08:47:14 -0400
> From: Andy Moreton <andrewjmoreton <at> gmail.com>
> Date: Mon, 19 Sep 2011 12:52:59 +0100
> 
> On Windows it is useful to be able to run Cygwin ls as a program
> to see Cygwin's symlinks and permissions.

There should be no problem to support Cygwin symlinks in native w32
code that implements `stat'.  Patches welcome.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#5597; Package emacs. (Mon, 19 Sep 2011 16:34:01 GMT) Full text and rfc822 format available.

Message #32 received at 5597 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 5597 <at> debbugs.gnu.org, Andy Moreton <andrewjmoreton <at> gmail.com>
Subject: Re: bug#5597: Dired unable to properly recognize file names
Date: Mon, 19 Sep 2011 12:28:11 -0400
BTW, the actual problem that triggered this report almost certainly does
not exist anymore, since dired.el now tests "properly" for --dired
support, so it should be found on a Mac. Also the relevance of --dired
is now mentioned in the manual, plus dired gives a message the first
time it is used if --dired is not found to be supported.

I'm inclined to merge this with #9039 and hence close it.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#5597; Package emacs. (Mon, 19 Sep 2011 16:42:02 GMT) Full text and rfc822 format available.

Message #35 received at 5597 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 5597 <at> debbugs.gnu.org, andrewjmoreton <at> gmail.com
Subject: Re: bug#5597: Dired unable to properly recognize file names
Date: Mon, 19 Sep 2011 19:35:27 +0300
> From: Glenn Morris <rgm <at> gnu.org>
> Cc: Andy Moreton <andrewjmoreton <at> gmail.com>,  5597 <at> debbugs.gnu.org
> Date: Mon, 19 Sep 2011 12:28:11 -0400
> 
> I'm inclined to merge this with #9039 and hence close it.

FWIW, I don't mind.  I just answered Lars's question about ls-lisp.




Forcibly Merged 4044 5597 9039. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Tue, 20 Sep 2011 03:34:01 GMT) Full text and rfc822 format available.

Forcibly Merged 3710 4044 5597 9039. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Thu, 06 Oct 2011 01:44:01 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 03 Nov 2011 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 13 years and 230 days ago.

Previous Next


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