Subject: bug#55978: 29.0.50; shell-resync-dirs inf-loops if tty outputs CRNL

From: <[email-masked]>
Date: Tue, 14 Jun 2022 21:20:15 +0200

Eli Zaretskii <[email-masked]> writes:

>> Date: Tue, 14 Jun 2022 20:01:30 +0200
>> From: miha--- via "Bug reports for GNU Emacs,
>>  the Swiss army knife of text editors" <[email-masked]>
>> 
>> In M-x shell, execute "stty -nl" to make the tty translate \n into \r\n
>> on output, and press "M-RET" (shell-resync-dir).
>
> I guess this requires to set coding-system for reading the shell
> output to -dos?

That could be an option, though I was thinking of a bit less invasive
and more local fix by performing a simple replace-regexp at the end of
the function `shell-eval-command'.