unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* read-directory-name, the unloved
@ 2011-02-10 21:20 Antoine Levitt
  2011-02-10 21:29 ` Antoine Levitt
  0 siblings, 1 reply; 7+ messages in thread
From: Antoine Levitt @ 2011-02-10 21:20 UTC (permalink / raw)
  To: emacs-devel

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




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-02-12 15:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-10 21:20 read-directory-name, the unloved Antoine Levitt
2011-02-10 21:29 ` Antoine Levitt
2011-02-11  8:54   ` Antoine Levitt
2011-02-12  2:03     ` Stefan Monnier
2011-02-12 10:18       ` Antoine Levitt
2011-02-12 14:44         ` Andreas Schwab
2011-02-12 15:12           ` Antoine Levitt

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).