From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.devel Subject: Re: Filename completion for the 'file widget Date: Wed, 25 Aug 2004 10:33:36 -0600 Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Message-ID: <412CBF60.9030305@yahoo.com> References: <412BD771.7010601@yahoo.com> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1093452470 28197 80.91.224.253 (25 Aug 2004 16:47:50 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 25 Aug 2004 16:47:50 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Aug 25 18:47:35 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1C00vu-0002sG-00 for ; Wed, 25 Aug 2004 18:47:34 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C010U-0001ye-G6 for ged-emacs-devel@m.gmane.org; Wed, 25 Aug 2004 12:52:18 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1C00xN-0001Xu-L8 for emacs-devel@gnu.org; Wed, 25 Aug 2004 12:49:05 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1C00wy-0001Lj-1c for emacs-devel@gnu.org; Wed, 25 Aug 2004 12:48:47 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C00wv-0001II-VL for emacs-devel@gnu.org; Wed, 25 Aug 2004 12:48:38 -0400 Original-Received: from [80.91.224.249] (helo=main.gmane.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1C00iN-0006L1-4m for emacs-devel@gnu.org; Wed, 25 Aug 2004 12:33:35 -0400 Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1C00iL-0003xy-00 for ; Wed, 25 Aug 2004 18:33:33 +0200 Original-Received: from 170.207.1.200 ([170.207.1.200]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 25 Aug 2004 18:33:33 +0200 Original-Received: from ihs_4664 by 170.207.1.200 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 25 Aug 2004 18:33:33 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Lines: 31 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 170.207.1.200 User-Agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2 X-Accept-Language: en-us 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: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:26485 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:26485 Suraj Acharya wrote: > Kevin Rodgers wrote: >> That doesn't seem right. I was going to suggest something like > > Why do you say it's not right? It gives me the behavior I expect, ie > relative paths stay relative and I still get completion for them. It > uses default-directory for the current buffer as the base for the > relative path completion. I was confusing the necessity of file-name-as-directory (which Stefan correctly pointed out in his response) with the functionality of expand-file-name. Sorry! ... >> But it's not clear to me (1) why widget-file-complete expands the >> pattern nor (2) why it can safely assume the pattern has a non-nil >> directory that can be passed as the second arg to >> file-name-completion. > > (2) is definitely a bug. Asking for completion in a blank 'file widget > gives "let*: Wrong type argument: stringp, nil" in the minibuffer. It looks to me like it would fail any time the widget doesn't contain a directory separator, since e.g. (file-name-directory "foo") returns nil. (And isn't it file-name-completion that signals the error, not let*?) -- Kevin Rodgers