From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chris Moore Newsgroups: gmane.emacs.devel Subject: Re: abbreviate-file-name on Windows seems incorrect Date: Mon, 08 Jan 2007 02:40:03 +0100 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1168220429 21318 80.91.229.12 (8 Jan 2007 01:40:29 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 8 Jan 2007 01:40:29 +0000 (UTC) Cc: Stephen Leake , Eli Zaretskii , miles@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 08 02:40:25 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 1H3jUu-00067k-4C for ged-emacs-devel@m.gmane.org; Mon, 08 Jan 2007 02:40:24 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H3jUt-0001oj-4F for ged-emacs-devel@m.gmane.org; Sun, 07 Jan 2007 20:40:23 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H3jUh-0001oU-0p for emacs-devel@gnu.org; Sun, 07 Jan 2007 20:40:11 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H3jUf-0001oI-I7 for emacs-devel@gnu.org; Sun, 07 Jan 2007 20:40:10 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H3jUf-0001oF-G5 for emacs-devel@gnu.org; Sun, 07 Jan 2007 20:40:09 -0500 Original-Received: from [66.249.92.169] (helo=ug-out-1314.google.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1H3jUe-0004o8-UY for emacs-devel@gnu.org; Sun, 07 Jan 2007 20:40:09 -0500 Original-Received: by ug-out-1314.google.com with SMTP id j3so6833388ugf for ; Sun, 07 Jan 2007 17:40:08 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:to:cc:references:from:date:in-reply-to:message-id:user-agent:mime-version:content-type:x-sa-exim-connect-ip:x-sa-exim-mail-from:x-spam-checker-version:x-spam-level:x-spam-status:subject:x-sa-exim-version:x-sa-exim-scanned:sender; b=myCqoE7dZViO7PnhltTGJMyhicf8sZ5grnYeLvmvg87k2YkAyLykKjZCuycO5WhNiMGCl73NOxhPS01XCPhpTcyB0sBedWPoOaFM6D58Yo0j1OI1b80eYPAbuWc3lmnlz5qGjkdXBJl9HkQ0u2YX57hayhwdekcAGdVEarLgiJc= Original-Received: by 10.66.243.2 with SMTP id q2mr34211309ugh.1168220407631; Sun, 07 Jan 2007 17:40:07 -0800 (PST) Original-Received: from chrislap.local ( [89.176.28.156]) by mx.google.com with ESMTP id o30sm38854710ugd.2007.01.07.17.40.06; Sun, 07 Jan 2007 17:40:07 -0800 (PST) Original-Received: from localhost ([127.0.0.1] helo=chrislap.local) by chrislap.local with esmtp (Exim 4.63) (envelope-from ) id 1H3jUZ-0002J8-Lp; Mon, 08 Jan 2007 02:40:04 +0100 Original-To: "Drew Adams" In-Reply-To: (Drew Adams's message of "Sun\, 7 Jan 2007 14\:08\:06 -0800") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.92 (gnu/linux) X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: dooglus@gmail.com X-SA-Exim-Version: 4.2.1 (built Sun, 03 Dec 2006 00:39:09 +0000) X-SA-Exim-Scanned: Yes (on chrislap.local) 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:64950 Archived-At: "Drew Adams" writes: > Followup info: > > 1. It's about `abbreviate-file-name', not `expand-file-name' or > `substitute-in-file-name'. See subject line and original report I sent. The value of HOME is cached the first time abbreviate-file-name is called, and never updated, using exactly the code you quoted here: > The code for `abbreviate-file-name' defines `abbreviated-home-dir' as > follows, in order to be able to "substitute `~' for the user's home > directory", as the doc string says: > > (or abbreviated-home-dir > (setq abbreviated-home-dir > (let ((abbreviated-home-dir "$foo")) > (concat "^" (abbreviate-file-name > (expand-file-name "~")) > "\\(/\\|\\'\\)")))) > > The comment for this code is as follows, which indicates that a slash is > added to distinguish the home dir from a file in that dir: If you look up 3 lines from that comment about the slash, you'll see: ;; Compute and save the abbreviated homedir name. ;; We defer computing this until the first time it's needed, Chris.