all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* callback functions in Emacs
@ 2007-09-04 20:27 Michael Albinus
  2007-09-04 21:21 ` David Kastrup
                   ` (3 more replies)
  0 siblings, 4 replies; 17+ messages in thread
From: Michael Albinus @ 2007-09-04 20:27 UTC (permalink / raw)
  To: emacs-devel

Hi,

I'm playing a little bit with integration of D-Bus(*) into Emacs. In
order to get this, I'm writing dbusbindings.{h,c}, which are linked to
Emacs.

One of the basic concepts od D-Bus is, that one could register a
callback function which is applied when there bis a signal on the bus
one has registered for. That works fine as long everything is handled on
C level. But I intend to register a callback C function, which calls
then a Lisp function internally (via Ffuncall etc).

Unfortunately, this fails. Feval does abort when evalling the
corresponding Lisp form, because handling_signal is equal 1 (the comment
in eval.c explains, that the Lisp interpreter cannot be called from a
signal handler, because it isn't reentrant).

One possible solution I found is the use of an additional, Emacs
internal network process, installed when registering the callback
function in D-Bus. I can send something to the process when being inside
the callback function. The process filter of this process reads then the
sent string, and calls the corresponding Lisp function.

But that looks ugly to me. Isn't there another, more simple way to
evaluate Lisp code from inside a callback function?

(*): http://dbus.freedesktop.org

TIA, and best regards, Michael.

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2007-09-06  6:12 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-04 20:27 callback functions in Emacs Michael Albinus
2007-09-04 21:21 ` David Kastrup
2007-09-04 22:32 ` Davis Herring
2007-09-05  1:15   ` Stefan Monnier
2007-09-05  6:16 ` Richard Stallman
2007-09-05  8:43   ` Michael Albinus
2007-09-05 10:01     ` Miles Bader
2007-09-05 15:31       ` Michael Albinus
2007-09-05 10:30     ` Thien-Thi Nguyen
2007-09-05 10:48       ` Michael Albinus
2007-09-05 14:30       ` Davis Herring
2007-09-05 15:18         ` Michael Albinus
2007-09-05 16:09           ` Stefan Monnier
2007-09-05 16:40         ` Thien-Thi Nguyen
2007-09-06  6:12           ` dhruva
2007-09-05 15:34 ` Leo
2007-09-06  4:59   ` Richard Stallman

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.