unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Nicolas Graner <nicolas@graner.name>
To: 59804@debbugs.gnu.org
Subject: bug#59804: shell-resync-dirs hangs in (t)csh
Date: Sat, 03 Dec 2022 12:37:11 +0100	[thread overview]
Message-ID: <87r0xghg60.fsf@graner.name> (raw)

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





             reply	other threads:[~2022-12-03 11:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-03 11:37 Nicolas Graner [this message]
2022-12-04  8:17 ` bug#59804: shell-resync-dirs hangs in (t)csh Eli Zaretskii
2022-12-04 18:41   ` Nicolas Graner
2022-12-04 19:15     ` Eli Zaretskii
2022-12-10 12:57       ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r0xghg60.fsf@graner.name \
    --to=nicolas@graner.name \
    --cc=59804@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).