Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there a way to configure Emacs to start with two windows automatically, vertically split, and with the right side taking up ~60% of the total screen real estate?

share|improve this question
add comment

2 Answers 2

up vote 2 down vote accepted

If there is a way I bet you can find it on this page: Emacs Session Management

share|improve this answer
    
Great! It looks like this will do: emacswiki.org/emacs/WorkgroupsForWindows –  Josh Jan 11 '11 at 17:36
    
(-1) that doesn't really answer the question –  David Dec 17 '11 at 20:34
    
I agree with David., Its better to write answer here on this page instead of linking to some where else. –  kindahero Dec 19 '11 at 0:11
add comment

Assuming that you start with a window that is 80 columns by 50 columns, add this to your .emacs (from gnu.org):

  • To start with Horizontal split:

    (setq w (selected-window))
    (window-edges)
    (setq w2 (split-window w 15))
    (window-edges w2)
    (window-edges w)
    
  • To start with Vertical split (to get 60% on the right side, the width is set to 40 * (1 - 0.6) = 32

     (setq w (selected-window))
     (window-edges)
     (setq w2 (split-window w 32 t))
     (window-edges w2)
     (window-edges w)
    
share|improve this answer
    
this really answer the question. even though I would rather put all in a lambda and add it to init-hook –  kindahero Dec 19 '11 at 0:13
    
@kindahero it does answer the original question, but only by copy and paste with minor modification. A better answer would explain what you mean by lambda and init-hook as well as what the code means and how it could be adapted (e.g. to open four windows instead of two). –  David Dec 19 '11 at 1:36
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.