[erlang-questions] erlang for programming a text editor
Mon Nov 2 15:27:52 CET 2009
On Mon, Nov 2, 2009 at 3:20 AM, Alpar Juttner
> An editor like emacs does not need multicore, but it _does_ need
> concurrency, as it could provide much better responsiveness. When emacs
> blocks for a couple of seconds, it is already annoying. When it blocks
> for tens of seconds, it can be a considerable pain.
I use a package called emacs-jabber for doing IM from within emacs.
I've never had it block emacs on me. When I started looking into how it was
doing event handling, I found that it uses something called fsm.el:
which has the following interesting comment near the top of the source code:
;; fsm.el is an exercise in metaprogramming inspired by gen_fsm of
;; Erlang/OTP. It aims to make asynchronous programming in Emacs Lisp
;; easy and fun. By "asynchronous" I mean that long-lasting tasks
;; don't interfer with normal editing.
It's based on gen_fsm -- we've come full circle. :-)
More emacs packages should make use of this to avoid blocking.
More information about the erlang-questions