[erlang-questions] get erlang-shell working, displayed & active right after emacs startup

Steve Vinoski vinoski@REDACTED
Fri Jul 4 22:35:18 CEST 2014

On Fri, Jul 4, 2014 at 3:51 PM, ami <m3oucat@REDACTED> wrote:

> > You might try something like this in your ~/.emacs file:
> >
> > (add-hook 'erlang-shell-mode-hook
> >         '(lambda () (delete-other-windows (display-buffer "*erlang*"))))
> > (erlang-shell)
> >
> > --steve
> Unfortunately, it doesn’t work for me. The same story: erlang shell is
> being started,
> but it’s not active & displayed. I have to manually (after emacs start)
> C-x b *erlang*
> (switch to *erlang* buffer).

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.

(require 'erlang-start)
 '(lambda ()
    (let ((f (make-frame)))
      (with-selected-frame f
        (delete-other-windows (display-buffer erlang-shell-buffer-name))))))

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140704/a48481df/attachment.htm>

More information about the erlang-questions mailing list