[Top][All Lists]

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

Re: Filename completion for the 'file widget

From: Kevin Rodgers
Subject: Re: Filename completion for the 'file widget
Date: Wed, 25 Aug 2004 10:33:36 -0600
User-agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv: Gecko/20020406 Netscape6/6.2.2

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

Kevin Rodgers

reply via email to

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