From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#73722: 30.0.91; error calling eshell/clear with no argument Date: Tue, 15 Oct 2024 21:04:55 +0300 Message-ID: <86msj5qm2g.fsf@gnu.org> References: <87v7y1p4fi.fsf@librehacker.com> <2126f0f9-388e-5717-b0af-b7e3ec90e7d9@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3084"; mail-complaints-to="usenet@ciao.gmane.io" Cc: christopher@librehacker.com, 73722@debbugs.gnu.org To: Jim Porter Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Oct 15 20:06:10 2024 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 1t0lvu-0000cJ-44 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 15 Oct 2024 20:06:10 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t0lvh-0007O5-C2; Tue, 15 Oct 2024 14:05:57 -0400 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 1t0lvc-0007NT-TC for bug-gnu-emacs@gnu.org; Tue, 15 Oct 2024 14:05:53 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t0lvT-0001f5-VW for bug-gnu-emacs@gnu.org; Tue, 15 Oct 2024 14:05:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:In-Reply-To:From:Date:To:Subject; bh=+Q1HcjiRiritfVLp/Oz+kEwA/Okc2ACQho9HfW38xbo=; b=lXgR2SgdaHBFNDF851+Y9wx2E3hOJqrSWclPJP18gOQyUAjqO1HufJu+OXxzD3o1Xku7Q5LkkBYzJNR+TixUii9X5tNLyhSnRg2vco+1E0iVtLxqu1sy1LxHTbC6ZSPlZPWq645CFH1zOrUM/ELEoXlcEp5eX2+h0D6WOpnHP36CbbJ/7Cz3ZXP0Lh3skwDgVD/5Y9z2co4ZSFlA/Jcn6ME5CEypQb9HjCMYalTIGoR+9XBUiTAYOjWG5Gor6/aBjcF0N/7GdNSmwItH8O4xIm2wSRr2X0U7w3iPs7DPYCucRZAs/x/QFZ+x5cnceS8qbT36V3vt8p61UDxMmVWMhQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t0lvm-0000j4-BR for bug-gnu-emacs@gnu.org; Tue, 15 Oct 2024 14:06:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 15 Oct 2024 18:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73722 X-GNU-PR-Package: emacs Original-Received: via spool by 73722-submit@debbugs.gnu.org id=B73722.17290155252379 (code B ref 73722); Tue, 15 Oct 2024 18:06:02 +0000 Original-Received: (at 73722) by debbugs.gnu.org; 15 Oct 2024 18:05:25 +0000 Original-Received: from localhost ([127.0.0.1]:57383 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t0lvA-0000cJ-T6 for submit@debbugs.gnu.org; Tue, 15 Oct 2024 14:05:25 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:54458) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t0lv8-0000c4-VS for 73722@debbugs.gnu.org; Tue, 15 Oct 2024 14:05:23 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t0luk-0001GR-OY; Tue, 15 Oct 2024 14:04:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=+Q1HcjiRiritfVLp/Oz+kEwA/Okc2ACQho9HfW38xbo=; b=lgf9VkkS83LV 6CDBBfXUzHi3KqTo8X8TGcgFMS7m5rJIRhS3OVSHdSPI8KfXO+UrN02ERXVZ4vamP6gv431e7Fwl2 LNAB0Ryc17+NG0YagCNXCOBc/YdsgHmQWgggV0Loy6NKObmsXoDGcRvhQ5XYH6Xg/B1S+4+51qv+O 2p6lCbkUB5w+lsAuDv0ZS5MxTmSWN/usRb3YlTIFL3bg6M7FLUG4Z9t63LCsXAxCwhoig2Tfeoil1 W4l+uDjZV1nEi/XuGQECoiwpo1CtoKMC9Uc3ADib8lgEl2x05b6ratovbsmfz3lV/R5sdPSff0dBk RN175TwHFwrqvuAZEyOdHw==; In-Reply-To: <2126f0f9-388e-5717-b0af-b7e3ec90e7d9@gmail.com> (message from Jim Porter on Tue, 15 Oct 2024 10:00:40 -0700) 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:293635 Archived-At: > Date: Tue, 15 Oct 2024 10:00:40 -0700 > From: Jim Porter > > On 10/9/2024 10:33 AM, Christopher Howard wrote: > > > > (same with or without emacs -Q) > > 1. M-x eshell > > 2. clear > > > > Gives error "wrong-type-argument listp progn". > > I think this is probably the result of some improvements I've made to > Eshell's command evaluator that revealed a latent bug in 'eshell/clear' > (it actually runs a *second* Eshell command consisting only of newlines, > which shouldn't be necessary). > > The actual error reported here is fixed in Emacs 31; in Emacs 30, > 'eshell-do-eval' mis-evaluates an empty '(progn)', but that generally > shouldn't occur except in odd cases like this. The "clear" command still > doesn't *work* correctly in Emacs 31 though. > > Attached is the smallest fix I could come up with for this. This is made > somewhat more complex due to 'eshell/clear' also being used as an > interactive Emacs-level command. The two forms ("clear" at an Eshell > prompt and "M-x eshell/clear" in Emacs) should probably be separate > functions entirely since they behave differently regarding the current > prompt, but for the sake of compatibility, let's keep them fused > together for now... > > Eli, does this look ok for the release branch? It fixes a regression > from Emacs 29 and adds a pair of regression tests to prevent future > breakage. (If and when this merges, I'll see about a more-thorough fix > for the master branch too.) If the problem is with empty body of progn, why does the fix have to be so much less self-evident? Can you fix it by protecting against empty body of progn instead, so that the fix is less likely to cause unintended consequences? In any case, please don't forget "Do not merge to master" in the commit log message. Thanks.