GNU bug report logs - #73722
30.0.91; error calling eshell/clear with no argument

Previous Next

Package: emacs;

Reported by: Christopher Howard <christopher <at> librehacker.com>

Date: Wed, 9 Oct 2024 17:34:02 UTC

Severity: normal

Found in version 30.0.91

Done: Jim Porter <jporterbugs <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Jim Porter <jporterbugs <at> gmail.com>
To: Christopher Howard <christopher <at> librehacker.com>, 73722 <at> debbugs.gnu.org
Subject: bug#73722: 30.0.91; error calling eshell/clear with no argument
Date: Tue, 15 Oct 2024 10:00:40 -0700
[Message part 1 (text/plain, inline)]
On 10/9/2024 10:33 AM, Christopher Howard wrote:
> 
> (same with or without emacs -Q)
> 1. M-x eshell
> 2. clear <return>
> 
> 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.)
[0001-Fix-error-when-calling-clear-in-Eshell.patch (text/plain, attachment)]

This bug report was last modified 258 days ago.

Previous Next


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