From unknown Sun Jun 15 08:03:03 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#53927 <53927@debbugs.gnu.org> To: bug#53927 <53927@debbugs.gnu.org> Subject: Status: 27.2; shell-mode dir tracking falls out of sync after popd in remote buffers Reply-To: bug#53927 <53927@debbugs.gnu.org> Date: Sun, 15 Jun 2025 15:03:03 +0000 retitle 53927 27.2; shell-mode dir tracking falls out of sync after popd in= remote buffers reassign 53927 emacs submitter 53927 Dan McCarthy severity 53927 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 10 15:37:32 2022 Received: (at submit) by debbugs.gnu.org; 10 Feb 2022 20:37:32 +0000 Received: from localhost ([127.0.0.1]:57287 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nIGC2-00032h-Ua for submit@debbugs.gnu.org; Thu, 10 Feb 2022 15:37:32 -0500 Received: from lists.gnu.org ([209.51.188.17]:47018) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nIFu9-0002T1-Nc for submit@debbugs.gnu.org; Thu, 10 Feb 2022 15:19:02 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54710) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nIFu9-0000lE-Bh for bug-gnu-emacs@gnu.org; Thu, 10 Feb 2022 15:19:01 -0500 Received: from [2607:f8b0:4864:20::d2d] (port=43993 helo=mail-io1-xd2d.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nIFu7-0002cX-4S for bug-gnu-emacs@gnu.org; Thu, 10 Feb 2022 15:19:00 -0500 Received: by mail-io1-xd2d.google.com with SMTP id m185so8838538iof.10 for ; Thu, 10 Feb 2022 12:18:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=4w3W6qbqmw+Nh6uoKqZR9DXk04OjoaOuoEfK6oe3epQ=; b=kCnIUAdVGo5nlCIns1sjMYWv62RdRHN5b4y/tirljpXc5i/6/0bOgIoWs5xleUu5S0 eB/fWe4WLMT3aMzep09bETYGILYiTNeP5DthpCmvdWMfeHJMBALVOn+bxNd8jXtEimX1 uOb64T4HHOcct1O+GFkTaSP7CPM4zz2oB/5N7ZtEw2ikebgPuyYbXqvoolbsMsyYhdVC 9GAucDWPR7ceBwNhGpFCIlXawNlwjnZYv5d6GdCJqGst1Bbc8jUapwkxY5vufvCuKou0 vITmbMYoCFBtIdYxWLAHS4Eakg7e1uFzIkAi37+WVPPcRLirXGLVVdseUer11lebnQNW WpTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=4w3W6qbqmw+Nh6uoKqZR9DXk04OjoaOuoEfK6oe3epQ=; b=IGJ6ZbsFpbnLNl6N+2UR7pDcr28WB5OL1vB25nbr9k2/OR4vqOszeUp7ISxiB9oOBf vcll5nBRZT2iEl4ipC2lheI+eOmgW7zPZVflB3E4aCYaxOQngw7j8Bmj3QiEIxuHVJPV TYsAdoqRUR6tzmJ158MBCvzXV0b5LHwlaxoozGBCOJVFSwU/+CTH/YJCGIQsTjG3UBdv KDUhlGRLJ0Wca6Bz8RVk7wposZhEAcbrTDnBi2cm1fMP9xzDF/qYUJzChjY8d8tsLT10 1qGrMVUoyYj3o8H0o/+YAOsFTgGpOob18EFQvBEa9YQBqj3JNogzb6fOOJfvKqw1KxdC MMjw== X-Gm-Message-State: AOAM533qXrjpdCBSIAPX64mDoyJ9rk8+ksFWcD4DSgJTzN+kjoBS8DDz En8LulvqiG+2WPH5C+39RZn8lPCA01eLeD58yGIGLydUxlQ= X-Google-Smtp-Source: ABdhPJx/zU4Iu26Rwz+r2h5CcExTfNtKDL4CW3lbKTLVZX0Xmds+WoiXrWvjTFYVm9AQblmByg+VoOen5KogRH/96Ss= X-Received: by 2002:a05:6638:190a:: with SMTP id p10mr4901348jal.313.1644524337022; Thu, 10 Feb 2022 12:18:57 -0800 (PST) MIME-Version: 1.0 From: Dan McCarthy Date: Thu, 10 Feb 2022 15:18:46 -0500 Message-ID: Subject: 27.2; shell-mode dir tracking falls out of sync after popd in remote buffers To: bug-gnu-emacs@gnu.org Content-Type: multipart/alternative; boundary="000000000000eeccf205d7afa805" X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::d2d (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::d2d; envelope-from=daniel.c.mccarthy@gmail.com; helo=mail-io1-xd2d.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Thu, 10 Feb 2022 15:37:30 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --000000000000eeccf205d7afa805 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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. In GNU Emacs 27.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.18.9) of 2021-03-25 built on october Windowing system distributor 'The X.Org Foundation', version 11.0.12014000 System Description: Slackware 15.0 x86_64 Recent messages: Checking 113 files in /usr/local/share/emacs/27.2/lisp/obsolete... Checking for load-path shadows...done You can run the command =E2=80=98report-emacs-bug=E2=80=99 with M-x r-em RE= T Checking for load-path shadows...done Auto-saving... Mark saved where search started Making completion list... nil ~/Documents ~/Documents Making completion list... ("/ssh:dan@solstice:/home/dan/Documents/") Configured features: XPM JPEG TIFF GIF PNG RSVG SOUND GPM DBUS GSETTINGS GLIB NOTIFY INOTIFY ACL GNUTLS LIBXML2 FREETYPE HARFBUZZ XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS PDUMPER LCMS2 GMP Important settings: value of $LC_COLLATE: C value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Shell Minor modes in effect: global-git-commit-mode: t magit-auto-revert-mode: t shell-dirtrack-mode: t hexl-follow-ascii: t tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tab-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: ~/emacs-lisp/dictionary-el/link hides ~/.emacs.d/lisp/link ~/emacs-lisp/dictionary-el/connection hides ~/.emacs.d/lisp/connection ~/.emacs.d/lisp/android-mode hides /home/blakestone/.emacs.d/elpa/android-mode-20140716.2347/android-mode ~/emacs-lisp/dictionary-el/dictionary hides /home/blakestone/.emacs.d/elpa/dictionary-20201001.1727/dictionary ~/emacs-lisp/dictionary-el/dictionary-pkg hides /home/blakestone/.emacs.d/elpa/dictionary-20201001.1727/dictionary-pkg ~/emacs-lisp/dictionary-el/connection hides /home/blakestone/.emacs.d/elpa/connection-20191111.446/connection ~/emacs-lisp/dictionary-el/link hides /home/blakestone/.emacs.d/elpa/link-20191111.446/link ~/.emacs.d/lisp/greek hides /usr/local/share/emacs/27.2/lisp/language/greek ~/.emacs.d/lisp/longlines hides /usr/local/share/emacs/27.2/lisp/obsolete/longlines Features: (shadow sort mail-extr emacsbug sendmail debug ibuf-ext ibuffer ibuffer-loaddefs loadhist edebug backtrace jka-compr eieio-opt speedbar sb-image ezimage dframe make-mode c-eldoc cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs magit-extras bug-reference magit-svn face-remap calc-undo calc-alg calc-ext calc-menu calc calc-loaddefs calc-macs apropos cus-edit wid-edit pcmpl-gnu vc-git reveal magit-submodule magit-obsolete magit-blame magit-stash magit-reflog magit-bisect magit-push magit-pull magit-fetch magit-clone magit-remote magit-commit magit-sequence magit-notes magit-worktree magit-tag magit-merge magit-branch magit-reset magit-files magit-refs magit-status magit magit-repos magit-apply magit-wip magit-log which-func magit-diff smerge-mode diff diff-mode git-commit log-edit easy-mmode message rmc puny rfc822 mml mml-sec epa epg epg-config gnus-util rmail rmail-loaddefs text-property-search mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils mailheader pcvs-util add-log magit-core magit-autorevert autorevert filenotify magit-margin magit-transient magit-process magit-mode transient magit-git magit-section magit-utils crm dash sh-script smie pcmpl-unix mule-util diary-lib diary-loaddefs cal-menu calendar cal-loaddefs with-editor tramp-cache tramp-sh tabify imenu man pp cl-print mode-local find-func help-fns radix-tree iso-transl executable grep rst dired dired-loaddefs misearch multi-isearch edmacro kmacro paren cua-base cus-start cus-load acme-search quack thingatpt compile cmuscheme scheme advice tramp tramp-loaddefs trampver tramp-integration files-x tramp-compat shell pcomplete comint ring parse-time iso8601 time-date ls-lisp format-spec ansi-color c-xref rx session vanc-init bindat vanc-mode hexl ecf-mode derived cl-extra help-mode dcm-general server cl android-mode-autoloads go-eldoc-autoloads go-mode-autoloads sml-mode-autoloads svg-clock-autoloads info package easymenu browse-url url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json subr-x map url-vars seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 407981 70581) (symbols 48 39873 4) (strings 32 146293 9854) (string-bytes 1 4078275) (vectors 16 49007) (vector-slots 8 1677838 74592) (floats 8 138 289) (intervals 56 43227 1568) (buffers 1000 57) (heap 1024 50828 7177)) --000000000000eeccf205d7afa805 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Create a remote shell-mode buffer with C-u M-x shell, = using bash as the
remote shell. pushd into another directory, then popd<= br>back. default-directory and shell-dirstack still have the other
direc= tory even though the popd took effect in the remote process.

The pro= blem seems to be that shell-prefixed-directory-name returns a
string lik= e "/ssh:dan@solstice:/ssh:dan@solstice:/home/dan/Documents/",
= doubling the remote prefix.

Local shell-mode buffers do not have the= problem.


In GNU Emacs 27.2 (build 1, x86_64-pc-linux-gnu, GTK+ = Version 3.18.9)
=C2=A0of 2021-03-25 built on october
Windowing system= distributor 'The X.Org Foundation', version 11.0.12014000
Syste= m Description: Slackware 15.0 x86_64

Recent messages:
Checking 11= 3 files in /usr/local/share/emacs/27.2/lisp/obsolete...
Checking for loa= d-path shadows...done
You can run the command =E2=80=98report-emacs-bug= =E2=80=99 with M-x r-em RET
Checking for load-path shadows...done
Aut= o-saving...
Mark saved where search started
Making completion list...=
nil
~/Documents ~/Documents
Making completion list...
("= /ssh:dan@solstice:/home/dan/Documents/")
Configured features:
XP= M JPEG TIFF GIF PNG RSVG SOUND GPM DBUS GSETTINGS GLIB NOTIFY INOTIFY
AC= L GNUTLS LIBXML2 FREETYPE HARFBUZZ XFT ZLIB TOOLKIT_SCROLL_BARS GTK3
X11= XDBE XIM MODULES THREADS PDUMPER LCMS2 GMP

Important settings:
= =C2=A0 value of $LC_COLLATE: C
=C2=A0 value of $LANG: en_US.UTF-8
=C2= =A0 locale-coding-system: utf-8-unix

Major mode: Shell

Minor = modes in effect:
=C2=A0 global-git-commit-mode: t
=C2=A0 magit-auto-r= evert-mode: t
=C2=A0 shell-dirtrack-mode: t
=C2=A0 hexl-follow-ascii:= t
=C2=A0 tooltip-mode: t
=C2=A0 global-eldoc-mode: t
=C2=A0 elect= ric-indent-mode: t
=C2=A0 mouse-wheel-mode: t
=C2=A0 tab-bar-mode: t<= br>=C2=A0 file-name-shadow-mode: t
=C2=A0 global-font-lock-mode: t
= =C2=A0 font-lock-mode: t
=C2=A0 auto-composition-mode: t
=C2=A0 auto-= encryption-mode: t
=C2=A0 auto-compression-mode: t
=C2=A0 line-number= -mode: t
=C2=A0 transient-mark-mode: t

Load-path shadows:
~/em= acs-lisp/dictionary-el/link hides ~/.emacs.d/lisp/link
~/emacs-lisp/dict= ionary-el/connection hides ~/.emacs.d/lisp/connection
~/.emacs.d/lisp/an= droid-mode hides /home/blakestone/.emacs.d/elpa/android-mode-20140716.2347/= android-mode
~/emacs-lisp/dictionary-el/dictionary hides /home/blakeston= e/.emacs.d/elpa/dictionary-20201001.1727/dictionary
~/emacs-lisp/diction= ary-el/dictionary-pkg hides /home/blakestone/.emacs.d/elpa/dictionary-20201= 001.1727/dictionary-pkg
~/emacs-lisp/dictionary-el/connection hides /hom= e/blakestone/.emacs.d/elpa/connection-20191111.446/connection
~/emacs-li= sp/dictionary-el/link hides /home/blakestone/.emacs.d/elpa/link-20191111.44= 6/link
~/.emacs.d/lisp/greek hides /usr/local/share/emacs/27.2/lisp/lang= uage/greek
~/.emacs.d/lisp/longlines hides /usr/local/share/emacs/27.2/l= isp/obsolete/longlines

Features:
(shadow sort mail-extr emacsbug = sendmail debug ibuf-ext ibuffer
ibuffer-loaddefs loadhist edebug backtra= ce jka-compr eieio-opt speedbar
sb-image ezimage dframe make-mode c-eldo= c cc-mode cc-fonts cc-guess
cc-menus cc-cmds cc-styles cc-align cc-engin= e cc-vars cc-defs
magit-extras bug-reference magit-svn face-remap calc-u= ndo calc-alg
calc-ext calc-menu calc calc-loaddefs calc-macs apropos cus= -edit
wid-edit pcmpl-gnu vc-git reveal magit-submodule magit-obsoletemagit-blame magit-stash magit-reflog magit-bisect magit-push magit-pullmagit-fetch magit-clone magit-remote magit-commit magit-sequence
magit-= notes magit-worktree magit-tag magit-merge magit-branch
magit-reset magi= t-files magit-refs magit-status magit magit-repos
magit-apply magit-wip = magit-log which-func magit-diff smerge-mode diff
diff-mode git-commit lo= g-edit easy-mmode message rmc puny rfc822 mml
mml-sec epa epg epg-config= gnus-util rmail rmail-loaddefs
text-property-search mm-decode mm-bodies= mm-encode mail-parse rfc2231
rfc2047 rfc2045 mm-util ietf-drums mail-pr= svr mailabbrev mail-utils
gmm-utils mailheader pcvs-util add-log magit-c= ore magit-autorevert
autorevert filenotify magit-margin magit-transient = magit-process
magit-mode transient magit-git magit-section magit-utils c= rm dash
sh-script smie pcmpl-unix mule-util diary-lib diary-loaddefs cal= -menu
calendar cal-loaddefs with-editor tramp-cache tramp-sh tabify imen= u man
pp cl-print mode-local find-func help-fns radix-tree iso-translexecutable grep rst dired dired-loaddefs misearch multi-isearch edmacrokmacro paren cua-base cus-start cus-load acme-search quack thingatpt
co= mpile cmuscheme scheme advice tramp tramp-loaddefs trampver
tramp-integr= ation files-x tramp-compat shell pcomplete comint ring
parse-time iso860= 1 time-date ls-lisp format-spec ansi-color c-xref rx
session vanc-init b= indat vanc-mode hexl ecf-mode derived cl-extra
help-mode dcm-general ser= ver cl android-mode-autoloads
go-eldoc-autoloads go-mode-autoloads sml-m= ode-autoloads
svg-clock-autoloads info package easymenu browse-url url-h= andlers
url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-load= defs
password-cache json subr-x map url-vars seq byte-opt gv bytecompbyte-compile cconv cl-loaddefs cl-lib tooltip eldoc electric uniquify
e= diff-hook vc-hooks lisp-float-type mwheel term/x-win x-win
term/common-w= in x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list rep= lace newcomment text-mode elisp-mode lisp-mode
prog-mode register page t= ab-bar menu-bar rfn-eshadow isearch timer
select scroll-bar mouse jit-lo= ck font-lock syntax facemenu font-core
term/tty-colors frame minibuffer = cl-generic cham georgian utf-8-lang
misc-lang vietnamese tibetan thai ta= i-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak= czech european ethiopic indian
cyrillic chinese composite charscript ch= arprop case-table epa-hook
jka-cmpr-hook help simple abbrev obarray cl-p= reloaded nadvice loaddefs
button faces cus-face macroexp files text-prop= erties overlay sha1 md5
base64 format env code-pages mule custom widget = hashtable-print-readable
backquote threads dbusbind inotify lcms2 dynami= c-setting
system-font-setting font-render-setting move-toolbar gtk x-too= lkit x
multi-tty make-network-process emacs)

Memory information:<= br>((conses 16 407981 70581)
=C2=A0(symbols 48 39873 4)
=C2=A0(string= s 32 146293 9854)
=C2=A0(string-bytes 1 4078275)
=C2=A0(vectors 16 49= 007)
=C2=A0(vector-slots 8 1677838 74592)
=C2=A0(floats 8 138 289)=C2=A0(intervals 56 43227 1568)
=C2=A0(buffers 1000 57)
=C2=A0(heap = 1024 50828 7177))
--000000000000eeccf205d7afa805-- From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 15 08:39:46 2022 Received: (at 53927) by debbugs.gnu.org; 15 Feb 2022 13:39:46 +0000 Received: from localhost ([127.0.0.1]:43837 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nJy3W-000425-Fn for submit@debbugs.gnu.org; Tue, 15 Feb 2022 08:39:46 -0500 Received: from mout.gmx.net ([212.227.17.22]:60855) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nJy3U-00041p-Vd for 53927@debbugs.gnu.org; Tue, 15 Feb 2022 08:39:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1644932378; bh=fls4l37U10EZ/Du0ZYkBmXG9dL12YYiUI1x7BI9rNvI=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=ZaFuTQ+qg8Uplc2fn5dSwG28IhHjLoWa6hYPi15xDOkYF6tVWMN9LD+Fp3bS+dWop /xzNpOcXgK+KPscwE/eSr4mF4VATeNCx7kgMDs/DW9XoyOYZdpjH47Ak7ykHNHb/gn xuaL1YvAsxNEcR30FVg+gSJs537r5+2g+Uf88YlI= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from gandalf.gmx.de ([213.220.158.128]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MtOKc-1o92Gq0Epy-00ush0; Tue, 15 Feb 2022 14:39:38 +0100 From: Michael Albinus To: Dan McCarthy Subject: Re: bug#53927: 27.2; shell-mode dir tracking falls out of sync after popd in remote buffers References: Date: Tue, 15 Feb 2022 14:39:37 +0100 In-Reply-To: (Dan McCarthy's message of "Thu, 10 Feb 2022 15:18:46 -0500") Message-ID: <87y22cw8o6.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Provags-ID: V03:K1:Nt7rOhjLERPB/bHaOEURa0zHSB9BYox0DCvdGVTsJ5xemJvoRB3 tVk6oLFHkGYdDPP8LYhvgVt4AH8J/YvflHo7L1Wp2IEdHXDcqFsabSCvpQmC7AgsfUDSztl aayM647KeIpuAUgUpePeqwu2AA3M2Py/X/zh48uSGDwxLOOydCXURYYFUV8wvkTUhuoKZgo o8/o9bNHlYQT3SG+SZcag== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:bwTXMHWnKDg=:p3eS/onUZUy0QqPUrpnJfu bqiIr730hcXc0FhwfYxoKAatlydImJ2T2JxKqNv2h5/GrogyVdD3Sa3oaf53YsjAz0RJDxW5T Cb8LuunSYlsydtInwvgz6BM3/7IkXx/+cXxj5ytCjX9wfFRnTHm+Gsbn3D+IcAQrBFAd3iUnN Noh08tyO/yW4qvGvluC51B8jgxls55WEUsEhhChp9/fiUNTtbGFYCiSkuZNmbVmhC8svO3UHB oZGAwXIF0krIcyOg5n5xbGfLRpmHhYa7Kg0IZ6+jElHyKy98GoD4WrwiUwpbkDD5jumPUlPyI vRW0INNy+ka9k51YK0cBetfBTSM7d3+v5F/3ElD94+A+mplf6C8r4W55AjDB1BcEIv/SNJDWm qi7JbfcyKiz0nRydbcYqDvknpJqH+1TZ/i4HCAk6JB44Kz1Yx7mGIZdyB0wNCu0VmWob62foI t0IUTEZiJAYMEeuBxVRB7eEewvSUXtsGJDsaf5WeA2iScBrWnE2+rqJ1aVLl8EG7z6QnSbpSN r7fsBxr2loExiv+9hCsdCxVvFipXVFxEDmqr982zCIgfxf6gYWu3UF6z/34NLF8CoJBriOkWq bVs3asaSlzEM7lxA/dRAEgBh1k/g7n+BDGq29BtT8/RNL81IGeO/lkhnXjaSuQdNUW+Xv+e+7 kR1plTHI4j8SXJSb7Vteta9I91RXA35YMqJyvFm+m1u/1klAoq98HDY1i0vdHS0YrvPE/qY8y jtfWbYqZmYkUpniQb3/8iCIfMWTK+VfnjSJkNQu6f5s3ythvUIkSBpa4AsDG+Ihg/koXZDXfn U796OlKVPQFlSl/koP7/hw0IgT4PGJ5s/dNHRDlVwl0gh4yxfQ4qmUmon8EIyUJgFzXtZsZfy 0mDz3I+clryLEljVlkCllgBfGXaclPhSY4icGFVUcPpoaZ9iCWcbG5BWHWa58nFkJSKzoxS08 NMKpWidQCE+7JZH4BlCmI/Gv0IuDwb2SKerHhE1Xdgpb/pxhe8ub/vLl/rgf9bNrYlxk5/L4I 9t0Zwa7CB+jZTrY+eRLDlV9FjlWfsDB1biY5kUO7OAk0QlVdkTkYaRVdnAQRtI3CnVBDc5mUk MkRIIW85nswCH8= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 53927 Cc: 53927@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-=-= Content-Type: text/plain 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. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment Content-Transfer-Encoding: quoted-printable diff --git a/lisp/shell.el b/lisp/shell.el index c0a82bca18..6198214abe 100644 =2D-- a/lisp/shell.el +++ b/lisp/shell.el @@ -942,7 +942,7 @@ shell-prefixed-directory-name dir (if (file-name-absolute-p dir) ;; The name is absolute, so prepend the prefix. - (concat comint-file-name-prefix dir) + (concat comint-file-name-prefix (file-local-name dir)) ;; For relative name we assume default-directory already has the pr= efix. (expand-file-name dir)))) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 15 10:30:02 2022 Received: (at 53927) by debbugs.gnu.org; 15 Feb 2022 15:30:03 +0000 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 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 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) MIME-Version: 1.0 References: <87y22cw8o6.fsf@gmx.de> In-Reply-To: <87y22cw8o6.fsf@gmx.de> From: Dan McCarthy Date: Tue, 15 Feb 2022 10:29:43 -0500 Message-ID: Subject: Re: bug#53927: 27.2; shell-mode dir tracking falls out of sync after popd in remote buffers To: Michael Albinus Content-Type: multipart/alternative; boundary="00000000000069a53905d810344b" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 53927 Cc: 53927@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --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-- From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 15 11:41:52 2022 Received: (at 53927) by debbugs.gnu.org; 15 Feb 2022 16:41:52 +0000 Received: from localhost ([127.0.0.1]:46294 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nK0tk-0005uY-Ed for submit@debbugs.gnu.org; Tue, 15 Feb 2022 11:41:52 -0500 Received: from eggs.gnu.org ([209.51.188.92]:49122) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nK0ti-0005uI-0a for 53927@debbugs.gnu.org; Tue, 15 Feb 2022 11:41:50 -0500 Received: from [2001:470:142:3::e] (port=60766 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nK0tc-0004Cc-Mc; Tue, 15 Feb 2022 11:41:44 -0500 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=gpmRFMlPL/r96REe3fvKd5SfVtqlskfkK17Ibz3wvkA=; b=CZ1crCNm5izn bKDBdqyy9VebLyYIUtMG8bX5oANN5Lmi38ro0NmwVecqS8jAIJpaguLcEGraosRrbmJojzu+5Sjwm AtxGIChPj8f+Ax/TQwYAAwCw1knse0mW41b9hk+378gkyaypZ/i8Dm42x0SMG0sxLn13jbzvRA9zK O68ntNf8HiaZgiEBl0Fr0degHZmF+2a1Am9wQgsUsOctenx1oKGHz/0o7xEiLpTU1s2liBvW9UiYo wcFXdtQSXnzGh997osYc8n9pZ2t/3Np/vMeXYrrVGUAD2izL5SwdXONr4Npw6L6GcGJ9GrOnHoef0 vzzFHmdnZ3N4x20tBHDXdw==; Received: from [87.69.77.57] (port=2293 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nK0tc-0000Bz-7G; Tue, 15 Feb 2022 11:41:44 -0500 Date: Tue, 15 Feb 2022 18:41:46 +0200 Message-Id: <83v8xg2ib9.fsf@gnu.org> From: Eli Zaretskii To: Michael Albinus In-Reply-To: <87y22cw8o6.fsf@gmx.de> (message from Michael Albinus on Tue, 15 Feb 2022 14:39:37 +0100) Subject: Re: bug#53927: 27.2; shell-mode dir tracking falls out of sync after popd in remote buffers References: <87y22cw8o6.fsf@gmx.de> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 53927 Cc: daniel.c.mccarthy@gmail.com, 53927@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Michael Albinus > Date: Tue, 15 Feb 2022 14:39:37 +0100 > Cc: 53927@debbugs.gnu.org > > Eli, it is a very simple patch. Any chance to commit it to the emacs-28 > branch? Yes, please. From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 15 12:19:17 2022 Received: (at 53927-done) by debbugs.gnu.org; 15 Feb 2022 17:19:17 +0000 Received: from localhost ([127.0.0.1]:46336 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nK1Tx-0006yO-Jf for submit@debbugs.gnu.org; Tue, 15 Feb 2022 12:19:17 -0500 Received: from mout.gmx.net ([212.227.17.20]:51911) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nK1Tu-0006y7-TZ for 53927-done@debbugs.gnu.org; Tue, 15 Feb 2022 12:19:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1644945548; bh=AI/jETNkyQBzlyI39JlROUnt8S0e6g1kLQqk1KXgnGI=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=Oe+cHLCalcswxqZudHZ6e3Uf3be96OENyYcKhch0YKWxm+1gWNmowNYuybGpBy1Fc SOly3zV8xQs7X0sLl4Ir+sFb2wmAE7OtXC1lmt7ffX52XQf3nENxBEEBac9OVGukjb TUZM5Dgm7mTAzHsXnqNrX0UDbUhfQWYSqw3/FYdw= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from gandalf.gmx.de ([213.220.158.128]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MLR1f-1najPz0K83-00IUSH; Tue, 15 Feb 2022 18:19:08 +0100 From: Michael Albinus To: Eli Zaretskii Subject: Re: bug#53927: 27.2; shell-mode dir tracking falls out of sync after popd in remote buffers References: <87y22cw8o6.fsf@gmx.de> <83v8xg2ib9.fsf@gnu.org> Date: Tue, 15 Feb 2022 18:19:06 +0100 In-Reply-To: <83v8xg2ib9.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 15 Feb 2022 18:41:46 +0200") Message-ID: <87r184vyid.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:2TQ2GWzwtstfM5Nm6aiS8Dw1QxPMjqkKbO8+l7oG63M8ItdQZLO LOlbaVg1CQ8gg70s72i43Mzsna1HyJF0zyvMVrDUGvKeR2aCoYnbzazLTs7B+S6FGSVooZl gV+X56rn2EpO87szXrRpCS3PIb8/RViYl+reY47rK/ZES8UAt93OCAVQs6MNGRUjN09TxJ2 F3pcVBQpr/m646rDd8kFA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:0C7f0mhIHis=:gIdxF7vD1aSClBiFsis23F CWNvimFzFfM8277r/Nrj8SBGzmolDN8z8dl1ilk7YNCXgw3Ky8krZ9NlxKWSAVE3rXM2c1Tsx TfnOpj9ThJFBsz+5O6Zbw0fWSe/tP54M17bKHa3xtvQRVSe3Q/sMrX9BDIZ64OBy1CNhAz28e 90mW1KmC0MmJCc8fxXMeONiPxmy5p3+lV2sYluEmKd2M9BxboTiNOHigqv4QBVlapst0R0n7D HgzoE2NJ9suN73NwdRCzj55JSWPffYlbxRERvD9mjbCtbPPe99IslG50KJuVHz6UPiFBo84RM x4AR6Je4yVBnBk9R39tbTp1rvzFHHNLaDRXEcTq4InoHWTCAtubFveGhEUbNv1kyGpHOfNSXr sImoKlQCcpBQRL+U5lxd1G06Ug2CBEbpKmRAnNbdVXm/wRTJxgKSF2tOO2Arefn4+VQf49VSa wHteF7+FsVdhQnvHWYAbh+uty+W95oiMLc0f2JAToL4v+NlQYm51DxiWx7qKaVfeKmi1E+Wvx SBqWVuktggpraxPgxm5T5fsbsCwpgbetnORTn2Mw5DFR07Bb1zk+qTkNTinl6F8XI0K6YyVj/ 25B9eQoJ2god4aQHtLZW3imgJXUch9f9fqx6PYk39uYsLEGW+p3sBbL4lbLOCUAG6x3vhkx25 XJHJulGJph8ZKmhy8eSYlxzqSUZwt4KmHJTfZ6KRIr4NMBPoi01Sp3BWVgYfScrCQBxAvqkwL PprGeuyXwhm9xNxf1fgO8tEZtSAoAauFBsbK9TPuBZkij1VdYxUcXpNxdUH2RVRg+/NzLKCfY EAs5mMnprw/Ji80/gPzQpVvfI6sb5pAO2C1/Tve6q6ut1lay8vbfpa8OClxL7VeywgohiE67t mUO2gG6jhl/FWaySo6UyD3GrbLPRme9pWcZQuw/n3OBGs2vYe88O/QVPGzzQj7ZTyCwQ+0kZq CLZwodV116qc7oBIFtollLvhIEl8sSt1GkmcP0RN3NbDu55LeaFMFnQ3tkjFIr53IZpDl/qRK 6U8+v5rLRGHWIoh1um/v0fszFuBuvxxO6OSJqa1RH0m4MhdLIcI0FsDGsZNI9wpyvIu2/2OHo vLdk7hJ+r3UQ9k= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 53927-done Cc: daniel.c.mccarthy@gmail.com, 53927-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Version: 28.1 Eli Zaretskii writes: >> Eli, it is a very simple patch. Any chance to commit it to the emacs-28 >> branch? > > Yes, please. Done, closing the bug. From unknown Sun Jun 15 08:03:03 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 16 Mar 2022 11:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator