Skip to content

Commit

Permalink
integrate Project-mode with Desktop-mode
Browse files Browse the repository at this point in the history
  • Loading branch information
kumarshantanu committed Jun 15, 2012
1 parent 8cfc7c0 commit c08b9bb
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .emacs.d/username.el
Expand Up @@ -191,6 +191,20 @@
(project-mode 1)


;; Desktop-mode + Project-mode integration (tabs are auto-saved/restored)
;; adapted - http://code.google.com/p/ergoemacs/source/browse/trunk/ergoemacs/init_settings.el
;; adapted - http://stackoverflow.com/questions/10795988/emacs-desktop-save-mode-startup-error
(defun my-project-open ()
(interactive)
(project-open)
(when (project-current)
(desktop-save-mode 1)
(setq desktop-save t)
(setq desktop-load-locked-desktop t)
(desktop-read)))
(global-set-key (kbd "s-r") 'my-project-open) ;; open project with Cmd-r


;; nav - http://code.google.com/p/emacs-nav/
;; Uncomment lines below as needed
;(add-to-list 'load-path "~/.emacs.shantanu.d/emacs-nav-20110220")
Expand Down

0 comments on commit c08b9bb

Please sign in to comment.