From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: ido-read-file-name default-filename Date: Thu, 18 May 2006 09:44:20 +0200 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1147938408 28249 80.91.229.2 (18 May 2006 07:46:48 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 18 May 2006 07:46:48 +0000 (UTC) Cc: Emacs Developement List Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu May 18 09:46:40 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FgdDB-0007nq-5i for ged-emacs-devel@m.gmane.org; Thu, 18 May 2006 09:46:21 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FgdDA-0001j1-M4 for ged-emacs-devel@m.gmane.org; Thu, 18 May 2006 03:46:20 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FgdCs-0001gm-Os for emacs-devel@gnu.org; Thu, 18 May 2006 03:46:02 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FgdCr-0001fN-IW for emacs-devel@gnu.org; Thu, 18 May 2006 03:46:02 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FgdCr-0001ep-AL for emacs-devel@gnu.org; Thu, 18 May 2006 03:46:01 -0400 Original-Received: from [195.41.46.237] (helo=pfepc.post.tele.dk) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FgdFt-0003RW-Rb for emacs-devel@gnu.org; Thu, 18 May 2006 03:49:10 -0400 Original-Received: from kfs-l.imdomain.dk.cua.dk (unknown [80.165.4.124]) by pfepc.post.tele.dk (Postfix) with SMTP id 6347A8A0054; Thu, 18 May 2006 09:45:54 +0200 (CEST) Original-To: Karl Chen In-Reply-To: (Karl Chen's message of "Wed, 17 May 2006 17:20:41 -0700") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) 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:54693 Archived-At: Karl Chen writes: >>>>>> On 2006-05-17 14:25 PDT, Kim F Storm writes: > > Kim> I have installed a change which I think will fix this in > Kim> general. Please try the latest version. > > Hi Kim, it works, but only when ido-show-dot-for-dired is nil. Rats. > The use case > (ido-everywhere 1) > M-x diff RET > RET for current buffer-file-name > > Perhaps the solution is if default-filename is not nil, then > initially put it before "." even if ido-show-dot-for-dired. Or > maybe diff-mode should let-bind ido-show-dot-for-dired nil. Or ido-read-file-name should simply bind ido-show-dot-for-dired to nil when default-filename is specified and it is not explicitly reading a directory name. Can you try this patch: *** ido.el 17 May 2006 23:23:34 +0200 1.94 --- ido.el 18 May 2006 09:43:24 +0200 *************** *** 4475,4480 **** --- 4475,4482 ---- (ido-directory-too-big (and (not ido-directory-nonreadable) (ido-directory-too-big-p ido-current-directory))) (ido-work-directory-index -1) + (ido-show-dot-for-dired (and ido-show-dot-for-dired + (not default-filename))) (ido-work-file-index -1) (ido-find-literal nil)) (setq ido-exit nil) > I guess one problem is read-file-name is overloaded for 2 > different use cases: 1. read a file name (not a directory), and > 2. read a file name or a directory name. Separating > read-file-name into two functions or adding a flag indicating > intent would help. That's too late I guess... -- Kim F. Storm http://www.cua.dk