Add some desktop.el settings

This commit is contained in:
Tom Willemse 2013-05-31 12:00:34 +02:00
parent 11f7eadc9f
commit 8921d40bf6

View file

@ -813,8 +813,8 @@
bind them to ~C-c u~ and ~C-c d~. bind them to ~C-c u~ and ~C-c d~.
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(global-set-key (kbd "C-c u") 'oni:upcase-prev) (global-set-key (kbd "C-c w u") 'oni:upcase-prev)
(global-set-key (kbd "C-c d") 'oni:downcase-prev) (global-set-key (kbd "C-c w d") 'oni:downcase-prev)
#+END_SRC #+END_SRC
* Turn off usage of tabs for vala-mode :vala: * Turn off usage of tabs for vala-mode :vala:
@ -1382,6 +1382,53 @@
(setq eap-playlist-library "~/music/playlists") (setq eap-playlist-library "~/music/playlists")
#+END_SRC #+END_SRC
* Don't close some more buffers :desktop:
Add some regular expressions to the "don't kill" list of the ~desktop~
module.
- Don't close my open jabber buffers, they start with ~+~. Don't
close the jabber roster buffer either.
- Don't close my org tasks files.
- Don't close any of my other ~*scratch-MODE*~ buffers.
- Don't close the IELM buffer.
#+BEGIN_SRC emacs-lisp
(eval-after-load 'desktop
'(setq desktop-clear-preserve-buffers
(append '("^++.*" "^dailies$" "^bookmarks.org$" "^contacts.org$"
"^work$" "^tasks$" "\\*ielm\\*" "\\*magit.*\\*"
"\\*-jabber-roster-\\*" "\\*scratch-.*\\*"
"\\*eshell\\*")
desktop-clear-preserve-buffers)))
#+END_SRC
* Don't save some more buffers :desktop:
Add some regular expressions to the "don't save" list of the ~desktop~
module.
#+BEGIN_SRC emacs-lisp
(eval-after-load 'desktop
'(setq desktop-files-not-to-save
(rx (or (regexp "\\(^/[^/:]*:\\|(ftp)$\\)")
(and "/" (or "dailies" "tasks" "bookmarks.org"
"contacts.org" "work") eol)))))
#+END_SRC
* Add some desktop keybindings :desktop:
As seen [[http://ericjmritz.wordpress.com/2013/05/28/emacs-desktops/][here]].
#+BEGIN_SRC emacs-lisp
(global-set-key (kbd "C-c d c") 'desktop-clear)
(global-set-key (kbd "C-c d d") 'desktop-change-dir)
(global-set-key (kbd "C-c d s") 'desktop-save)
#+END_SRC
* All the rest * All the rest
This still needs to be sorted out and documented, haven't had time This still needs to be sorted out and documented, haven't had time