From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: should `minibuffer-complete' use `abbreviate-file-name'? Date: Sun, 14 Oct 2007 09:56:20 -0700 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1192381053 16987 80.91.229.12 (14 Oct 2007 16:57:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 14 Oct 2007 16:57:33 +0000 (UTC) Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Oct 14 18:57:22 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Ih6mF-00067J-Qs for ged-emacs-devel@m.gmane.org; Sun, 14 Oct 2007 18:57:20 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ih6m9-0000Wf-Ke for ged-emacs-devel@m.gmane.org; Sun, 14 Oct 2007 12:57:13 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ih6m3-0000RX-4t for emacs-devel@gnu.org; Sun, 14 Oct 2007 12:57:07 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ih6m1-0000Pp-TL for emacs-devel@gnu.org; Sun, 14 Oct 2007 12:57:06 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ih6m1-0000Pc-GV for emacs-devel@gnu.org; Sun, 14 Oct 2007 12:57:05 -0400 Original-Received: from rgminet01.oracle.com ([148.87.113.118]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Ih6lx-0008C3-2y; Sun, 14 Oct 2007 12:57:01 -0400 Original-Received: from rgmgw2.us.oracle.com (rgmgw2.us.oracle.com [138.1.186.111]) by rgminet01.oracle.com (Switch-3.2.4/Switch-3.1.6) with ESMTP id l9EGuwpP022589; Sun, 14 Oct 2007 10:56:58 -0600 Original-Received: from rcsmt250.oracle.com (rcsmt250.oracle.com [148.87.90.195]) by rgmgw2.us.oracle.com (Switch-3.2.4/Switch-3.2.4) with ESMTP id l9EB1CQR002627; Sun, 14 Oct 2007 10:56:57 -0600 Original-Received: from dhcp-amer-csvpn-gw2-141-144-73-194.vpn.oracle.com by acsmt350.oracle.com with ESMTP id 3290854591192380981; Sun, 14 Oct 2007 09:56:21 -0700 X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) In-reply-to: Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 X-Brightmail-Tracker: AAAAAQAAAAI= X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Whitelist: TRUE X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:80853 Archived-At: > 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 directory. 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 /my/very/long/dir/name/to/a/project. 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 complaints.