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
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (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.