GNU bug report logs -
#73722
30.0.91; error calling eshell/clear with no argument
Previous Next
Full log
View this message in rfc822 format
> Date: Tue, 15 Oct 2024 10:00:40 -0700
> From: Jim Porter <jporterbugs <at> gmail.com>
>
> 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.)
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.
This bug report was last modified 257 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.