Skip to content

Instantly share code, notes, and snippets.

@baron
Created December 23, 2010 03:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save baron/752534 to your computer and use it in GitHub Desktop.
Save baron/752534 to your computer and use it in GitHub Desktop.
(defun write-revive-file ()
(interactive)
(let ((file "~/.emacsresume"))
(with-temp-buffer
(insert (prin1-to-string (current-window-configuration-printable)))
(when (file-writable-p file)
(write-region (point-min)
(point-max)
file)))))
(defun read-revive-file ()
(interactive)
(let ((file "~/.emacsresume"))
(with-temp-buffer
(insert-file-contents file)
(restore-window-configuration (read (buffer-string))))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment