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

Magnus Henoch magnus@REDACTED
Tue Jul 16 16:26:43 CEST 2013

Joe Armstrong <erlang@REDACTED> writes:

> 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?

In a running Emacs, activate "server mode" with M-x server-start, and
then run os:cmd("emacsclient myfile.txt") (the file name is required).
That will open the file in your running Emacs instance, and block the
emacsclient invocation until you hit C-x #.


More information about the erlang-questions mailing list