[Top][All Lists]

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

Re: directory names ending with a colon confuse dired

From: Chris Moore
Subject: Re: directory names ending with a colon confuse dired
Date: Fri, 22 Sep 2006 01:18:02 +0200

On Fri, 2006-09-22 at 00:31 +0200, Chris Moore wrote:
> It seems the problem is related to the value of dired-subdir-alist.

The problem doesn't only happen with directories whose names end with a
colon, it also happens with directories, sockets, symlinks, fifos, etc,

The following patch makes things better for me, only matching lines
which have b, c, d, l, p, s, or '-' at the start (these seem to be the 7
characters ls can use to describe the type of a file):

--- Backup/dired.el.~1~ 2006-09-22 01:14:35.000000000 +0200
+++ dired.el    2006-09-22 01:15:00.000000000 +0200
@@ -290,7 +290,7 @@
 (defvaralias 'dired-move-to-filename-regexp
-(defvar dired-subdir-regexp "^. \\([^\n\r]+\\)\\(:\\)[\n\r]"
+(defvar dired-subdir-regexp "^. \\([^bcdlps-][^\n\r]*\\)\\(:\\)[\n\r]"
   "Regexp matching a maybe hidden subdirectory line in `ls -lR' output.
 Subexpression 1 is the subdirectory proper, no trailing colon.
 The match starts at the beginning of the line and ends after the end

I don't know enough about all the different situations in which dired is
used to know whether this will break anything though.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]