<div dir="ltr">Hi Joe,<div><br></div><div style>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.</div>
<div style><br></div><div style>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 #.</div><div style><br></div><div style>
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).</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Tue, Jul 16, 2013 at 4:00 PM, Joe Armstrong <span dir="ltr"><<a href="mailto:erlang@gmail.com" target="_blank">erlang@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Is there a simple way to run emacs from erlang?<div><br></div><div>This doesn't work</div><div><br></div><div>> os:cmd("emacs"). </div><div>"emacs: standard input is not a tty\n"</div><div><br>
</div>
<div>I just want to pop up a window with emacs in it (and some text in a buffer)</div><div>and get the text back when the user quits emacs</div><div><br></div><div>Is there an easy way to do this?</div><div><br></div><div>
And no - I don't want to run erlang inside emacs - I want the other way around.</div><div><br></div><div>Cheers</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>/Joe</div>
</font></span><br>_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br></blockquote></div><br></div>