From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#66903: 29.1; shell-mode directory tracking incorrectly handles double slashes Date: Fri, 03 Nov 2023 09:26:08 +0200 Message-ID: <83jzqz70xb.fsf@gnu.org> References: <83pm0r71e8.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8603"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 66903@debbugs.gnu.org To: Allen Li Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Nov 03 08:26:54 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qyoZx-000228-OE for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 03 Nov 2023 08:26:53 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qyoZY-00010d-8o; Fri, 03 Nov 2023 03:26:28 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qyoZW-00010M-N7 for bug-gnu-emacs@gnu.org; Fri, 03 Nov 2023 03:26:26 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qyoZW-0001bI-FH for bug-gnu-emacs@gnu.org; Fri, 03 Nov 2023 03:26:26 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qyoa5-0001Qb-NQ for bug-gnu-emacs@gnu.org; Fri, 03 Nov 2023 03:27:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 03 Nov 2023 07:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66903 X-GNU-PR-Package: emacs Original-Received: via spool by 66903-submit@debbugs.gnu.org id=B66903.16989964175476 (code B ref 66903); Fri, 03 Nov 2023 07:27:01 +0000 Original-Received: (at 66903) by debbugs.gnu.org; 3 Nov 2023 07:26:57 +0000 Original-Received: from localhost ([127.0.0.1]:56681 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qyoa0-0001QF-Qc for submit@debbugs.gnu.org; Fri, 03 Nov 2023 03:26:57 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36170) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qyoZz-0001Q3-7l for 66903@debbugs.gnu.org; Fri, 03 Nov 2023 03:26:55 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qyoZJ-0001a1-Mb; Fri, 03 Nov 2023 03:26:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=T7cNvI5W4oMELps2P3KCv6sBNsY52nQSGDXbDE88S6Y=; b=RxMaTi+Exw4gx1NLkY04 uhdllnZH/w2zEXZw4xWPzbkDjDOJpuPIIswEFiPUzJJlPdP4mBTavXALV5Zvp5M4WD/f26kjMiDJB InuQO0xuPEth2DdVyJ/YXJDvSvOzV2AiDs3sLxXm/qRTdmyzQJSn233nHge0visc+5ZE4NKpubJnO ywCbd50L19blNriJsOwB7VavetDKg9ll3HeVcybLW7t5nXbxqwMRuhTPUZgNrSAShWgvOzkE935hE KU5QKJpfw1ik+5VLEwYoJSDy7KcyGBei/66v9HeA/dYHrsEAlF/D1qXx2Tg4iSc9PJsPAKhye5wz/ KW1XThp7xUPfLg==; In-Reply-To: (message from Allen Li on Fri, 3 Nov 2023 00:22:26 -0700) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:273697 Archived-At: > From: Allen Li > Date: Fri, 3 Nov 2023 00:22:26 -0700 > Cc: 66903@debbugs.gnu.org > > On Fri, Nov 3, 2023 at 12:16 AM Eli Zaretskii wrote: > > "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. > > The behavior it is supposed to implement is that it tracks the working directory of the shell. > Currently, it fails to do so for most shells that a user would use. > In fact, it fails to do so for the default value `/bin/bash`. > > > 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 is absolutely a bug. The feature, where shell-mode attempts to track the working > directory of its subshell, fails to work for most shells in existence > (e.g., derivatives of POSIX sh, csh, zsh, etc.) and including the default shell. > > I agree it may be an option, but I disagree that it should be off by default, given that the > default configured shell Bash requires it. I think we disagree about what should be fixed: the value of default-directory or the directory to which "cd ~//bin" switches.