From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "David J. Biesack" Newsgroups: gmane.emacs.bugs Subject: bug#4902: 23.1; directory-abbrev-alist is not handled early enough Date: Tue, 10 Nov 2009 16:29:36 -0500 Message-ID: References: Reply-To: "David J. Biesack" , 4902@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1257889661 2962 80.91.229.12 (10 Nov 2009 21:47:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 10 Nov 2009 21:47:41 +0000 (UTC) Cc: 4902@emacsbugs.donarmstrong.com To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Nov 10 22:47:33 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1N7yYn-0003Le-0v for geb-bug-gnu-emacs@m.gmane.org; Tue, 10 Nov 2009 22:47:33 +0100 Original-Received: from localhost ([127.0.0.1]:37018 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N7yYm-0007ZD-Hj for geb-bug-gnu-emacs@m.gmane.org; Tue, 10 Nov 2009 16:47:32 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N7yYh-0007Uq-4f for bug-gnu-emacs@gnu.org; Tue, 10 Nov 2009 16:47:27 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N7yYc-0007J9-5x for bug-gnu-emacs@gnu.org; Tue, 10 Nov 2009 16:47:26 -0500 Original-Received: from [199.232.76.173] (port=44984 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N7yYb-0007Iq-SJ for bug-gnu-emacs@gnu.org; Tue, 10 Nov 2009 16:47:22 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:37834) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1N7yYb-0005Ih-9p for bug-gnu-emacs@gnu.org; Tue, 10 Nov 2009 16:47:21 -0500 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nAALlIFD004219; Tue, 10 Nov 2009 13:47:18 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id nAALZGTT003151; Tue, 10 Nov 2009 13:35:16 -0800 Resent-Date: Tue, 10 Nov 2009 13:35:16 -0800 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: "David J. Biesack" Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Tue, 10 Nov 2009 21:35:15 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 4902 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 4902-submit@emacsbugs.donarmstrong.com id=B4902.12578885912611 (code B ref 4902); Tue, 10 Nov 2009 21:35:15 +0000 Original-Received: (at 4902) by emacsbugs.donarmstrong.com; 10 Nov 2009 21:29:51 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from mercav16.na.sas.com (mercav16.na.sas.com [149.173.6.153]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nAALTjWP002604 for <4902@emacsbugs.donarmstrong.com>; Tue, 10 Nov 2009 13:29:50 -0800 X-TM-IMSS-Message-ID: <2645cc540027581e@mercav16.na.sas.com> Original-Received: from d16922.us.sas.com ([10.40.12.239]) by mercav16.na.sas.com ([10.19.9.246]) with ESMTP (TREND IMSS SMTP Service 7.0) id 2645cc540027581e ; Tue, 10 Nov 2009 16:29:37 -0500 In-reply-to: (message from Stefan Monnier on Tue, 10 Nov 2009 16:02:26 -0500) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Tue, 10 Nov 2009 16:47:26 -0500 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:32529 Archived-At: > From: Stefan Monnier > CC: <4902@emacsbugs.donarmstrong.com> > Date: Tue, 10 Nov 2009 16:02:26 -0500 > > > For example, if the path /mount/somefile.x shows up in RMAIL > > or in a source file, I want to do find-file-at-point > > on that path. When I do, Emacs tries to open c:/mount/somefile.x > > instead. > > As the docstring of directory-abbrev-alist says: > > FROM and TO should be equivalent names, which refer to the > same directory. > > So the feature you want is not the feature provided by > directory-abbrev-alist :-( :-( > Maybe we could change the code so as to expand the scope of > directory-abbrev-alist to include your situation, but I'm not actually > sure that's a good idea, because it doesn't seem clear exactly when that > rewrite should take place. > > Maybe if you give us a bit more context to your problem, we can come up > with a better solution. > For starters explain to us: if the system doesn't have a "/mount" > directory, why does it show up in source files, email, and filemenu? Sure, here is my context. Our source code, doc, tools, etc is stored on netapps. We split development between Linux and Windows. For the most part, source filenames are passed around or mentioned in doc or email reports etc. using Unix paths: /sas/dev/mva-v930/tkacl for example. On Windows, these paths are available via Samba and UNC paths etc. as //dntsrc/sas/dev/mva-v930/tkacl . For example, we run builds from Windows but they run remotely on Unix and therefore all compiler messages refer to the files via the Unix names, and different hosts do different mangling of the names. But when I see a path in a source file or email it is almost always in Unix format. Similarly, our network login directories are on the netapps, for example, my "home" directory is /u/sasdjb , but that is only available from Windows via a UNC path, //dntsrc/u/sasdjb or or //sashq/too/u/sasdjb or /nfs/sanyo/vol/vol2/u22/sasdjb or via a mapped network drive, u:/ Obviously, there are too many different names for the same file, and I want Emacs to normalize all files to a canonical form; i.e. all the variations of my network home should be normalized to u:/ and so forth. directory-abbrev-alist: '(("^//dntsrc/u/sasdjb" . "u:") ("^/u/sasdjb" . "u:") ("^//sashq/root/u/sasdjb" . "u:") ("^/nfs/sanyo/vol/vol2/u22/sasdjb" . "u:/") ("^//sashq/root/u/sasdjb" . "u:") ("^/sas/" . "//dntsrc/sas/") ("^/sasgen" . "//dntsrc/sasgen/")) If I'm running Emacs on Linux, I would normalize all these variations the other way: directory-abbrev-alist: '(("^//dntsrc/u/sasdjb" . "/u/sasdjb") ("^u:" . "/u/sasdjb") ("^//sashq/root/u/sasdjb" . "/u/sasdjb") ("^/nfs/sanyo/vol/vol2/u22/sasdjb" . "/u/sasdjb") ("^//sashq/root/u/sasdjb" . "/u/sasdjb") ("^//dntsrc/sas/" . "/sas/") ("^//dntsrc/sasgen/" . "/sasgen")) There are many ways in which I can open files in Emacs C-x C-f filemenu http://www.eskimo.com/~seldon/filemenu.el find-file-at-point gud/gdb compile/next-error and probably 5 or 6 other ways, and I'd like them to all honor directory-abbrev-alist > Stefan -- David J. Biesack, SAS SAS Campus Dr. Cary, NC 27513 www.sas.com (919) 531-7771