From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stephen Leake Newsgroups: gmane.emacs.devel Subject: Re: Dynamic loading progress; funcall of goto-char fails Date: Tue, 05 May 2015 23:11:10 -0500 Message-ID: <85383amjkx.fsf_-_@stephe-leake.org> References: <85a90ggf2d.fsf@stephe-leake.org> <54E0A40F.5080603@dancol.org> <83sie7un20.fsf@gnu.org> <54E0D181.2080802@dancol.org> <83r3trulse.fsf@gnu.org> <54E0D7E0.305@87.69.4.28> <83h9unukbg.fsf@gnu.org> <54E0DEF8.7020901@dancol> <83egpruiyp.fsf@gnu.org> <54E0FF93.2000104@dancol.org> <833865vp4d.fsf@gnu.org> <54E2355A.90@87.69.4.28> <83vbj1u020.fsf@gnu.org> <54E24CA4.9020601@dancol.org> <83h9uk7ddb.fsf@gnu.org> <54E382A5.5030408@dancol.org> <85a8zcu8gn.fsf@stephe-leake.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1430885527 5268 80.91.229.3 (6 May 2015 04:12:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 6 May 2015 04:12:07 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 06 06:11:53 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 1Ypqga-0004HI-KC for ged-emacs-devel@m.gmane.org; Wed, 06 May 2015 06:11:52 +0200 Original-Received: from localhost ([::1]:42864 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YpqgZ-0000tP-Qk for ged-emacs-devel@m.gmane.org; Wed, 06 May 2015 00:11:51 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36703) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YpqgN-0000sI-6X for emacs-devel@gnu.org; Wed, 06 May 2015 00:11:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YpqgI-0006N2-5R for emacs-devel@gnu.org; Wed, 06 May 2015 00:11:39 -0400 Original-Received: from gproxy9-pub.mail.unifiedlayer.com ([69.89.20.122]:39888) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1YpqgH-0006Mo-V2 for emacs-devel@gnu.org; Wed, 06 May 2015 00:11:34 -0400 Original-Received: (qmail 26785 invoked by uid 0); 6 May 2015 04:11:29 -0000 Original-Received: from unknown (HELO cmgw2) (10.0.90.83) by gproxy9.mail.unifiedlayer.com with SMTP; 6 May 2015 04:11:29 -0000 Original-Received: from host114.hostmonster.com ([74.220.207.114]) by cmgw2 with id QUBM1q00E2UdiVW01UBQUR; Tue, 05 May 2015 22:11:27 -0600 X-Authority-Analysis: v=2.1 cv=FPmImYYs c=1 sm=1 tr=0 a=CQdxDb2CKd3SRg4I0/XZPQ==:117 a=CQdxDb2CKd3SRg4I0/XZPQ==:17 a=DsvgjBjRAAAA:8 a=f5113yIGAAAA:8 a=2wGvvwaKUHMA:10 a=IkcTkHD0fZMA:10 a=9i_RQKNPAAAA:8 a=hEr_IkYJT6EA:10 a=x_XPkuGwIRMA:10 a=h1PgugrvaO0A:10 a=pGLkceISAAAA:8 a=fdhQM_ohBt9UZbXBdmEA:9 a=QEXdDO2ut3YA:10 Original-Received: from [76.218.37.33] (port=57211 helo=TAKVER) by host114.hostmonster.com with esmtpa (Exim 4.84) (envelope-from ) id 1Ypqg7-0003Ac-5W for emacs-devel@gnu.org; Tue, 05 May 2015 22:11:23 -0600 In-Reply-To: <85a8zcu8gn.fsf@stephe-leake.org> (Stephen Leake's message of "Mon, 16 Mar 2015 13:02:16 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (windows-nt) X-Identified-User: {2442:host114.hostmonster.com:stephele:stephe-leake.org} {sentby:smtp auth 76.218.37.33 authed with stephen_leake@stephe-leake.org} X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 69.89.20.122 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:186271 Archived-At: Stephen Leake writes: > Aur=C3=A9lien Aptel writes: > >> I've tried to implement modules using Daniel's plan. It turned out to >> be pretty easy, mostly because I'm more familiar with the Emacs >> codebase now and because it's a lot less intrusive than my previous >> attempt. >> >> It's not finished but I have a basic module working on linux. It's a >> proof of concept, basically. > > I've implemented a test module that calls two Ada mode parser actions > (see below). > > The real module will call the actual parser and build the action args > from the parse results. > > I did not have to modify anything in the Emacs C code to make this work, > so it shows this module design is adquate for my use case so far. I've made more progress; I've got a module that should run the full Ada parser on a buffer. However, when I run it, it crashes on a call like: emacs_value goto_char_sym =3D env.intern (env, "goto-char"); env.funcall (env, goto_char_sym, env.make_fixnum (env, 1)); When I trace the 'funcall' (in eval.c DEFUN funcall), it hits this code: fun =3D original_fun; if (SYMBOLP (fun) && !NILP (fun) && (fun =3D XSYMBOL (fun)->function, SYMBOLP (fun))) fun =3D indirect_function (fun); and sets fun to 0, which then signals a failure. Is this because 'goto-char' is implemented in C? If so, I need a way to call elisp functions implemented in C. Hmm. I guess for now I can provide elisp wrappers for all the functions I need. --=20 -- Stephe