emacs-devel
[Top][All Lists]
Advanced

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

read-directory-name, the unloved


From: Antoine Levitt
Subject: read-directory-name, the unloved
Date: Thu, 10 Feb 2011 22:20:19 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Following a patch on gnus-general, I realised that a lot of old code
still uses read-file-name when they really mean read-directory-name. In
most cases, this is fine, but it messes up some other packages, most
notably ido, which redefines read-file-name. I grepped through all
read-file-name (what a load of fun that was), and here's a patch to use
read-directory-name when the code asks the user for a directory. A few
instances may have escaped my notice, but I'm pretty sure there's no
false positive (ie cases where it would mess things up for everybody).

I'm not sure what the convention is for long patches, so I'm posting it
on pastebin : http://pastebin.com/MiZmYdjz

About the fix in dired-read-dir-and-switches, there's a possibility that
ido-dired was designed as a workaround for this, and indeed, with ido
on, M-x dired works fine with the fix (it did not before). However,
there's a bunch of other code in ido I don't understand, so I didn't
remove ido-dired. Someone should look into that. Same goes for
ido-list-directory.

Also, the "improved version" commented out in the code just after
dired-read-dir-and-switches seems to be a custom version of ido that
probably should get removed (if people want completion, let them use ido
or some other package).

Antoine




reply via email to

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