From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "scopeview ." Newsgroups: gmane.emacs.devel Subject: What's the best way to write complex emacs extension Date: Sun, 2 Nov 2014 07:25:27 +0800 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7bea3eecbaef410506d46ddb X-Trace: ger.gmane.org 1414899187 20077 80.91.229.3 (2 Nov 2014 03:33:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 2 Nov 2014 03:33:07 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Nov 02 04:33:02 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 1XkluX-0006aQ-CI for ged-emacs-devel@m.gmane.org; Sun, 02 Nov 2014 04:33:01 +0100 Original-Received: from localhost ([::1]:54807 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XkluW-0003mD-SN for ged-emacs-devel@m.gmane.org; Sat, 01 Nov 2014 23:33:00 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58116) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xki2z-0001is-Vn for emacs-devel@gnu.org; Sat, 01 Nov 2014 19:25:31 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xki2y-0006VK-FO for emacs-devel@gnu.org; Sat, 01 Nov 2014 19:25:29 -0400 Original-Received: from mail-qa0-x231.google.com ([2607:f8b0:400d:c00::231]:49440) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xki2y-0006V8-A7 for emacs-devel@gnu.org; Sat, 01 Nov 2014 19:25:28 -0400 Original-Received: by mail-qa0-f49.google.com with SMTP id i13so6758460qae.36 for ; Sat, 01 Nov 2014 16:25:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=9OA0u56TSnmNvyhBjkwb/Cb4jc3flX7wy9BQo2R4XEo=; b=IauH0FElXRwClj61SOkys2lK+XfM+xiwB7VlCTmOs7v+HVWNwnPbPXRve3uWUnGBFI c0ABwZCycoX8SI3LGjFw1zU4W2us4X41/2fmIaSOmZi8qwDvICbdrCv0zDi4g8O5QIaw ClSEWioGqWmE77y5wopMWUZ77+2ok5CGu49zLRRCMUZ0yBdh6juYWTYJ/UbN8tIv9RXv W6n7ddJw07YsOszYpuigQW/YoL1f7QZGEuk3OrA4TMssX7H3YPdkJ4MrWXZaGz7euktE iyutMmFojTCI8RX2SkzyK1A4J/b+k14uDpZ6V8iPJW4wkEP2HhNNFWXkMmbZta2ef1KA eX2g== X-Received: by 10.224.16.135 with SMTP id o7mr51030164qaa.37.1414884327352; Sat, 01 Nov 2014 16:25:27 -0700 (PDT) Original-Received: by 10.96.79.193 with HTTP; Sat, 1 Nov 2014 16:25:27 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400d:c00::231 X-Mailman-Approved-At: Sat, 01 Nov 2014 23:32:58 -0400 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:176227 Archived-At: --047d7bea3eecbaef410506d46ddb Content-Type: text/plain; charset=UTF-8 Hi all, When I wrote my simple extension, pure elisp code is ok. But I found it is hard to write complex elisp extension. Because when elisp predication failed (for example stringp) it hard to find out the failed predication place. (no file:function:line_number or backtrace) So my complex extension is elisp + c++ code and I make elisp as simple as possible. We can link c code to emacs binary, but I don't think it's a good solution. In xemacs, we can extend elisp by writing c/c++ shared library and load it dynamicly. If emacs has this feature, my complex emacs extension can be much simpler. Does there any other good way to extend emacs? How about other emacs-alike editor like Hemlock written in common lisp which can use many mature and complex common lisp library? Does anybody use it? I think xemacs's c/c++ shared library is more suitable. But it seems that xemacs had stop its development. following link is a simple extension of mine http://www.emacswiki.org/emacs/dir-list --047d7bea3eecbaef410506d46ddb Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi all,

When I wrote my simple extension, pure= elisp code is ok. But I found it is hard to write complex elisp extension.= Because when elisp predication failed (for example stringp) it hard to fin= d out the failed predication place. (no file:function:line_number or backtr= ace)

So my complex extension is elisp + c++ code and I make elisp as= simple
as possible. We can link c code to emacs binary, but I don't= think it's a good solution. In xemacs, we can extend elisp by writing = c/c++ shared library and load it dynamicly. If emacs has this feature, my c= omplex emacs extension can be much simpler.

Does there any other goo= d way to extend emacs?
How about other emacs-alike editor like Hemlock w= ritten in common lisp which can use many mature and complex common lisp lib= rary? Does anybody use it?
I think xemacs's c/c++ shared library is= more suitable. But it seems that xemacs had stop its development.

<= br>following link is a simple extension of mine
http://www.emacswiki.org/emacs/dir-list
=
--047d7bea3eecbaef410506d46ddb--