From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ivan Andrus Newsgroups: gmane.emacs.devel Subject: Callbacks from modules Date: Wed, 25 Nov 2015 23:08:48 -0700 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 9.1 \(3096.5\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1448518153 4296 80.91.229.3 (26 Nov 2015 06:09:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 26 Nov 2015 06:09:13 +0000 (UTC) To: emacs Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Nov 26 07:08:58 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1a1pjk-0008In-VI for ged-emacs-devel@m.gmane.org; Thu, 26 Nov 2015 07:08:57 +0100 Original-Received: from localhost ([::1]:49379 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1pjm-00049G-Qn for ged-emacs-devel@m.gmane.org; Thu, 26 Nov 2015 01:08:58 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:32814) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1pjj-00048H-3H for emacs-devel@gnu.org; Thu, 26 Nov 2015 01:08:55 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a1pjf-0004zV-TR for emacs-devel@gnu.org; Thu, 26 Nov 2015 01:08:55 -0500 Original-Received: from mail-ob0-x22f.google.com ([2607:f8b0:4003:c01::22f]:35402) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1pjf-0004zQ-OS for emacs-devel@gnu.org; Thu, 26 Nov 2015 01:08:51 -0500 Original-Received: by obbnk6 with SMTP id nk6so55689865obb.2 for ; Wed, 25 Nov 2015 22:08:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-type:content-transfer-encoding:subject:message-id:date :to:mime-version; bh=Xv8cDWpzJK44zSsZX8x83dq7uk9Ufd8R3+VE+5H8GrY=; b=S4qhiBl7KImApfJAPugRkW7enKUYyQkMyXjbJXxujeYDs2I37L6Vs21sYHVwpZPeNj U3Rq8D770YAgwGZampQh/xBjxG0Wq3TS+HG5mtFboEnX97EdBb/pbdLLobjlZLQ1/uuP LumiSC70gq4vnhqbpCYMbZz3XVJeTxusTTPgHwvYejrd+2KebLx7oLF0MItjTM+F3ERB 5pMhu7VxU1JicS25X+W4q2FcAIUYubni8qbsDG9ZEaTl1SzvAnSyYUcq5d/KPrTefCFZ hDL12EErPqGGrU4V3keJl/Hl5+3/LVVlGt1eTpGjWTynHP/ypCbSq54C6okxZNG9UneL QV6g== X-Received: by 10.182.73.225 with SMTP id o1mr28604385obv.80.1448518130791; Wed, 25 Nov 2015 22:08:50 -0800 (PST) Original-Received: from [192.168.0.3] (174-23-136-94.slkc.qwest.net. [174.23.136.94]) by smtp.gmail.com with ESMTPSA id a123sm12282705oig.2.2015.11.25.22.08.49 for (version=TLSv1/SSLv3 cipher=OTHER); Wed, 25 Nov 2015 22:08:49 -0800 (PST) X-Mailer: Apple Mail (2.3096.5) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4003:c01::22f X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:195275 Archived-At: I=E2=80=99ve started writing an Emacs module to access = NSSpeechSynthesizer on OS X (and maybe GNUStep though I haven=E2=80=99t = tested it there). I=E2=80=99ve been using the mod-test module as an = example and I have it working reasonably well except that I don=E2=80=99t = have any idea how to run a callback. When the synthesizer is done speaking it sends an Objective-C message = speechSynthesizer:didFinishSpeaking. =46rom there I would like to run = an elisp hook, say `ns-speech-finished-speaking-hook`. How can I do = this? Do I have to squirrel away a pointer to an emacs_env somehow? I = tried naively storing env from a previous call but, not surprisingly, = the pointer is invalid when I try to use it. Thanks, Ivan=