unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Luc Teirlinck <teirllm@dms.auburn.edu>
Cc: emacs-devel@gnu.org
Subject: Re: . and ..
Date: Thu, 18 Mar 2004 09:32:59 -0600 (CST)	[thread overview]
Message-ID: <200403181532.i2IFWxP06342@raven.dms.auburn.edu> (raw)
In-Reply-To: <jeekrqcsk6.fsf@sykes.suse.de> (message from Andreas Schwab on Thu, 18 Mar 2004 12:18:01 +0100)

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.

  reply	other threads:[~2004-03-18 15:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-18  0:03 . and Luc Teirlinck
2004-03-18 11:18 ` Andreas Schwab
2004-03-18 15:32   ` Luc Teirlinck [this message]
  -- strict thread matches above, loose matches on Subject: below --
2004-03-18  0:06 Luc Teirlinck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200403181532.i2IFWxP06342@raven.dms.auburn.edu \
    --to=teirllm@dms.auburn.edu \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).