GNU bug report logs - #27
incorrect code in dired-insert-directory

Previous Next

Package: emacs;

Reported by: "Drew Adams" <drew.adams <at> oracle.com>

Date: Mon, 3 Mar 2008 03:05:05 UTC

Severity: normal

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: "Drew Adams" <drew.adams <at> oracle.com>
To: <bug-gnu-emacs <at> gnu.org>
Subject: bug#27: incorrect code in dired-insert-directory
Date: Thu, 28 Feb 2008 23:08:52 -0800
This line near the end of dired-insert-directory is wrong:
 
 (if (and (or hdr wildcard) (not (looking-at "^  /.*:$")))
 
The problem is that "^ /.*:$" does not recognize a directory name on
MS Windows. The purpose of this code is to see if the directory name
is already in the buffer - if not, then it adds it. The test always
fails on Windows, so, whenever (or hdr wildcard) is non-nil, the `if'
test succeeds. That inserts a second copy of the directory name in the
buffer in some situations.
 
The regexp works only for Unix and GNU/Linux, not for Windows, which
has directories that have drive letters: c:/foobar/.

To reproduce (on Windows):

emacs -Q
Load the source file files.el.

C-u C-x 4 d 

Use switches -lR, and enter some directory name.

The first directory name in the buffer appears twice (the others are OK).

Note: The problem does not seem to arise if you don't load the source file,
for some reason.

This problem also exists in 22.1.90. And it exists as far back as Emacs 20.
 

In GNU Emacs 22.1.1 (i386-mingw-nt5.1.2600)
 of 2007-06-02 on RELEASE
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4) --cflags -Ic:/gnuwin32/include'
 






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

Previous Next


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