I use emacs for working on various projects in different programming languages. While working on those projects, I modify the environment a lot. Most notably, I split the window in a specific way, load a lot of files and sometimes change the mode on those files.

Everytime I start working on a project, I have to make those same changes. Furthermore, changing between the projects is a pain.

While I know of desktop-mode, it doesn't solve problems like window splitting.

What I would like to have is something like eclipse offers with its workspaces: On start of the program, it asks for a workspace and, if one is existant, restores the previous look and feel.

How do you achieve something similar? If you use one of the many workspace/project-hooks, which hook do you prefer and why?

asked 18 May '10, 16:26

Jazz's gravatar image

Jazz ♦
7811312
accept rate: 33%




For the time being, I ended up with revive.el.

A short description:
Revive.el saves current editing status including the window splitting configuration, which can't be recovered by 'desktop.el' nor by 'saveconf.el', into a file and reconstructs that status correctly.

In other words, it recovers all your buffers in the windows you left them.

To get revive.el running, just copy those lines into your .emacs file:

(add-to-list 'load-path "~/EmacsEL/") ;;The path where you store your *.el files
(load "revive")
(autoload 'save-current-configuration "revive" "Save status" t)
(autoload 'resume "revive" "Resume Emacs" t)
(autoload 'wipe "revive" "Wipe Emacs" t)
;;Keyboard shortcuts
(define-key ctl-x-map "S" 'save-current-configuration)
(define-key ctl-x-map "F" 'resume)
(define-key ctl-x-map "K" 'wipe)

After "installing", you can use the following keyboard shortcuts:
To save your configuration: C-u C-x S
To load the configuration: C-u C-x F

You can also specify a buffer number after C-u (e.g.: C-u 2 C-x S), to store your configuration in a certain buffer.

Still, let me know if you found something better! :)

link

answered 20 May '10, 11:39

Jazz's gravatar image

Jazz ♦
7811312
accept rate: 33%

I haven't tried any of these out myself (I probably will after posting this), but I found a ton of results on emacswiki.

http://www.emacswiki.org/emacs/WindowsAndRegisters

http://www.emacswiki.org/emacs/TaskMode

http://www.emacswiki.org/emacs/LayoutRestore

http://www.emacswiki.org/emacs/WorkSpaces

Happy Hacking (-:

link

answered 20 May '10, 01:10

Johnathan%20Lanke's gravatar image

Johnathan Lanke
212
accept rate: 0%

Thank you for the links! I did, too, find a lot of workspace solutions while searching for one. Still, all of them were missing some feature I wanted. With so many options, I wanted to know what people think is the best one, without having to try all of them.

WindowsAndRegisters looks promising! If you've tried it, let me know! :)

(20 May '10, 11:28) Jazz ♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×5
×2
×2
×1

Asked: 18 May '10, 16:26

Seen: 40,856 times

Last updated: 20 May '10, 11:39

powered by OSQA