1

The problem is following: I want to automate the way my emacs starts. It has to be split in two buffers and the slime-repl has to be started in the smallest (bottom) buffer. Plus, I want my file to be opened in the bigger (upper) buffer. In my .emacs there are lines:

(slime)
...
(split-window-vertically -6)
(switch-to-buffer (other-buffer))
(find-file "g:/Private/pa/pa2.lsp")

SLIME opens o.k. in the bottom buffer, but the file is opened in one of the background buffers, while I want it to be in front.

How to fix this?

avp
  • 4,895
  • 4
  • 28
  • 40
  • You should probably edit the subject line of this question to summarise your particular problem. See the faq: http://stackoverflow.com/faq – EfForEffort Oct 09 '08 at 18:48

4 Answers4

1

You can look to the function set-window-configuration...

But for slime you can use following functions - slime-complete-maybe-save-window-configuration & slime-complete-restore-window-configuration

Alex Ott
  • 80,552
  • 8
  • 87
  • 132
1

Instead of switch-to-buffer, use function pop-to-buffer.

(pop-to-buffer BUFFER-OR-NAME &optional OTHER-WINDOW NORECORD)

Select buffer BUFFER-OR-NAME in some window, preferably a different one.

viam0Zah
  • 25,949
  • 8
  • 77
  • 100
0

Try to add

(ido-mode 1)

to your .emacs, and enjoy the result :)

Łukasz Lew
  • 48,526
  • 41
  • 139
  • 208
0

Try:

(other-window 1)
(find-file "g:/Private/pa/pa2.lsp")

instead of your last two lines.

EfForEffort
  • 55,816
  • 4
  • 36
  • 41