From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.devel Subject: Re: substitute-in-file-name and "$" Date: Mon, 07 Jul 2003 15:33:09 -0600 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <3F09E715.6030708@yahoo.com> References: <20030706000741.GA27544@gnu.org> <5xr853j1td.fsf@kfs2.cua.dk> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1057615645 15105 80.91.224.249 (7 Jul 2003 22:07:25 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 7 Jul 2003 22:07:25 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Tue Jul 08 00:07:21 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19Ze8m-0003v7-00 for ; Tue, 08 Jul 2003 00:07:20 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 19ZeIp-0002hq-00 for ; Tue, 08 Jul 2003 00:17:43 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19ZdtD-0005IN-Ud for emacs-devel@quimby.gnus.org; Mon, 07 Jul 2003 17:51:15 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19Zdrw-0005BG-LX for emacs-devel@gnu.org; Mon, 07 Jul 2003 17:49:56 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19ZdpA-0003s8-Cq for emacs-devel@gnu.org; Mon, 07 Jul 2003 17:47:05 -0400 Original-Received: from main.gmane.org ([80.91.224.249]) by monty-python.gnu.org with esmtp (Exim 4.20) id 19Zdm0-0002y7-MX for emacs-devel@gnu.org; Mon, 07 Jul 2003 17:43:48 -0400 Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 19ZdjR-0001sv-00 for ; Mon, 07 Jul 2003 23:41:09 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Received: from news by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 19Zdaz-0001E7-00 for ; Mon, 07 Jul 2003 23:32:25 +0200 Original-Lines: 28 Original-X-Complaints-To: usenet@main.gmane.org User-Agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2 X-Accept-Language: en-us X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:15471 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:15471 Kim F. Storm wrote: > Maybe substitute-in-file-name could put a `substitute-in-file-name' > property on the return value and check for that property on its > argument (and do nothing if it is present). That is an excellent solution. > A later call to substitute-in-file-name should then skip over parts of > its argument string which has that property (and only substitute in > parts which are not previously substituted. > > That is still not completely fool-proof if the result of > substitute-in-file-name is manipulated in some way which removes the > property and then later passed to substitute-in-file-name again. But as long as file-name-directory, file-name-nondirectory, expand-file-name, etc. preserved text properties, the programmer would have to intentionally circumvent the feature. Unfortunately, those functions seem to remove text properties from their result (in the Emacs 21.3 release). -- Kevin Rodgers