GNU bug report logs - #66903
29.1; shell-mode directory tracking incorrectly handles double slashes

Previous Next

Package: emacs;

Reported by: Allen Li <darkfeline <at> felesatra.moe>

Date: Fri, 3 Nov 2023 00:16:01 UTC

Severity: wishlist

Found in version 29.1

Full log


View this message in rfc822 format

From: Allen Li <darkfeline <at> felesatra.moe>
To: 66903 <at> debbugs.gnu.org
Subject: bug#66903: 29.1; shell-mode directory tracking incorrectly handles double slashes
Date: Thu, 2 Nov 2023 17:14:36 -0700
[Message part 1 (text/plain, inline)]
Reproduce:

(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

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.

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).

In GNU Emacs 29.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.37,
 cairo version 1.16.0) of 2023-09-03, modified by Debian built on
 kokoro-ubuntu
Windowing system distributor 'The X.Org Foundation', version 11.0.12101007
System Description: Debian GNU/Linux rodete
[Message part 2 (text/html, inline)]

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.