From: Eli Zaretskii <eliz@gnu.org>
To: Jim Porter <jporterbugs@gmail.com>
Cc: christopher@librehacker.com, 73722@debbugs.gnu.org
Subject: bug#73722: 30.0.91; error calling eshell/clear with no argument
Date: Tue, 15 Oct 2024 21:04:55 +0300 [thread overview]
Message-ID: <86msj5qm2g.fsf@gnu.org> (raw)
In-Reply-To: <2126f0f9-388e-5717-b0af-b7e3ec90e7d9@gmail.com> (message from Jim Porter on Tue, 15 Oct 2024 10:00:40 -0700)
> Date: Tue, 15 Oct 2024 10:00:40 -0700
> From: Jim Porter <jporterbugs@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.
next prev parent reply other threads:[~2024-10-15 18:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-09 17:33 bug#73722: 30.0.91; error calling eshell/clear with no argument Christopher Howard
2024-10-15 17:00 ` Jim Porter
2024-10-15 18:04 ` Eli Zaretskii [this message]
2024-10-15 21:31 ` Jim Porter
2024-10-16 5:17 ` Eli Zaretskii
2024-10-16 18:04 ` Jim Porter
2024-10-17 4:47 ` Jim Porter
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=86msj5qm2g.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=73722@debbugs.gnu.org \
--cc=christopher@librehacker.com \
--cc=jporterbugs@gmail.com \
/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).