From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Nicolas Graner Newsgroups: gmane.emacs.bugs Subject: bug#59804: shell-resync-dirs hangs in (t)csh Date: Sat, 03 Dec 2022 12:37:11 +0100 Message-ID: <87r0xghg60.fsf@graner.name> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26114"; mail-complaints-to="usenet@ciao.gmane.io" To: 59804@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 03 12:38:21 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p1Qqa-0006ei-Sk for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 03 Dec 2022 12:38:20 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p1QqL-00053T-MJ; Sat, 03 Dec 2022 06:38:05 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p1QqI-00050V-O8 for bug-gnu-emacs@gnu.org; Sat, 03 Dec 2022 06:38:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p1QqI-0003hC-GS for bug-gnu-emacs@gnu.org; Sat, 03 Dec 2022 06:38:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p1QqI-0008U7-9V for bug-gnu-emacs@gnu.org; Sat, 03 Dec 2022 06:38:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Nicolas Graner Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 03 Dec 2022 11:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 59804 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.167006744632606 (code B ref -1); Sat, 03 Dec 2022 11:38:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 3 Dec 2022 11:37:26 +0000 Original-Received: from localhost ([127.0.0.1]:51611 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p1Qph-0008Tq-QD for submit@debbugs.gnu.org; Sat, 03 Dec 2022 06:37:26 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:35402) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p1Qpe-0008Tk-9J for submit@debbugs.gnu.org; Sat, 03 Dec 2022 06:37:24 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p1Qpe-0004cg-4A for bug-gnu-emacs@gnu.org; Sat, 03 Dec 2022 06:37:22 -0500 Original-Received: from ouvsmtp1.octopuce.fr ([194.36.166.50]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p1Qpa-0003dv-As for bug-gnu-emacs@gnu.org; Sat, 03 Dec 2022 06:37:21 -0500 Original-Received: from panel.vitry.ouvaton.coop (unknown [194.36.166.20]) by ouvsmtp1.octopuce.fr (Postfix) with ESMTPS id A609115B for ; Sat, 3 Dec 2022 12:37:12 +0100 (CET) Original-Received: from hypra-graner (212.246.204.77.rev.sfr.net [77.204.246.212]) by panel.vitry.ouvaton.coop (Postfix) with ESMTPSA id 40FF55E286B for ; Sat, 3 Dec 2022 12:37:12 +0100 (CET) Received-SPF: pass client-ip=194.36.166.50; envelope-from=nicolas@graner.name; helo=ouvsmtp1.octopuce.fr X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:249829 Archived-At: 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- 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