Subject: bug#66903: 29.1; shell-mode directory tracking incorrectly handles double slashes

From: Allen Li <[email-masked]>
Date: Fri, 3 Nov 2023 03:43:35 -0700

On Fri, Nov 3, 2023 at 12:26 AM Eli Zaretskii <[email-masked]> wrote:

> I think we disagree about what should be fixed: the value of
> default-directory or the directory to which "cd ~//bin" switches.
>

Sorry, let me clarify

Currently, `cd ~//bin` will cause the shell (Bash or similar) to change to
~/bin, and Emacs/shell-mode will change `default-directory` to `/bin`.

This bug is saying that Emacs/shell-mode should change `default-directory`
to `~/bin` by default, optionally with a user option that reverts to the
current behavior in case the user has in fact explicitly configured to use
a shell that interprets `cd ~//bin` to mean `cd /bin` (although I am not
aware of any shells that do this (except eshell, which is not relevant to
this issue)).

I (mis?)interpreted your statement to mean that you think the current
behavior is not a bug and should be the default (that Emacs/shell-mode
should change `default-directory` to `/bin` even though the shell changes
to ~/bin).