emacs-devel
[Top][All Lists]
Advanced

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

Filename completion for the 'file widget


From: Suraj Acharya
Subject: Filename completion for the 'file widget
Date: Mon, 23 Aug 2004 17:59:30 -0700
User-agent: Mozilla Thunderbird 0.7.1 (Windows/20040626)


Completion for the 'file widget exhibits some slightly inconsistent behavior when using relative paths. widget-file-complete tries to expand any relative paths using expand-file-name, but does so only when it can complete (partially or fully) the text in the widget.

So if at a file widget I type "./" and hit the completion key, I get a *Completions* buffer. Now if the current directory has a file called "aaa" and if I type the letter "a" into the file widget and hit the completion key again, instead of "./aaa" I get /home/foo/aaa".

While this can be fixed by calling expand-file-name even when listing completions in widget-file-complete, I think a customizable option to not expand relative paths in the file widget while still doing the completion would also be useful. The JDE mode for Java for example, uses a list of 'file widgets to customize its source and class path settings. It allows relative paths to permit easy portability of JDE projects across the file system.

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.


Suraj





reply via email to

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