From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Mario Lang Newsgroups: gmane.emacs.devel Subject: A plea for dynamically loadable extension modules Date: Wed, 30 Jul 2003 14:16:01 +0200 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <87wue0i51a.fsf@lexx.delysid.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1059567587 29797 80.91.224.249 (30 Jul 2003 12:19:47 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 30 Jul 2003 12:19:47 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Wed Jul 30 14:19:45 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19hpvl-0007kN-00 for ; Wed, 30 Jul 2003 14:19:45 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 19hpxh-0005fa-00 for ; Wed, 30 Jul 2003 14:21:45 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19hptL-0004ei-Fl for emacs-devel@quimby.gnus.org; Wed, 30 Jul 2003 08:17:15 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19hpt0-0004XG-PA for emacs-devel@gnu.org; Wed, 30 Jul 2003 08:16:54 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19hpsv-0004Sd-TM for emacs-devel@gnu.org; Wed, 30 Jul 2003 08:16:50 -0400 Original-Received: from chello080109223066.lancity.graz.surfer.at ([80.109.223.66] helo=lexx.delysid.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19hpsE-000472-Fr for emacs-devel@gnu.org; Wed, 30 Jul 2003 08:16:06 -0400 Original-Received: from mlang by lexx.delysid.org with local (Exim 3.36 #1 (Debian)) id 19hps9-0001nj-00 for ; Wed, 30 Jul 2003 14:16:01 +0200 Original-To: emacs-devel@gnu.org User-Agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:15734 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:15734 Hello. I'd like to re-raise discussion about this topic by explaining my current situation and the problems arising from it. I am writing bindings for the GNOME Assistive Technology Service Provider Interface, a library which allows querying of the GNOME desktop and extracting information about various objects on the desktop. Emacs is my favourite User Interface, so I'd like to eventually make those bindings available to elisp. Currently, I wrote the bindings for Guile, so that I can call the underlying C functions from Scheme. I then used some code from the guile CVS which interfaces Guile to Emacs Lisp by running a Guile process as external program. However, this code has several problems: 1. It does not handle multiline strings correctly. When a string containing a \n is received, the parser fails on the elisp side. 2. Scheme does to my knowledge not have a way to produce equivalents to lisp's keywords. I had to introduce a re-search-forward/replace-match loop which replaces {#:.*} with :.*. This way I can say #:tag in scheme, and get :tag in elisp. 3. I do nto see a way to work with non-standard object types. For instance, my bindings to GNOME's AT-SPI use a smob in Scheme which holds the pointer to the actual objects in AT-SPI. So, upon executing a function like (desktop 0) I get # which is the printed representation of my internal smob. However, I can not pass those objects to emacs lisp and vice versa, which makes programming for these bindings in elisp directly very hard. What I'd need to do is create some kind of cache on the scheme side which allows to reference those objects by something else, like a id or something. This is hackish, and not something I particularily want to do. However, there are several attempts to extend emacs in a way which allows to load bindings to other C routines dynamically. I particularily remember Dave Love's patch, which utilized libtool AFAIK. However, I can only use those extentions to impelemnt what I want if they are integrated into Emacs. The whole point of using such an extention is to avoid that the user has to recompile Emacs. Emacs is a large system, and many people just do not want to mess with their existing Emacs installation. So if I'd write my bindings to AT-SPI either as Emacs patch, or as something which uses Dave's loader extention, in both cases, the user would need to patch and recompile emacs, which is not really good IMHO, because it would lower the chance of people using my code. Additionally, it also makes it hard for distributions to include my code, since they'd need to merge it with their emacs package, which is something they probably do not want to do. Is there any chance that we get the dynloading extention for 21.4? If not, could you please explain why? Some people might think now: "Why use an editor to do your project?" Well, Emacs is an editor right, but it is also an platform independent, and mostly user interface independent programming environment. Code I write in emacs lisp runs usually equally well either under X, or under text interfaces. This is a property that NO OPEN SOURCE PROJECT KNOWN TO ME has. And it is a wonderful property to me as a blind programmer, because programs I write in Emacs Lisp do usually run under X Windows, even if I am not even technically able to test them under X. So I'd really love to see the posibility to extend Emacs Lisp with certain functions, which need code at the C level. P.S.: The latest released version of the project I am talking about can be found at http://delysid.org/gspi.html in case you are wondering. -- Thanks, Mario