[Top][All Lists]

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

Re: async.el: A simple asynchronous framework for Emacs

From: John Wiegley
Subject: Re: async.el: A simple asynchronous framework for Emacs
Date: Tue, 19 Jun 2012 15:44:28 -0500
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.1 (darwin)

>>>>> Stefan Monnier <address@hidden> writes:

>> This will execute the lambda (which must *not* be byte-compiled -- in other
>> words, don't use `function' or #') in a child Emacs asynchronously.

> Can you explain why it can't be byte-compiled?

Because it becomes an un-`read'-able value if prin1'd.

> Also, I'd guess that your package could be improved if Emacs provided
> a `fork' primitive, right?

You bet.  However, I would almost never want to fork the whole environment.  I
would want the child to end up with nil values for:


And perhaps even a few others, if there are post-command-hooks that might
persist data, for example.  Plus, it would make no sense to fork over the
windows and frames, as the child would be headless; nor the process list.  And
what about unmodified buffers, and file locks being held by the parent?

It would probably be better if `fork' took a conservative approach, requiring
me to supply a predicate to match the variables and buffers I wanted to end up
in the child.


reply via email to

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