emacs-devel
[Top][All Lists]
Advanced

[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: Sat, 13 Oct 2007 08:06:32 -0700

>     > This is definitely not the way directory-abbrev-alist
>     > was intended to be used.
>
>     So what? Regardless of the original intention, what's
>     important is how it actually behaves.
>
> If you want to know what it will do if you set variables to values
> that are not intended to be used, you can read the code.

I did, including all of the distribution Lisp code that uses it. I see
nothing in the code that contradicts what I said. There is nothing that
prevents FROM from matching a valid directory name that might not in fact
directly name an existing directory. The code still works fine in that case.
And at least some users have been putting that behavior to good use.

> I made it clearer in the doc string what cases are
> supposed to be used.

The only change you made, that I can see, was adding this phrase: "FROM and
TO should be equivalent names, which refer to the same directory."

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.

Even if FROM had been ^/foo, they would be equivalent names and refer to the
same directory, if what ^/foo matches is a directory name.

 1. FROM: ^/foo
 2. what FROM matches (e.g. typed by user): /foobar
 3. replacement for the match: /very-long-path-here/exe
 4. TO: /very-long-path-here/exe

#3 and #4 are identical names for the same directory. #1 is an equivalent
name, by the behavior of `directory-abbrev-alist', to #4.

I believe that what I've described is what the code actually does. Don't you
think so? That behavior might not be as limited as what you intended, but
that is the current behavior AFAICT.

And I don't see why the behavior should be changed to fit the more limited
scenario you apparently have in mind. This is a useful mechanism. We've
already had two users (not counting me) who reported using it this way: (1)
the user I mentioned and (2) Juanma.






reply via email to

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