[Top][All Lists]

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

RE: should `minibuffer-complete' use `abbreviate-file-name'?

From: Drew Adams
Subject: RE: should `minibuffer-complete' use `abbreviate-file-name'?
Date: Sun, 14 Oct 2007 09:56:20 -0700

>     I don't see how that contradicts what I said either. In the
>     user's use case that I cited, FROM is ^/exe and TO is
>     /very-long-path-here/exe. Both FROM
>     and TO are equivalent names in terms of their effect, and
>     both effectively
>     refer to the same directory, /very-long-path-here/exe.
> I guess I do not understand your proposed usage.
> I thought I did, but I can't follow this.

I didn't propose any particular usage. I described one user's use of this as
an abbreviation mechanism for directory names, but unrelated to symlinks.

His usage:

 FROM: Any easy-to-type and mnemonic regexp that matches
       a syntactically valid directory name, whether or not
       such a directory exists. Example: "^/proj1".

 TO:   An (absolute) name of an existing directory.
       Example: "/a/very/long/dir/name/to/my/project".

FROM and TO are equivalent, in that they have the same effect. TO is a valid
directory name and FROM matches a syntactically valid directory name, even
if no such directory exists. In the user's case, TO names an existing

So far, I've described no proposal wrt this. This already works, without
problem. He uses this with `find-file': C-x C-f /proj1 RET visits the (real)
directory /my/very/long/dir/name/to/a/project. This saves him time. Yes,
there are other possible abbreviation mechanisms, but this one is also
useful in this way.

His proposal, which I relayed to the list, is this: Let completion do the
same thing, so that C-x C-f /proj1 TAB completes to

The only change needed is for TAB (`minibuffer-complete') to call
`abbreviate-file-name' (for file-name completion only, of course).

I don't want to belabor this. I think his idea is a good one. My question to
the list was whether there would be any important downsides to such a
feature. FWIW, I added this feature to Icicles, and I haven't had any

reply via email to

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