GNU bug report logs - #53927
27.2; shell-mode dir tracking falls out of sync after popd in remote buffers

Previous Next

Package: emacs;

Reported by: Dan McCarthy <daniel.c.mccarthy <at> gmail.com>

Date: Thu, 10 Feb 2022 20:38:01 UTC

Severity: normal

Found in version 27.2

Fixed in version 28.1

Done: Michael Albinus <michael.albinus <at> gmx.de>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 53927 in the body.
You can then email your comments to 53927 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#53927; Package emacs. (Thu, 10 Feb 2022 20:38:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Dan McCarthy <daniel.c.mccarthy <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 10 Feb 2022 20:38:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Dan McCarthy <daniel.c.mccarthy <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 27.2; shell-mode dir tracking falls out of sync after popd in remote
 buffers
Date: Thu, 10 Feb 2022 15:18:46 -0500
[Message part 1 (text/plain, inline)]
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 <at> solstice:/ssh:dan <at> 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 ‘report-emacs-bug’ with M-x r-em RET
Checking for load-path shadows...done
Auto-saving...
Mark saved where search started
Making completion list...
nil
~/Documents ~/Documents
Making completion list...
("/ssh:dan <at> 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))
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53927; Package emacs. (Tue, 15 Feb 2022 13:40:02 GMT) Full text and rfc822 format available.

Message #8 received at 53927 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Dan McCarthy <daniel.c.mccarthy <at> gmail.com>
Cc: 53927 <at> debbugs.gnu.org
Subject: Re: bug#53927: 27.2; shell-mode dir tracking falls out of sync
 after popd in remote buffers
Date: Tue, 15 Feb 2022 14:39:37 +0100
[Message part 1 (text/plain, inline)]
Dan McCarthy <daniel.c.mccarthy <at> 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 <at> solstice:/ssh:dan <at> 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.

[Message part 2 (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53927; Package emacs. (Tue, 15 Feb 2022 15:31:02 GMT) Full text and rfc822 format available.

Message #11 received at 53927 <at> debbugs.gnu.org (full text, mbox):

From: Dan McCarthy <daniel.c.mccarthy <at> gmail.com>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 53927 <at> debbugs.gnu.org
Subject: Re: 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 part 1 (text/plain, inline)]
The patch fixes it for me too. Thanks!

On Tue, Feb 15, 2022 at 8:39 AM Michael Albinus <michael.albinus <at> gmx.de>
wrote:

> Dan McCarthy <daniel.c.mccarthy <at> 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 <at> solstice:/ssh:dan <at> 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.
>
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53927; Package emacs. (Tue, 15 Feb 2022 16:42:02 GMT) Full text and rfc822 format available.

Message #14 received at 53927 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: daniel.c.mccarthy <at> gmail.com, 53927 <at> debbugs.gnu.org
Subject: Re: bug#53927: 27.2;
 shell-mode dir tracking falls out of sync after popd in remote buffers
Date: Tue, 15 Feb 2022 18:41:46 +0200
> From: Michael Albinus <michael.albinus <at> gmx.de>
> Date: Tue, 15 Feb 2022 14:39:37 +0100
> Cc: 53927 <at> debbugs.gnu.org
> 
> Eli, it is a very simple patch. Any chance to commit it to the emacs-28
> branch?

Yes, please.




Reply sent to Michael Albinus <michael.albinus <at> gmx.de>:
You have taken responsibility. (Tue, 15 Feb 2022 17:20:01 GMT) Full text and rfc822 format available.

Notification sent to Dan McCarthy <daniel.c.mccarthy <at> gmail.com>:
bug acknowledged by developer. (Tue, 15 Feb 2022 17:20:02 GMT) Full text and rfc822 format available.

Message #19 received at 53927-done <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: daniel.c.mccarthy <at> gmail.com, 53927-done <at> debbugs.gnu.org
Subject: Re: bug#53927: 27.2; shell-mode dir tracking falls out of sync
 after popd in remote buffers
Date: Tue, 15 Feb 2022 18:19:06 +0100
Version: 28.1

Eli Zaretskii <eliz <at> gnu.org> writes:

>> Eli, it is a very simple patch. Any chance to commit it to the emacs-28
>> branch?
>
> Yes, please.

Done, closing the bug.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 16 Mar 2022 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 90 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.