From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: rfn-eshadow.el and remote filenames Date: Wed, 12 Sep 2007 22:28:55 -0400 Message-ID: References: <874phzsgog.fsf@gmx.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1189650548 32099 80.91.229.12 (13 Sep 2007 02:29:08 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 13 Sep 2007 02:29:08 +0000 (UTC) Cc: emacs-devel@gnu.org To: Michael Albinus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Sep 13 04:29:05 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 1IVeRz-0004DI-OE for ged-emacs-devel@m.gmane.org; Thu, 13 Sep 2007 04:29:04 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IVeRz-0001rS-8v for ged-emacs-devel@m.gmane.org; Wed, 12 Sep 2007 22:29:03 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IVeRv-0001qS-J5 for emacs-devel@gnu.org; Wed, 12 Sep 2007 22:28:59 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IVeRu-0001p2-SN for emacs-devel@gnu.org; Wed, 12 Sep 2007 22:28:59 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IVeRu-0001oj-KT for emacs-devel@gnu.org; Wed, 12 Sep 2007 22:28:58 -0400 Original-Received: from bc.sympatico.ca ([209.226.175.184] helo=tomts22-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IVeRt-00010W-VH for emacs-devel@gnu.org; Wed, 12 Sep 2007 22:28:58 -0400 Original-Received: from pastel.home ([70.55.141.227]) by tomts22-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20070913022855.GTRA18413.tomts22-srv.bellnexxia.net@pastel.home> for ; Wed, 12 Sep 2007 22:28:55 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 887CF82E4; Wed, 12 Sep 2007 22:28:55 -0400 (EDT) In-Reply-To: <874phzsgog.fsf@gmx.de> (Michael Albinus's message of "Wed\, 12 Sep 2007 23\:43\:43 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.50 (gnu/linux) X-Detected-Kernel: Solaris 8 (1) 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:78725 Archived-At: > Tramp has an own implementation of substitute-in-file-name, which > substitutes "//" and "/~" in the local filename part. In order to make > it visible in the minibuffer, I'ld like to install the appended patch in > the trunk. > If you want to see it, type something like "/tmp//su::/etc//us " in > the minibuffer, when opening a file. > Any objections? Current rfn-eshadow.el does not assume anything about the behavior of substitute-in-file-name and I think we should keep it that way. Obviously, it does have some preconceived notion about how substitute-in-file-name *might* work, but it works safely in "all" cases. Currently, rfn-eshadow.el only recognizes when substitute-in-file-name drops a prefix of the current file name, so we need to extend it to recognize cases where substitute-in-file-name drops some internal part instead. How to do that efficiently? I'm not sure. I'd prefer we find a more general way to do it, but if not, maybe your code can be kept mostly, but then it should check its result against the return value of substitute-in-file-name. Stefan