all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: <rms@gnu.org>
Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org
Subject: RE: should `minibuffer-complete' use `abbreviate-file-name'?
Date: Sat, 13 Oct 2007 08:06:32 -0700	[thread overview]
Message-ID: <BNELLINCGFJLDJIKDGACAEKBCDAA.drew.adams@oracle.com> (raw)
In-Reply-To: <E1IghlM-00032v-GV@fencepost.gnu.org>

>     > 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	other threads:[~2007-10-13 15:06 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-02 19:25 should `minibuffer-complete' use `abbreviate-file-name'? Drew Adams
2007-10-03 18:37 ` Richard Stallman
2007-10-12 19:27   ` Drew Adams
2007-10-12 19:42     ` Stefan Monnier
2007-10-12 20:34       ` Drew Adams
2007-10-13  3:50         ` Stefan Monnier
2007-10-13  6:03           ` Drew Adams
2007-10-13 14:14             ` Richard Stallman
2007-10-13 15:06               ` Drew Adams [this message]
2007-10-14 16:28                 ` Richard Stallman
2007-10-14 16:56                   ` Drew Adams
2007-10-14 19:10                     ` Stefan Monnier
2007-10-15 16:04                     ` Richard Stallman
2007-10-15 16:25                       ` Drew Adams
2007-10-15 18:04                         ` Stefan Monnier
2007-10-15 18:19                           ` Drew Adams
2007-10-16  4:10                         ` Richard Stallman
2007-10-14  1:41             ` Stefan Monnier
2007-10-15  1:36               ` Richard Stallman
2007-10-13  9:50           ` Juanma Barranquero

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BNELLINCGFJLDJIKDGACAEKBCDAA.drew.adams@oracle.com \
    --to=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=rms@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.