From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Allen Li Newsgroups: gmane.emacs.bugs Subject: bug#66903: 29.1; shell-mode directory tracking incorrectly handles double slashes Date: Fri, 3 Nov 2023 00:22:26 -0700 Message-ID: References: <83pm0r71e8.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000078b3ed06093a5ee3" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33071"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 66903@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Nov 03 08:23:47 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 1qyoWx-0008PG-0t for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 03 Nov 2023 08:23:47 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qyoWe-0008RE-U3; Fri, 03 Nov 2023 03:23: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 1qyoWd-0008Qn-Jm for bug-gnu-emacs@gnu.org; Fri, 03 Nov 2023 03:23: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 1qyoWc-0000ut-Rp for bug-gnu-emacs@gnu.org; Fri, 03 Nov 2023 03:23:26 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qyoXC-0001M2-7N for bug-gnu-emacs@gnu.org; Fri, 03 Nov 2023 03:24:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Allen Li Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 03 Nov 2023 07:24:02 +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.16989962025140 (code B ref 66903); Fri, 03 Nov 2023 07:24:02 +0000 Original-Received: (at 66903) by debbugs.gnu.org; 3 Nov 2023 07:23:22 +0000 Original-Received: from localhost ([127.0.0.1]:56671 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qyoWX-0001Kq-U4 for submit@debbugs.gnu.org; Fri, 03 Nov 2023 03:23:22 -0400 Original-Received: from mail-lj1-x236.google.com ([2a00:1450:4864:20::236]:39294) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qyoWV-0001Kb-HX for 66903@debbugs.gnu.org; Fri, 03 Nov 2023 03:23:20 -0400 Original-Received: by mail-lj1-x236.google.com with SMTP id 38308e7fff4ca-2c519eab81fso3959981fa.1 for <66903@debbugs.gnu.org>; Fri, 03 Nov 2023 00:22:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=felesatra-moe.20230601.gappssmtp.com; s=20230601; t=1698996158; x=1699600958; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=5XOHnPQoIQMC6oLcMiFeyvAfDBHca+XO1DzGqZfIdNY=; b=Aer2/uvbtuk4qWsTdlFJBjitQfTyLa47gMHK2HJUGKM9kkIxqVl9Aq3cgbvaQPZwtv 4etBNXKuCgYullCbafqQQMSKGo6v+jpQ02VwTDLx79sElBHrlOETuSeIMoZ6fuVFCZ1S z/lL5cwY9dIruyefre+k4YeCV76xJ54fLuWAqjOptOXbLuESKUfDC+UaKuud2cuuMoXy 9m0LFWROP5Z9S6UpfonQay+jJ8GAkxXdAIU58gCAq4aOCzISNIeB2jLS0116woMZ3RQf XSC0dzGGCdVteG4EagGusUsnLRlXvDYt0kT3nyZADJJQ5okuhZQiagdBbSPNDGPgbrvd TFVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698996158; x=1699600958; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=5XOHnPQoIQMC6oLcMiFeyvAfDBHca+XO1DzGqZfIdNY=; b=MbWgEu/xxXP0xib28u48svRQ4sIWw/Am8bxc/6cdXXn8JJRwxOQs5jTBmk2G/4RBpD ck8F4kOFLelthVgIzP+lr6FY96ckF8tClSjoVToIoNke0/fbV8AlJbIx343iCzMbUUwG TFrNRN0e2w40LsqWq8Wyk85HJmFq/Swv0RmkvlnBLZp7oeCoikZQlLXXxwp7OyJM1PvA gYjQm+NJfvFMNv8LIypFZieuAKFwrFNg3SqlO0mURCS0pz9WsiFqo24Gmkl4FFq1QWrv 7GgIJEYf7r6Yg2EYMAqGSqgn2cqwF6LhxuTjbeHpQEScprN/hIw+9NM/zVcu9n6HED0k t5pQ== X-Gm-Message-State: AOJu0YwWLaN74qzE+W2W2QMK0kQihDnnWVH3OrdTzdEfNRfb6TR8P8JR /DhH32zPYoCgbc209dkpyg93UvEHCAjhufrmfg8aLb0zVmg9UpsJUBs= X-Google-Smtp-Source: AGHT+IGzP0Z+7PrWnal7lpPnyjq4a9n2r95MSB/ZNljRKcNuGD2vgR9DVutAOlKHzFesJeGB7uvBo9mFtHNFLiHdHBg= X-Received: by 2002:a2e:9a89:0:b0:2be:5485:4a99 with SMTP id p9-20020a2e9a89000000b002be54854a99mr14883885lji.4.1698996157980; Fri, 03 Nov 2023 00:22:37 -0700 (PDT) In-Reply-To: <83pm0r71e8.fsf@gnu.org> 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:273696 Archived-At: --00000000000078b3ed06093a5ee3 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Nov 3, 2023 at 12:16=E2=80=AFAM 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. --00000000000078b3ed06093a5ee3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Fri, Nov 3, 2023 at 12:16=E2=80=AFAM E= li Zaretskii <eliz@gnu.org> wrote= :

"M-x shell" is not a shell, it is an Emacs interface to a shell.<= br> Thus, it should be free to implement behavior not present in the
shell, if we consider it convenient for Emacs users.
<= br>
The behavior it is supposed to implement is that it tracks th= e working directory of the shell.
Currently, it fails to do so fo= r most shells that a user would use.
In fact, it fails to do so f= or the default value `/bin/bash`.
=C2=A0
> It looks like this should be fixed in `shell-cd` (which should also fi= x
> `shell-process-pushd`) by implementing "custom" path handlin= g (compared
> to Emacs default path handling behavior).

This is not a bug.=C2=A0 I'm okay with adding a new optional feature th= at
would disable the above behavior, but it must be off by default.

This is absolutely a bug.=C2=A0 The feature, wher= e shell-mode attempts to track the working=C2=A0
directory of its= subshell, fails to work for most shells in existence=C2=A0
(e.g.= , derivatives of POSIX sh, csh, zsh, etc.) and including the default shell.= =C2=A0

I agree it may be an option, but I disagree that it should be= off by default, given that the=C2=A0
default configured shell Ba= sh requires it.
--00000000000078b3ed06093a5ee3--