From 8921d40bf6e5c331fdbb406f45c3d48738f3f752 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Fri, 31 May 2013 12:00:34 +0200 Subject: Add some desktop.el settings --- emacs/init.org | 51 +++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file 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 -- cgit v1.2.3-54-g00ecf