Subject: 28.1; shell-resync-dirs hangs

From: "Kevin K. Lin" <[email-masked]>
Date: Thu, 07 Apr 2022 13:26:29 -0700

Hi,

Starting with

emacs -Q

I do

M-x shell
M-x dirs

and Emacs hangs.  C-g breaks the loop and puts me back
at the prompt.  FYI, I use /bin/tcsh, but the same
thing happens in other shells I tried (zsh, bash).
I'm on macOS; not sure the problem is Mac-specific.

I found bug #54384 on the bug tracker, which seems to
describe a similar problem in Emacs 29.  Wondering if
it's indeed the same issue, and if so whether the
solution would be backported to 28?

Thanks,
Kevin

In GNU Emacs 28.1 (build 1, x86_64-apple-darwin19.6.0)
 of 2022-04-04 built on iMac-Pro
System Description:  Mac OS X 10.15.7

Configured using:
 'configure --disable-silent-rules
 --enable-locallisppath=/usr/local/share/emacs/site-lisp
 --infodir=/usr/local/Cellar/emacs/28.1/share/info/emacs
 --prefix=/usr/local/Cellar/emacs/28.1 --with-gnutls --without-x
 --with-xml2 --without-dbus --with-modules --without-ns
 --without-imagemagick --without-selinux'

Configured features:
ACL GMP GNUTLS JSON LIBXML2 MODULES NOTIFY KQUEUE PDUMPER THREADS ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  shell-dirtrack-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(help-mode pp shadow sort mail-extr emacsbug message rmc puny dired
dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068 epg-config
gnus-util rmail tool-bar rmail-loaddefs auth-source cl-seq eieio
eieio-core cl-macs eieio-loaddefs password-cache json map
text-property-search time-date subr-x seq mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs cl-lib
sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils shell
pcomplete comint regexp-opt ansi-color ring term/xterm xterm byte-opt gv
bytecomp byte-compile cconv iso-transl tooltip eldoc paren electric
uniquify ediff-hook vc-hooks lisp-float-type elisp-mode tabulated-list
replace newcomment text-mode lisp-mode prog-mode register page tab-bar
menu-bar rfn-eshadow isearch easymenu timer select mouse jit-lock
font-lock syntax 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 emoji-zwj charscript
charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray
cl-preloaded nadvice button loaddefs faces cus-face macroexp files
window text-properties overlay sha1 md5 base64 format env code-pages
mule custom widget hashtable-print-readable backquote threads kqueue
multi-tty make-network-process emacs)

Memory information:
((conses 16 60451 7936)
 (symbols 48 7359 3)
 (strings 32 20473 1785)
 (string-bytes 1 674989)
 (vectors 16 12526)
 (vector-slots 8 145293 8573)
 (floats 8 29 293)
 (intervals 56 220 54)
 (buffers 992 12))