Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Preserve window layout in Emacs

Tags:

emacs

I have setup my windows in a certain way. How do I save this setting to be invoked later?

like image 313
hekevintran Avatar asked Apr 03 '10 22:04

hekevintran


2 Answers

I sometimes still use C-x r w <register> to store a window configuration in a register, and C-x r j <register> (where <register> is a single character) to jump back to it.

While this is a nice way for storing a few window configurations which you want to go back to after some time, I find winner-mode to be more convenient in a few regards. (For example, you won't have to bother naming the configurations).

Just put (winner-mode 1) in your .emacs, bind winner-undo and winner-redo to convenient shortcuts (or use the IMHO awkward C-c <left> and C-c <right> predefined ones), and you'll be able to switch back to previous window configurations.

See also: M-: (info "(emacs) Window Convenience") and M-: (info "(emacs) RegConfig")

like image 94
danlei Avatar answered Sep 17 '22 08:09

danlei


I know you allready accepted an answer, however because I understand your question in another way (concerning layout) and this question showed up for me when I was in search for something to persist my emacs window layout, I would like to mention:

workgroups.el

which purpose is to save and restore the way, emacs windows are layed out and many more.

like image 35
einSelbst Avatar answered Sep 20 '22 08:09

einSelbst