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: emacs-dynamic-module in Emacs Git? Date: Mon, 01 Dec 2014 16:46:25 -0600 Message-ID: <8561dvm1j2.fsf@stephe-leake.org> References: <87siha7r3b.fsf@lifelogs.com> <87lhmz4mtj.fsf@lifelogs.com> <87sih575rc.fsf@lifelogs.com> <8361dyaqf1.fsf@gnu.org> <837fycae5p.fsf@gnu.org> <87y4qs19mi.fsf@lifelogs.com> <874mtfu0et.fsf@lifelogs.com> 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 1417474022 9362 80.91.229.3 (1 Dec 2014 22:47:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 1 Dec 2014 22:47:02 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 01 23:46:55 2014 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 1XvZk5-0003ER-75 for ged-emacs-devel@m.gmane.org; Mon, 01 Dec 2014 23:46:53 +0100 Original-Received: from localhost ([::1]:34278 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XvZk4-0001qz-Oe for ged-emacs-devel@m.gmane.org; Mon, 01 Dec 2014 17:46:52 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40471) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XvZjl-0001qb-LH for emacs-devel@gnu.org; Mon, 01 Dec 2014 17:46:40 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XvZje-0003sm-NG for emacs-devel@gnu.org; Mon, 01 Dec 2014 17:46:33 -0500 Original-Received: from dnvrco-outbound-snat.email.rr.com ([107.14.73.232]:24188 helo=dnvrco-oedge-vip.email.rr.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XvZje-0003sS-Hb for emacs-devel@gnu.org; Mon, 01 Dec 2014 17:46:26 -0500 Original-Received: from [70.94.38.149] ([70.94.38.149:49724] helo=TAKVER) by dnvrco-oedge03 (envelope-from ) (ecelerity 3.5.0.35861 r(Momo-dev:tip)) with ESMTP id 83/17-24298-1CFEC745; Mon, 01 Dec 2014 22:46:25 +0000 In-Reply-To: (Ted Zlatanov's message of "Mon, 01 Dec 2014 12:05:29 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.94 (windows-nt) X-RR-Connecting-IP: 107.14.64.142:25 X-Authority-Analysis: v=2.1 cv=F8jZd8RN c=1 sm=1 tr=0 a=AppmJ/7ZOOFWL/q6u6u93g==:117 a=AppmJ/7ZOOFWL/q6u6u93g==:17 a=ayC55rCoAAAA:8 a=fNEgcOh0sVsA:10 a=IkcTkHD0fZMA:10 a=9i_RQKNPAAAA:8 a=f11AndE4AAAA:8 a=pGLkceISAAAA:8 a=AdbbhSS0HjQlvQXpOhUA:9 a=QEXdDO2ut3YA:10 X-Cloudmark-Score: 0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 107.14.73.232 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:178659 Archived-At: Ted Zlatanov writes: > On Mon, 1 Dec 2014 17:28:01 +0100 Aur=C3=A9lien Aptel wrote:=20 > > AA> In order to do anything useful (even in a "call-only" API) you need > AA> access to Emacs facilities. At the very least access to Elisp data > AA> structures (symbols, numbers, strings and buffers).=20 > > I think it's less efficient but also safer to return data as text in > sexp or JSON format. Exposing the Emacs internals just to return data > seems risky. Some modules may need that level of access, but most > don't. My module will be setting text properties in buffers, based on the results of parsing the code; it's replacing elisp code that does that now, which is too slow. > AA> The point of compiled modules is also efficiency so the access has > AA> to be low level enough (no big conversion or copying needed). > > Of course, but the difference is not that big and it can be optimized > later. I have moved the parsing code into a separate executable communicating by pipes. The communication and subsequent text processing takes a significant time; too long for my requirements. Which is why I'm looking for a more direct approach. > AA> For me a module package will be composed of a metadata file, a bunch > AA> of C files implementing small and simple primitives and a bunch of > AA> elisp files for the logic. > > Great. But can Emacs find out a module's metadata before loading it? It can if it's an ELPA package. --=20 -- Stephe