GNU bug report logs - #59804
shell-resync-dirs hangs in (t)csh

Previous Next

Package: emacs;

Reported by: Nicolas Graner <nicolas <at> graner.name>

Date: Sat, 3 Dec 2022 11:38:02 UTC

Severity: normal

Full log


View this message in rfc822 format

From: Nicolas Graner <nicolas <at> graner.name>
To: 59804 <at> debbugs.gnu.org
Subject: bug#59804: shell-resync-dirs hangs in (t)csh
Date: Sat, 03 Dec 2022 12:37:11 +0100
In a shell buffer where the running shell is csh or tcsh, the command
shell-resync-dirs never returns.

You can test this even without changing your normal shell by typing
`csh' in any shell buffer, then M-<RET>
Emacs hangs until you quit with C-g.

The reason is that the `dirs' command in (t)csh (unlike its equivalent
in bash) adds a trailing space to its output. This triggers an infinite
loop.

As evidence that the trailing space is the culprit, note that this
kludge, whiche removes it, fixes the problem:

(setq shell-dirstack-query "dirs | sed 's/ $//'")

-- Nicolas




This bug report was last modified 2 years and 190 days ago.

Previous Next


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