[Top][All Lists]

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

RE: incorrect code in dired-insert-directory

From: Drew Adams
Subject: RE: incorrect code in dired-insert-directory
Date: Fri, 29 Feb 2008 07:00:43 -0800

> > 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.
> If you load files.el in the MS-Windows port, make sure you load
> ls-lisp.el right after that.  That's because ls-lisp.el overloads the
> standard version of insert-directory, defined by files.el, so loading
> files.el reverts you to the original version of insert-directory,
> which doesn't DTRT on Windows.
> Could it be that the whole problem does not exist if you load
> ls-lisp.el after files.el?

Good catch. That was it. No bug I guess.

Nevertheless, would it make sense to:

- Fix that regexp string anyway, to be Windows compatible? Or add a comment
saying that it is not and need not be?

- Add a comment in files.el or dired.el (or both) saying something about the
fact that Windows redefines insert-directory in ls-lisp.el?

FWIW, I spent quite a while trying to figure out what was actually happening
and why (and I obviously didn't succeed completely). A comment in the source
code might have helped me understand.


reply via email to

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