From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: gnuist007@hotmail.com Newsgroups: gmane.emacs.help Subject: Using lisp code in emacs inside a C program Date: Wed, 24 Oct 2012 20:13:50 -0700 (PDT) Message-ID: <38c1b402-deb0-497a-adc3-640c525ab8c2@g4g2000yqk.googlegroups.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1351134916 31423 80.91.229.3 (25 Oct 2012 03:15:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 25 Oct 2012 03:15:16 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Oct 25 05:15:25 2012 Return-path: Envelope-to: geh-help-gnu-emacs@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 1TRDui-0007a5-Jn for geh-help-gnu-emacs@m.gmane.org; Thu, 25 Oct 2012 05:15:20 +0200 Original-Received: from localhost ([::1]:33555 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TRDua-0007d5-LS for geh-help-gnu-emacs@m.gmane.org; Wed, 24 Oct 2012 23:15:12 -0400 Original-Received: by 10.224.138.142 with SMTP id a14mr9713357qau.4.1351134830185; Wed, 24 Oct 2012 20:13:50 -0700 (PDT) Original-Received: by 10.236.126.227 with SMTP id b63mr902884yhi.0.1351134830159; Wed, 24 Oct 2012 20:13:50 -0700 (PDT) Original-Path: usenet.stanford.edu!x14no7325227qar.0!news-out.google.com!r17ni57592152qap.0!nntp.google.com!x14no7325217qar.0!postnews.google.com!g4g2000yqk.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help,comp.emacs,comp.lang.c,comp.lang.lisp Complaints-To: groups-abuse@google.com Injection-Info: g4g2000yqk.googlegroups.com; posting-host=99.42.78.5; posting-account=HZMwaQgAAABuThfluRZ4FM7A69xRFwOt Original-NNTP-Posting-Host: 99.42.78.5 User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows NT 5.1; rv:12.0) Gecko/20100101 Firefox/12.0,gzip(gfe) Injection-Date: Thu, 25 Oct 2012 03:13:50 +0000 Original-Xref: usenet.stanford.edu gnu.emacs.help:195085 comp.emacs:102654 comp.lang.c:1020211 comp.lang.lisp:311502 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:87414 Archived-At: Dear Lispers, I wrote a humble file parsing/structure-searching program in emacs lisp. Essentially a collection of elisp functions called by a main function. I may need the function to grow and to maintain it. I think its easiest in the elisp in which I started the project. I want to convert it to an executable or a form that runs without the need for emacs. Hence, I want to be able to take whatever lisp interpreter code from emacs and link to it or incorporate inside my C executable. The main functions from the emacs that my program uses are essentially navigation and regexp and non-greedy wildcards, ie "*?" and multiline searches. I dont know if any of the standard regexp library in C or C++ supports such extended regexp. Even sed does not support it and I avoid perl. The only other option would be javascript but I want to stay loyal to lisp if you are able to give me enough ideas on this matter. I would be even willing to put together a small lisp interpreter in C with your help and then bootstrap it using Lisp etc and then dump the binary image after it has computed rest of the higher lisp definitions in primitive lisp and link it to my code in elisp. There is really no gui facility that it uses. I am sure many of you have done this kind of thing as I keep on hearing but have to go through all the steps myself. Gnuist