2
votes

Is there a way to make my Emacs start with predefined frame as my attached screenshot? I am not familiar enough how to do it in my .emacs script...

Emacs with three frame

It is as simple as doing :

  1. split-window-horizontally (create two window side by side)
  2. split-window-vertically (split the first window in the left into two part).

And in the last window, I want it to upload a calendar. I make this arrangement mostly because my monitor have a broken LCD in the left part of it. So my code must be in the right side of the screen :)

EDIT 1 Based on Juanleon answer, I add another eshell window + open a specific *.org file (which is my assumption should I start emacs for project work) :

;my preferred working space                                                                                                                                                                                                       
(find-file "docs/steps.org")
(split-window-horizontally)
(other-window 1)
(calendar)
(other-window 2) ;main code                                                                                                                                                                                                       
(split-window-vertically)
(other-window 1)
(eshell)
(other-window 2)

Resulting this visual : enter image description here

1
Take a look at github.com/tlh/workgroups.el. Seems to be a general solution.abo-abo
Registers can be used to save window configuration. And they'll remember it no matter how complex. If think this configuration will never change, @juanleon's answer is simpler and skills be enough.Malabarba
Hi @abo-abo : thanks for the link, I've read it sometime about that, but I think it's too complicated. :)swdev
You're right @BruceConnor, I use (if I am not mistaken) winner mode for an easy way of reverting to previous window configuration. But currently I am satisfied with my window arrangement. Hence, Juanleon solution is just what I need. Thanks!swdev

1 Answers

2
votes

Put that at the end of your init file:

    (split-window-horizontally)
    (other-window 1)
    (calendar)
    (other-window 1)