unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Jim Porter <jporterbugs@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 57635@debbugs.gnu.org
Subject: bug#57635: 29.0.50; Look into using generator.el's CPS machinery to replace 'eshell-do-eval'
Date: Thu, 15 Dec 2022 17:10:35 -0800	[thread overview]
Message-ID: <b20b1a6e-2c66-5511-6c7c-13f7dd65916c@gmail.com> (raw)
In-Reply-To: <jwv8rmvnym0.fsf-monnier+emacs@gnu.org>

On 9/7/2022 5:45 AM, Stefan Monnier via Bug reports for GNU Emacs, the 
Swiss army knife of text editors wrote:
>> In order to make long-running Eshell commands behave more-nicely, Eshell
>> uses iterative evaluation of many commands so that it can return control
>> back to the rest of Emacs. This has a lot of similarity to how
>> generator.el works.
> 
> Indeed, the idea would be to replace the commands that launch processes
> with "yields" to an external loop (that just launches the next process
> and then calls the generator again).

Maybe an even better solution would be to use Emacs threads. This should 
do everything that Eshell needs, plus hopefully add the ability to add 
some basic job control as well. (Well, one day...)

I hacked something up that seems to work for simple cases, and it 
shouldn't be *too* hard to get it working more generally. This will be a 
big change for Eshell, so it might make sense to create a feature branch 
when I have a little more to show. However, I can already see how this 
will eliminate the need for a number of workarounds in Eshell's command 
invocation logic.





      parent reply	other threads:[~2022-12-16  1:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-07  3:58 bug#57635: 29.0.50; Look into using generator.el's CPS machinery to replace 'eshell-do-eval' Jim Porter
2022-09-07 12:45 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-09-12  1:01   ` Jim Porter
2022-12-16  1:10   ` Jim Porter [this message]

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=b20b1a6e-2c66-5511-6c7c-13f7dd65916c@gmail.com \
    --to=jporterbugs@gmail.com \
    --cc=57635@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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).