From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Klaus-Dieter Bauer Newsgroups: gmane.emacs.help Subject: Emacs lisp source code portability - Possible to use same backend code when emacs not available? Date: Sat, 30 Mar 2013 19:11:22 +0100 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7bd8f90e79eedf04d928526d X-Trace: ger.gmane.org 1364670660 4294 80.91.229.3 (30 Mar 2013 19:11:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 30 Mar 2013 19:11:00 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Mar 30 20:11:28 2013 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 1UM1BU-0003Xl-Gb for geh-help-gnu-emacs@m.gmane.org; Sat, 30 Mar 2013 20:11:24 +0100 Original-Received: from localhost ([::1]:58625 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UM1B6-0004ui-4g for geh-help-gnu-emacs@m.gmane.org; Sat, 30 Mar 2013 15:11:00 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:44240) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UM0G0-00036W-IK for help-gnu-emacs@gnu.org; Sat, 30 Mar 2013 14:12:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UM0Ft-0003Zs-Ci for help-gnu-emacs@gnu.org; Sat, 30 Mar 2013 14:12:00 -0400 Original-Received: from mail-ve0-f169.google.com ([209.85.128.169]:35294) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UM0Ft-0003ZR-8F for help-gnu-emacs@gnu.org; Sat, 30 Mar 2013 14:11:53 -0400 Original-Received: by mail-ve0-f169.google.com with SMTP id d10so1457919vea.0 for ; Sat, 30 Mar 2013 11:11:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:from:date:message-id:subject:to :content-type; bh=dn8+dpzOt0+f4z9OBsdOR4d3QSQjWzX652EJ1oZlEjc=; b=xEqFK5RbZyoaeWC/9sMkiKY+e+jdNEjNux0yE/lVsNEc/adRs7rdttqgDe+la2/wwG wrNqoA6dq3/1NfDWZLozC9tBFpB1buoDXQ4Q6nxIZZrQspwZRy1BIo2p0x3lrSrOWPg6 QgdU86tKMrc6uKIXT1oc/0IIqnWKS7Fc/gJ7wQLQiQFS50jOqG8P8JfDcNJEdQQvF3ta 4YkgVlsIIvFUF872Pi4PcarF3oRexfYh2fVUqEq/flQL1jApjZ+akODE+CwCAA0NOBSK IrkdpoaO+joUyWoEagJJvCDgHfEHN1eSuW76fAscgCG/GtuncpeOxj/QCkjNAthoDqTo 68rw== X-Received: by 10.58.90.5 with SMTP id bs5mr4843331veb.60.1364667112482; Sat, 30 Mar 2013 11:11:52 -0700 (PDT) Original-Received: by 10.220.173.65 with HTTP; Sat, 30 Mar 2013 11:11:22 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.128.169 X-Mailman-Approved-At: Sat, 30 Mar 2013 15:10:45 -0400 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:89820 Archived-At: --047d7bd8f90e79eedf04d928526d Content-Type: text/plain; charset=UTF-8 Hello! === Question === Is it possible to write emacs lisp code that runs without modification when emacs is not available? Note: The question is mostly of academic interest. Currently I have no actual application in mind. === Motivation === Think about this scenario: Someone writes an emacs mode for editing a file format. Because convenient editing of the files requires parsing the format he implements a parser in emacs lisp. Because the parser is available in emacs lisp, he also writes converters in emacs lisp. At a later point the file format has become complex and popular. Popular enough to bring it to non-emacs-users and mobile devices. As a consequence the availability of Emacs (as a lisp platform) can no longer be assumed. While emacs could be installed as dependency on desktop platforms at the cost of a large installer, on mobile platforms this may not be feasible. As a consequence -- as far as I know -- the backend code would have to be rewritten in another language. === Possible solutions which I may just not know of === - An implementation of a subset of common lisp that compiles to emacs lisp byte code. `cl` doesn't count, as previous versions used constructs like `defun*' and current versions a prefix `cl-`. - A subset of emacs lisp that depends on as little C-code as possible. This might allow writing a standalone-interpreter in a language available on the target-system with acceptable effort by reusing parts of Emacs' *.el sources. kind regards, Klaus-Dieter --047d7bd8f90e79eedf04d928526d Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hello!


=3D=3D= =3D Question =3D=3D=3D

Is it possible to write ema= cs lisp code that runs without modification
when emacs is not ava= ilable?

Note: The question is mostly of academic interest. Curr= ently I have no
actual application in mind.

<= div>
=3D=3D=3D Motivation =3D=3D=3D

= Think about this scenario:=C2=A0

Someone writes an emacs mode for editing a file format.= Because
convenient editing of the files requires parsing the for= mat he
implements a parser in emacs lisp. Because the parser is a= vailable in
emacs lisp, he also writes converters in emacs lisp.=C2=A0
<= br>
At a later point the file format has become complex and popul= ar.
Popular enough to bring it to non-emacs-users and mobile devi= ces. As a
consequence the availability of Emacs (as a lisp platform) can no
longer be assumed. While emacs could be installed as dependency on
desktop platforms at the cost of a large installer, on mobile
platforms this may not be feasible.

As a cons= equence -- as far as I know -- the backend code would have to
be = rewritten in another language.=C2=A0


=3D=3D=3D Possible solutions which I may just not know of =3D=3D=3D

- An implementation of a subset of common lisp that compi= les to emacs
=C2=A0 lisp byte code. `cl` doesn't count, as pr= evious versions used
=C2=A0 constructs like `defun*' and current versions a prefix `cl-= `.=C2=A0

- A subset of emacs lisp that depends on = as little C-code as possible.
=C2=A0 This might allow writing a s= tandalone-interpreter in a language
=C2=A0 available on the target-system with acceptable effort by reusin= g
=C2=A0 parts of Emacs' *.el sources.


kind regards, Klaus-Dieter
--047d7bd8f90e79eedf04d928526d--