summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tom Willemse2013-05-31 12:00:34 +0200
committerGravatar Tom Willemse2013-05-31 12:00:34 +0200
commit8921d40bf6e5c331fdbb406f45c3d48738f3f752 (patch)
tree840582247b2c25ecf8f046271e53c385b92f8a5a
parent11f7eadc9ff86ad27e6ad8ae9aeb5097addf41af (diff)
downloaddotfiles-8921d40bf6e5c331fdbb406f45c3d48738f3f752.tar.gz
dotfiles-8921d40bf6e5c331fdbb406f45c3d48738f3f752.zip
Add some desktop.el settings
-rw-r--r--emacs/init.org51
1 files changed, 49 insertions, 2 deletions
diff --git a/emacs/init.org b/emacs/init.org
index a13aeaf..9d5ccf7 100644
--- a/emacs/init.org
+++ b/emacs/init.org
@@ -813,8 +813,8 @@
bind them to ~C-c u~ and ~C-c d~.
#+BEGIN_SRC emacs-lisp
- (global-set-key (kbd "C-c u") 'oni:upcase-prev)
- (global-set-key (kbd "C-c d") 'oni:downcase-prev)
+ (global-set-key (kbd "C-c w u") 'oni:upcase-prev)
+ (global-set-key (kbd "C-c w d") 'oni:downcase-prev)
#+END_SRC
* Turn off usage of tabs for vala-mode :vala:
@@ -1382,6 +1382,53 @@
(setq eap-playlist-library "~/music/playlists")
#+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
This still needs to be sorted out and documented, haven't had time