emacs-devel
[Top][All Lists]
Advanced

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

Re: Filename completion for the 'file widget


From: Suraj Acharya
Subject: Re: Filename completion for the 'file widget
Date: Tue, 24 Aug 2004 17:35:52 -0700
User-agent: Mozilla Thunderbird 0.7.1 (Windows/20040626)

Kevin Rodgers wrote:
Suraj Acharya wrote:
 > Since I prefer this second non-expanding behavior I managed to get it to
 > work on my local machine by using (concat directory completion) in place
 > of (expand-file-name completion directory) in widget-file-complete.

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.


    (file-relative-name (expand-file-name completion directory) directory)

but I realized that's equivalent to just completion, so I took a look
at the code in wid-edit.el.  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.





reply via email to

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