From: Eli Zaretskii <eliz@gnu.org>
To: Allen Li <darkfeline@felesatra.moe>
Cc: 66903@debbugs.gnu.org
Subject: bug#66903: 29.1; shell-mode directory tracking incorrectly handles double slashes
Date: Fri, 03 Nov 2023 09:15:59 +0200 [thread overview]
Message-ID: <83pm0r71e8.fsf@gnu.org> (raw)
In-Reply-To: <CADbSrJz6a2xudEBbwhDW=OTKTMWQux=Mpc3dyskJ5cESOo4h8w@mail.gmail.com> (message from Allen Li on Thu, 2 Nov 2023 17:14:36 -0700)
severity 66903 wishlist
thanks
> From: Allen Li <darkfeline@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.
next prev parent reply other threads:[~2023-11-03 7:15 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-03 0:14 bug#66903: 29.1; shell-mode directory tracking incorrectly handles double slashes Allen Li
2023-11-03 7:15 ` Eli Zaretskii [this message]
2023-11-03 7:22 ` Allen Li
2023-11-03 7:26 ` Eli Zaretskii
2023-11-03 8:35 ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-03 12:02 ` Eli Zaretskii
2023-11-03 12:35 ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-03 14:24 ` Eli Zaretskii
2023-11-04 0:21 ` Stefan Kangas
2023-11-04 2:53 ` Visuwesh
2023-11-03 10:43 ` Allen Li
2023-11-03 12:07 ` Eli Zaretskii
2023-11-03 20:54 ` Allen Li
2023-11-04 6:34 ` Eli Zaretskii
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=83pm0r71e8.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=66903@debbugs.gnu.org \
--cc=darkfeline@felesatra.moe \
/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).