[erlang-questions] how can I run emacs from erlang

Jesper Louis Andersen jesper.louis.andersen@REDACTED
Tue Jul 16 16:17:16 CEST 2013


Hi Joe,

emacsclient is exactly what you seek. What is usually done is that you
arrange a temporary file to be written. Then you call $EDITOR on that file
and wait until it finishes. Then you read in set file when the editor
exits. Then you check if the file changed at all.

emacsclient(1) is emacs driver for doing this in a console. It connects to
a running emacs server instance and opens a frame in it. You exit with C-x
#.

For deeper communication to an emacs instance, you can look at what distel
does/did. Perhaps EDTS (the name eludes me, but search for Thomas
Jaervstrand).


On Tue, Jul 16, 2013 at 4:00 PM, Joe Armstrong <erlang@REDACTED> wrote:

> Is there a simple way to run emacs from erlang?
>
> This doesn't work
>
> > os:cmd("emacs").
> "emacs: standard input is not a tty\n"
>
>  I just want to pop up a window with emacs in it (and some text in a
> buffer)
> and get the text back when the user quits emacs
>
> Is there an easy way to do this?
>
> And no - I don't want to run erlang inside emacs - I want the other way
> around.
>
> Cheers
>
> /Joe
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20130716/4124a8c0/attachment.htm>


More information about the erlang-questions mailing list