all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Philipp Stephani <p.stephani2@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: darthandrus@gmail.com, dancol@dancol.org, emacs-devel@gnu.org
Subject: Re: Callbacks from modules
Date: Thu, 26 Nov 2015 18:44:47 +0000	[thread overview]
Message-ID: <CAArVCkTZ4Q-nVUoAjjViGHe+3KQaHcbGrdgn_H4V8aaQytcmFg@mail.gmail.com> (raw)
In-Reply-To: <83vb8otxhf.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 1559 bytes --]

Eli Zaretskii <eliz@gnu.org> schrieb am Do., 26. Nov. 2015 um 19:41 Uhr:

> > From: Philipp Stephani <p.stephani2@gmail.com>
> > Date: Thu, 26 Nov 2015 18:16:13 +0000
> > Cc: Eli Zaretskii <eliz@gnu.org>, Daniel Colascione <dancol@dancol.org>
> >
> > There are two major issues with allowing callbacks at arbitrary times,
> which
> > need to be discussed and resolved first. The first is that such a
> facility
> > would change the execution model of Emacs in a quite fundamental way.
> Right now
> > all user-defined code inside the Emacs process gets run through a path
> under
> > the control of Emacs, either as a response to an input event, or a
> timer, or a
> > process filter etc. Adding a facility to run module code from arbitrary
> > callbacks would remove this invariant, which can have global effects on
> Emacs.
>
> I don't even understand what is meant by "arbitrary callbacks".  If
> they are called in the context of a separate thread, we will not allow
> them to run.
>

Yes, but there are other possibilities. For example, modules can create
additional windows in the main thread and install windows procedures
pointing to them. Such window procedures currently cannot communicate with
Emacs.


>
> IOW, such arbitrary callbacks need to run in the C land, and
> communicate with Lisp via timers.  In the future, we might add
> facilities that would allow a module register a file descriptor
> through which events could flow into the Emacs event queue.  But that
> is not yet available, and I'm not sure we'd want to allow it.
>
>
I agree.

[-- Attachment #2: Type: text/html, Size: 2268 bytes --]

  reply	other threads:[~2015-11-26 18:44 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 [this message]
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

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=CAArVCkTZ4Q-nVUoAjjViGHe+3KQaHcbGrdgn_H4V8aaQytcmFg@mail.gmail.com \
    --to=p.stephani2@gmail.com \
    --cc=dancol@dancol.org \
    --cc=darthandrus@gmail.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /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.