From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Antoine Levitt Newsgroups: gmane.emacs.devel Subject: read-directory-name, the unloved Date: Thu, 10 Feb 2011 22:20:19 +0100 Message-ID: <874o8bio30.fsf@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1297373216 25907 80.91.229.12 (10 Feb 2011 21:26:56 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 10 Feb 2011 21:26:56 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Feb 10 22:26:51 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Pne2J-0000nx-Kg for ged-emacs-devel@m.gmane.org; Thu, 10 Feb 2011 22:26:47 +0100 Original-Received: from localhost ([127.0.0.1]:34826 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pne2I-0001VD-JC for ged-emacs-devel@m.gmane.org; Thu, 10 Feb 2011 16:26:46 -0500 Original-Received: from [140.186.70.92] (port=57812 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pne1A-0000if-40 for emacs-devel@gnu.org; Thu, 10 Feb 2011 16:25:37 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PndwQ-0004Ai-L1 for emacs-devel@gnu.org; Thu, 10 Feb 2011 16:20:43 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:34078) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PndwQ-0004Aa-D8 for emacs-devel@gnu.org; Thu, 10 Feb 2011 16:20:42 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PndwM-0003ZF-Gb for emacs-devel@gnu.org; Thu, 10 Feb 2011 22:20:38 +0100 Original-Received: from ney92-7-78-233-218-202.fbx.proxad.net ([78.233.218.202]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 10 Feb 2011 22:20:38 +0100 Original-Received: from antoine.levitt by ney92-7-78-233-218-202.fbx.proxad.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 10 Feb 2011 22:20:38 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 25 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: ney92-7-78-233-218-202.fbx.proxad.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:sE1H+jHZC5tMaSdTlm+pDmUqBf4= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 80.91.229.12 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:135864 Archived-At: 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