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:15:59 +0200 Message-ID: <83pm0r71e8.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39664"; 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:16:53 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 1qyoQH-000A9C-CQ for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 03 Nov 2023 08:16:53 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qyoPs-0007L4-Vs; Fri, 03 Nov 2023 03:16:29 -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 1qyoPq-0007J0-PX for bug-gnu-emacs@gnu.org; Fri, 03 Nov 2023 03:16:27 -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 1qyoPq-0006mg-HC for bug-gnu-emacs@gnu.org; Fri, 03 Nov 2023 03:16:26 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qyoQP-0001BG-Mb for bug-gnu-emacs@gnu.org; Fri, 03 Nov 2023 03:17: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:17: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.16989958154516 (code B ref 66903); Fri, 03 Nov 2023 07:17:01 +0000 Original-Received: (at 66903) by debbugs.gnu.org; 3 Nov 2023 07:16:55 +0000 Original-Received: from localhost ([127.0.0.1]:56658 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qyoQF-0001Ah-El for submit@debbugs.gnu.org; Fri, 03 Nov 2023 03:16:55 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52116) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qyoQA-0001AO-3D; Fri, 03 Nov 2023 03:16:50 -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 1qyoPV-0006k0-8K; Fri, 03 Nov 2023 03:16:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=Qped4HY4qfJZr+OTcKkXBSMYi4D7X5xaHgM0Whteang=; b=mufoZTgZQ8Pa 4CrVXEV9WJdayG8fH2TfA+sM/g4qbGKwYnkJDkcqP1UwyU+t97tT4xesC3PkriYFhARyP0haBnIoH EyUWED+hgF2tPKooFdsfrRvi2SbYoPyqC0e7ZIMrkeFO99+tlRLavcooiCUKW5UZHzf7nBdOA2RNc yjfaQqgmok89E1mxVfcWGZTien37U7XO+8lqNFFXIi4h33mjjzkfp4tGZYsM6CcCA57L0UO4w2KjR vvM/RdZLDIP7DOa3d25zeNh1IA0Q1sqSJxMHdf1kzIBvU03fGw4ObFRTgXEOHJnYTPn5ZTMkNTQ9a XLAvuyxCuFTS3k9b9X23eA==; In-Reply-To: (message from Allen Li on Thu, 2 Nov 2023 17:14:36 -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:273694 Archived-At: severity 66903 wishlist thanks > From: Allen Li > 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.