all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Philipp Stephani <p.stephani2@gmail.com>
Cc: Ivan Andrus <darthandrus@gmail.com>, Eli Zaretskii <eliz@gnu.org>,
	Daniel Colascione <dancol@dancol.org>,
	Emacs developers <emacs-devel@gnu.org>
Subject: Re: Callbacks from modules
Date: Thu, 26 Nov 2015 21:20:58 -0700	[thread overview]
Message-ID: <871tbcyswl.fsf@tromey.com> (raw)
In-Reply-To: <CAArVCkRqVLSau6gOhg6JFV861xXmRU3v-ExcNzoZNdCT3OEPqw@mail.gmail.com> (Philipp Stephani's message of "Thu, 26 Nov 2015 18:16:13 +0000")

>>>>> "Philipp" == Philipp Stephani <p.stephani2@gmail.com> writes:

Philipp> The first is that such a facility would change the execution
Philipp> model of Emacs in a quite fundamental way.

I think instead that there is no fundamental change here.  The callback
scenario is no different from anything else in Emacs.

The things to disallow are calling into Emacs from a different thread,
or callbacks from signal handlers.  This is easily done -- the former is
done already and the latter can be done simply by fiat: "don't do that".

Philipp> Right now all user-defined code inside the Emacs process gets
Philipp> run through a path under the control of Emacs, either as a
Philipp> response to an input event, or a timer, or a process filter
Philipp> etc.

In my proposal in the relevant issue, this would not change.

Now, it should change a little.  It would be good to add fd-watching
capabilities to the module API; and it would be good to add some kind of
"do this later" API as well.  But even these aren't very different.

Philipp> The second issue is how such a facility should be made
Philipp> available. Currently all communication between modules and
Philipp> Emacs happens through modules, and there is no facility how
Philipp> modules can request creation of an environment. However, it
Philipp> makes little sense to discuss this issue until the first one is
Philipp> resolved.

I already proposed a solution for this as well: when a module requests a
runtime, keep it around.  Then let a module function request an
environment from the runtime at any time, and provide a way to tear down
such an environment.  Then a callback could get a new environment when
needed.

Tom



      parent reply	other threads:[~2015-11-27  4:20 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-26  6:08 Callbacks from modules Ivan Andrus
2015-11-26 15:43 ` Eli Zaretskii
2015-11-26 16:17   ` joakim
2015-11-26 16:33     ` Eli Zaretskii
2015-11-26 17:01       ` Philipp Stephani
2015-11-26 17:19         ` Eli Zaretskii
2015-11-27  3:23   ` Ivan Andrus
2015-11-27  8:29     ` Eli Zaretskii
2015-11-27 17:30       ` Ivan Andrus
2015-11-26 18:16 ` Philipp Stephani
2015-11-26 18:41   ` Eli Zaretskii
2015-11-26 18:44     ` Philipp Stephani
2015-11-27  3:35       ` Ivan Andrus
2015-11-27  8:30         ` Eli Zaretskii
2015-11-27 17:31           ` Ivan Andrus
2015-11-27  4:22     ` Tom Tromey
2015-11-27  8:35       ` Eli Zaretskii
2015-11-30 14:03         ` Ted Zlatanov
2015-11-30 15:58           ` Eli Zaretskii
2015-11-30 16:52           ` John Wiegley
2015-11-27  4:20   ` Tom Tromey [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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871tbcyswl.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=dancol@dancol.org \
    --cc=darthandrus@gmail.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=p.stephani2@gmail.com \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.