GNU bug report logs -
#66903
29.1; shell-mode directory tracking incorrectly handles double slashes
Previous Next
Full log
Message #10 received at control <at> debbugs.gnu.org (full text, mbox):
severity 66903 wishlist
thanks
> From: Allen Li <darkfeline <at> felesatra.moe>
> Date: Thu, 2 Nov 2023 17:14:36 -0700
>
> (assume ~/bin exists)
>
> 1. M-x shell RET
> 2. cd ~//bin RET
> 3. M-: default-directory RET
>
> Expected:
>
> default-directory is ~/bin
>
> Actual:
>
> default-directory is /bin
This is the standard Emacs behavior: double slash makes everything
before that ignored.
> It seems like the directory tracker uses Emacs's convention for double
> slashes "resetting" a path to root, but most shells treat double slashes
> the same as single slashes.
"M-x shell" is not a shell, it is an Emacs interface to a shell.
Thus, it should be free to implement behavior not present in the
shell, if we consider it convenient for Emacs users.
> It looks like this should be fixed in `shell-cd` (which should also fix
> `shell-process-pushd`) by implementing "custom" path handling (compared
> to Emacs default path handling behavior).
This is not a bug. I'm okay with adding a new optional feature that
would disable the above behavior, but it must be off by default.
This bug report was last modified 1 year and 224 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.