[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: making software with Emacs and Elisp

From: Pascal J. Bourguignon
Subject: Re: making software with Emacs and Elisp
Date: Wed, 23 Oct 2013 02:36:02 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Emanuel Berg <address@hidden> writes:

> Marcin Borkowski <address@hidden> writes:
>> I understand that you want to develop your application
>> in "EmacsOS"
> You are actually the *third* person who brought up the
> "OS" aspect with me. I never thought of Emacs that way.
> Well, it isn't like the Linux kernel because it is
> interactive, and it doesn't access and allocate hardware
> to a pool of processes. For example, if you run a shell
> command from Emacs, that is continuous/background in
> character, isn't that run next to Emacs, with the kernel
> doing the multitasking, rather than on top of Emacs, and
> Emacs doing the scheduling etc.?

cf. the process objects.

emacs does manage memory, or schedule processor time for the various
functions running in emacs.

Also, "Operating System" doesn't mean unix-like architecture.  You can
have very different architectures.

> But you may also include other stuff in a definition of
> "OS", like the libraries, the tools, the interface... In
> that sense I agree Emacs is very much an OS, perhaps
> even the best there is!

Indeed, an OS is not a kernel.  
cf. GNU vs. Linux, or GNU vs. Hurd.
cf. emacs vs. Linux

> But (in the kernel "OS" interpretation), that's overkill
> for my purposes, I don't need to spawn processes/threads
> and all that, I just need to be able to execute my Elisp
> software elsewhere, the same way it is executed on my
> machine.
> Doesn't for example Python code work everywhere, as long
> as you have a Python interpreter? 

No it doesn't.  There are a lot of versions of python, and python
libraries may or may not work on several of those versions.
Distributions usually package them so that several versions can be
installed at the same time, and a python program chooses one version or
another to run.  The same is true for ruby (with even a specific tools
to setup the environment with a given ruby version and gem
configuartion, cf. rvm).

Some implementations also can install different versions of emacs.
(cf. gentoo eselect, /etc/alternatives on ubuntu, etc).

> Something like that would be enough, and I suppose the
> Elisp interpreter is... Emacs.

That said, there's less differences between (consecutive) versions of
emacs than in the case of ruby or python, and it's easier to write a
program that can run on different versions of emacs lisp.

As long as emacs is installed (it may be a dependency of your program,
so it gets installed automatically in a given distribtion package
management system), you can run your program with:

    $ emacs -Q --batch -l myprogram.el

you can provide a script to launch your program such as:

    $ cat myprogram
    exec emacs -Q --batch -l myprogram.el

__Pascal Bourguignon__

reply via email to

[Prev in Thread] Current Thread [Next in Thread]