<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jul 4, 2014 at 3:51 PM, ami <span dir="ltr"><<a href="mailto:m3oucat@gmail.com" target="_blank">m3oucat@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class=""><br>
<br>
<br>
> You might try something like this in your ~/.emacs file:<br>
><br>
> (add-hook 'erlang-shell-mode-hook<br>
> '(lambda () (delete-other-windows (display-buffer "*erlang*"))))<br>
> (erlang-shell)<br>
><br>
> --steve<br>
<br>
<br>
</div>Unfortunately, it doesn’t work for me. The same story: erlang shell is being started,<br>
but it’s not active & displayed. I have to manually (after emacs start) C-x b *erlang*<br>
(switch to *erlang* buffer).<br></blockquote><div><br></div><div>My code worked for me on Ubuntu 12.04 with emacs 24.3.1. But one thing about it is that the erlang buffer was not the focus if I specified a file to visit on the emacs command line at startup. The code below doesn't have that problem, and for me it does exactly what you're requesting.</div>
<div><br></div><div>(require 'erlang-start)<br></div><div>(add-hook</div><div> 'emacs-startup-hook</div><div> '(lambda ()</div><div> (let ((f (make-frame)))</div><div> (with-selected-frame f</div><div>
(erlang-shell)</div><div> (delete-other-windows (display-buffer erlang-shell-buffer-name))))))</div><div><br></div><div>--steve<br></div></div></div></div>