emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: abbreviate-file-name on Windows seems incorrect


From: Chris Moore
Subject: Re: abbreviate-file-name on Windows seems incorrect
Date: Mon, 08 Jan 2007 02:40:03 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.92 (gnu/linux)

"Drew Adams" <address@hidden> 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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]