GNU bug report logs -
#61954
30.0.50; [PATCH] Simplify structured commands in Eshell
Previous Next
Reported by: Jim Porter <jporterbugs <at> gmail.com>
Date: Sat, 4 Mar 2023 07:29:02 UTC
Severity: normal
Tags: patch
Found in version 30.0.50
Done: Jim Porter <jporterbugs <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your bug report
#61954: 30.0.50; [PATCH] Simplify structured commands in Eshell
which was filed against the emacs package, has been closed.
The explanation is attached below, along with your original report.
If you require more details, please reply to 61954 <at> debbugs.gnu.org.
--
61954: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=61954
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
On 3/3/2023 11:28 PM, Jim Porter wrote:
> Structured commands are just Eshell flow control commands, like 'if' and
> 'while'. These expected you to set 'eshell-test-body' and
> 'eshell-command-body' when implementing them, and were very hard to get
> right (see bug#12571 for example).
>
> Instead, let's improve Eshell's iterative command evaluation some more
> so that you can write the implementations for these commands like
> normal.
Since there haven't been any concerns about the patches themselves in
the last two weeks-ish, merging this now as 1565dbcae3 and closing the bug.
[Message part 3 (message/rfc822, inline)]
[Message part 4 (text/plain, inline)]
Structured commands are just Eshell flow control commands, like 'if' and
'while'. These expected you to set 'eshell-test-body' and
'eshell-command-body' when implementing them, and were very hard to get
right (see bug#12571 for example).
Instead, let's improve Eshell's iterative command evaluation some more
so that you can write the implementations for these commands like
normal. I think this is beneficial for two main reasons: a) it should
get us closer to replacing Eshell's iterative evaluation with the CPS
machinery in generator.el (bug#37635)[1], and b) third-parties should
have an easier time writing their own fancy Eshell commands using the
command-rewriting hooks.
Given that we have fairly thorough regression tests in Eshell now, I'm
pretty confident that these patches don't break anything.
[1] I think I mentioned it elsewhere, but I'm hoping to make sure that
when we do switch to the CPS machinery (or maybe to threads), it's just
a drop-in replacement. That way, if there are problems, it should be
easy to revert to the classic iterative evaluation code. Maybe we could
even provide a defcustom for it just in case.
[0001-Simplify-iteration-in-Eshell-for-loops.patch (text/plain, attachment)]
[0002-Simplify-how-Eshell-s-iterative-evaluation-handles-i.patch (text/plain, attachment)]
[0003-Simplify-usage-of-while-forms-in-Eshell-s-iterative-.patch (text/plain, attachment)]
This bug report was last modified 2 years and 70 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.