From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dan McCarthy Newsgroups: gmane.emacs.bugs Subject: bug#53927: 27.2; shell-mode dir tracking falls out of sync after popd in remote buffers Date: Tue, 15 Feb 2022 10:29:43 -0500 Message-ID: References: <87y22cw8o6.fsf@gmx.de> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000069a53905d810344b" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25809"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 53927@debbugs.gnu.org To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Feb 15 16:31:32 2022 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 1nJznZ-0006Jl-8a for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 15 Feb 2022 16:31:25 +0100 Original-Received: from localhost ([::1]:35932 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nJznX-0004E7-TX for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 15 Feb 2022 10:31:24 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:37410) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nJznC-0004Do-VF for bug-gnu-emacs@gnu.org; Tue, 15 Feb 2022 10:31:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52279) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nJznC-0001JQ-KY for bug-gnu-emacs@gnu.org; Tue, 15 Feb 2022 10:31:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nJznC-0003rT-Cb for bug-gnu-emacs@gnu.org; Tue, 15 Feb 2022 10:31:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dan McCarthy Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 15 Feb 2022 15:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53927 X-GNU-PR-Package: emacs Original-Received: via spool by 53927-submit@debbugs.gnu.org id=B53927.164493900314670 (code B ref 53927); Tue, 15 Feb 2022 15:31:02 +0000 Original-Received: (at 53927) by debbugs.gnu.org; 15 Feb 2022 15:30:03 +0000 Original-Received: from localhost ([127.0.0.1]:46176 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nJzmD-0003oK-NU for submit@debbugs.gnu.org; Tue, 15 Feb 2022 10:30:02 -0500 Original-Received: from mail-io1-f53.google.com ([209.85.166.53]:36671) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nJzmB-0003nj-MC for 53927@debbugs.gnu.org; Tue, 15 Feb 2022 10:30:00 -0500 Original-Received: by mail-io1-f53.google.com with SMTP id h5so539079ioj.3 for <53927@debbugs.gnu.org>; Tue, 15 Feb 2022 07:29:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=wzScPOO/13IA8eBhTbsjOVNl5ZNHz67Gz4qPu1lJFdc=; b=V9Ps0K/FcF9qYJRM0i25qcMw6jHVAHlEjIZ/H4n0mIj8UX1oyGhuCmnhLy7M9IAcnh Nth4ttq8hddxam/UCPXu/uw9lGvnvDvRM7pLWxMsqLlEOTCiZDegNHVqlt0o3GekcBul zx7JiOZZI1+7aSzEFuwsm4nDh/P5N/qOOkKJeVEkwrij4KMEIkaoeUJI58KtEP0CokJD 2dKbj0pZlhXTc4UyYWj2t4VAsBD1xfs7zzYJ0epMn5ABfVJm2XgdGpucoGZvsTJkvjd3 NSRav4RA1UELIrA0kOWxW0UaJYGFqNwjL9mntZofRjWyJzzA2Em90Gpgs198nkG4N6Ad kLrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=wzScPOO/13IA8eBhTbsjOVNl5ZNHz67Gz4qPu1lJFdc=; b=vIDt5dskloYNq+mkj29cfikAiTxYEmPJeP3xG35PzFbb5BRxvi5Or/R7qrCReIjAIp o1dKQghM64FUNN4+DTb0iGRCfVo81sW+jIgU8tLIEujScP/BUWXPRmR05nkrRj6XCfK1 CozeHEfel3VcDfa5yTgGI3g8U35kBKUPHDwLdP+QVq/1GJdgz8eUFL9m2WyVaWverPsF uJDu3JRLX3nvILHaDtmLw0/ItStX/Rqlno79n+GUfOSJ58mvUcBBXd0eJL7gvObVOD8M ZGLWdMiyngg0p0zxB+LNQwzm9U7CVgFRA3LjdRUXT9JJUznfSj3UaRF4VEEsePVASPid ZJoQ== X-Gm-Message-State: AOAM530iFzCdNRL5bLojFBeups7cm58DoyT5ehBt1yhKEE7ZvY6DbeeX rPi1inWcg7vmpJYcMRPMh14LawQVtRtarzYUOzk= X-Google-Smtp-Source: ABdhPJw/6YIi66IV/+sP0doya0QKH9w0DvtXoBhGwif5EXEYKfSewvAB1IvcAKSOXVhJ/U23bSfHdDUOwpBeaBGnqC4= X-Received: by 2002:a6b:5b0d:: with SMTP id v13mr24151ioh.190.1644938993967; Tue, 15 Feb 2022 07:29:53 -0800 (PST) In-Reply-To: <87y22cw8o6.fsf@gmx.de> 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" Xref: news.gmane.io gmane.emacs.bugs:226993 Archived-At: --00000000000069a53905d810344b Content-Type: text/plain; charset="UTF-8" The patch fixes it for me too. Thanks! On Tue, Feb 15, 2022 at 8:39 AM Michael Albinus wrote: > Dan McCarthy writes: > > Hi Dan, > > > Create a remote shell-mode buffer with C-u M-x shell, using bash as > > the > > remote shell. pushd into another directory, then popd > > back. default-directory and shell-dirstack still have the other > > directory even though the popd took effect in the remote process. > > > > The problem seems to be that shell-prefixed-directory-name returns a > > string like > > "/ssh:dan@solstice:/ssh:dan@solstice:/home/dan/Documents/", > > doubling the remote prefix. > > > > Local shell-mode buffers do not have the problem. > > Thanks for the bug report, I could reproduce it locally. The appended > patch fixes this for me, could you please check? > > Eli, it is a very simple patch. Any chance to commit it to the emacs-28 > branch? Otherwise, I would commit it to master, but we need a marker to > merge it back to the emacs-28 branch after the Emacs 28.1 release. > > Best regards, Michael. > > --00000000000069a53905d810344b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
The patch fixes it for me too. Thanks!

On Tue, Feb 15, = 2022 at 8:39 AM Michael Albinus <michael.albinus@gmx.de> wrote:
Dan McCarthy <daniel.c.mccarthy@gmail.com> writes:=

Hi Dan,

> Create a remote shell-mode buffer with C-u M-x shell, using bash as > the
> remote shell. pushd into another directory, then popd
> back. default-directory and shell-dirstack still have the other
> directory even though the popd took effect in the remote process.
>
> The problem seems to be that shell-prefixed-directory-name returns a > string like
> "/ssh:dan@solstice:/ssh:dan@solstice:/home/dan/Documents/",<= br> > doubling the remote prefix.
>
> Local shell-mode buffers do not have the problem.

Thanks for the bug report, I could reproduce it locally. The appended
patch fixes this for me, could you please check?

Eli, it is a very simple patch. Any chance to commit it to the emacs-28
branch? Otherwise, I would commit it to master, but we need a marker to
merge it back to the emacs-28 branch after the Emacs 28.1 release.

Best regards, Michael.

--00000000000069a53905d810344b--