views:

204

answers:

1

Just wondering if it's possible to package and deploy emacs and Lisp program as PC application such that once downloaded, running setup.exe (kind of), then the user can start application to make emacs run the specific Lisp program as if the application were implemented by other languages and platform, such as .Net, or Python.

With this approach, it would be easier for ordinary users to use the functionality of the Lisp program rather than become a user of emacs, which often takes some learning curve. On the other hand, it would provide some level of protection of the Lisp code for intellectual property.

Of course, one alternative is use some more commercially ready languages/paradigms. But I find that emacs does provide rich functionality that would be pity, if it were not enjoyed by the mass.

Thanks in advance,

Yu Shen

+3  A: 

There really isn't a good way of doing this. Emacs is simply not set up to work as a "runtime" for easy redistribution.

What you could do is compile a version of Emacs, strip away as much as you wanted from the install (either C features or Elisp libraries), byte-compile the code you want to distribute, throw all of that in an archive (or setup.exe) and distribute that.

To byte-compile multiple files, you can run

$ emacs -batch -f batch-byte-compile files...

Once you have your libraries together, you can have emacs run a particular command on startup with:

$ emacs -f function

You can also load additional elisp files with the -l file switch.

Unless you are really wed to Emacs, I suggest you use a different dialect of Lisp, one that is more suited for redistribution of stand-alone programs.

haxney
Thanks for the very helpful pointers. Some further questions:Is there any Lisp dialect that offer powerful text buffer object functionality like emaacs-Lisp?Is there any nearly ready made tool to create such setup.exe?Thanks again. Yu Shen
Yu Shen
There probably isn't another Lisp that comes with all of the text-editing features of Emacs out of the box; all of the buffer stuff is very Emacs-specific. As for setup.exe-appropriate Lisp dialects, I don't know of anything beyond Googling. I've done almost no Lisp programming outside of Emacs, sorry.
haxney