emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: continuation passing in Emacs vs. JUST-THIS-ONE


From: Tomas Hlavaty
Subject: Re: continuation passing in Emacs vs. JUST-THIS-ONE
Date: Sat, 25 Mar 2023 22:05:41 +0100

On Sat 11 Mar 2023 at 14:53, Thomas Koch <thomas@koch.ro> wrote:
> TL;DR: (Why) is there no standard way for continuation passing
> style[1] ("event driven") programming in Emacs?

Asynchronous processes take callbacks as arguments.

> [1] https://debbugs.gnu.org/61350
> [2] https://debbugs.gnu.org/12145

The problem seems to be that an event was missed and emacs gets stuck
waiting in a loop.  It is essential in event driven edge trigered push
model not to miss events.

Moreover, it is a bad idea to loop or wait in filter callback.

> Because there is no such library in Emacs, people either write their
> own code for continuations (eglot?) or do too much work in a process
> filter function (speechd-el in 2004 which led to JUST-THIS-ONE).

Yeah, it looks like people tend to do too much stuff in filter
callbacks.  It is better to keep those simple and do any complex work
outside the callback.  The code could be written not to do too much work
in a process filter function even without such library.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]