[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: . and ..
From: |
Luc Teirlinck |
Subject: |
Re: . and .. |
Date: |
Thu, 18 Mar 2004 09:32:59 -0600 (CST) |
Andreas Schwab wrote:
Note that cd (without the -P option) in the POSIX shell works like Emacs.
The way I see it, without the -P option, the POSIX shell does not do
_any_ replacing of symbolic links in the path name. So without the -P
option, the question of whether to do that before or after simplifying
away .. does not arise. This is indeed a subtlety of cd one has to be
careful about. It is explicitly documented in the bash manual.
Of course, the behavior of `expand-file-name' is documented too.
There is a difference however. With `cd -L' vs `cd -P' one makes one
single choice. In Emacs one makes a similar choice by calling or not
calling `expand-file-name', a function whose primary purpose is
something completely unrelated. This is both inconvenient and
dangerous, as my ielm run illustrates.
I do _not_ suggest changing the behavior of the Emacs `cd' command,
because it indeed is consistent with the default -L behavior of the
POSIX shell.
Sincerely,
Luc.