diff --git a/init.org b/init.org index 8d24d99..a03e877 100644 --- a/init.org +++ b/init.org @@ -3124,15 +3124,6 @@ PR ideas :config (setq alert-fade-time 15)) #+END_SRC -**** mu4e-conversation -#+BEGIN_SRC emacs-lisp -(use-package mu4e-conversation - :disabled t - :ensure t - :after mu4e - :init (global-mu4e-conversation-mode)) -#+END_SRC - ** doc-view :viewer: #+BEGIN_SRC emacs-lisp (use-package doc-view @@ -5395,77 +5386,6 @@ nicked from wasamasa's init - https://github.com/wasamasa/dotemacs/blob/934d0b37 ;; (set-face-attribute 'default nil :font "-outline-Bitstream Vera Sans Mono-normal-normal-normal-mono-12-*-*-*-c-*-iso8859-1") #+END_SRC -* desktop - session management -https://emacs.stackexchange.com/questions/31621/handle-stale-desktop-lock-files-after-emacs-system-crash -#+BEGIN_SRC emacs-lisp -(defun my-remove-stale-lock-file (dir) - (let ((pid (desktop-owner dir))) - (when pid - (let (infile destination display) - (unless (= (call-process "ps" infile destination display "-p" - (number-to-string pid)) 0) - (let ((lock-file (desktop-full-lock-name dir))) - (delete-file lock-file))))))) -#+END_SRC - -#+BEGIN_SRC emacs-lisp -(use-package desktop - :disabled t - :init (desktop-save-mode t) - :config - (let ((dir (locate-user-emacs-file ""))) - (my-remove-stale-lock-file dir) - (setq desktop-path (list dir)) - (desktop-read)) - (desktop-auto-save-enable) - (setq desktop-dirname "~/.emacs.d/desktop-save/" - desktop-save 'ask-if-new - ;; don't save buffers, just the history - desktop-files-not-to-save "" - desktop-buffers-not-to-save "" - desktop-restore-frames nil) - (cl-loop for var in - '(grep-history - grep-find-history - find-args-history - extended-command-history - read-expression-history - default-input-method - input-method-history - query-replace-history - compile-history - string-rectangle-history - regexp-history - dired-shell-command-history - dired-regexp-history - shell-command-history - org-tags-history - minibuffer-history - erc-server-history-list - cp/activity-history - LaTeX-environment-history - swiper-history - counsel-M-x-history) - do (add-to-list 'desktop-globals-to-save var))) - -;; (add-to-list 'desktop-locals-to-save 'comint-input-ring) - -(defun cp/backup-desktop-file () - (let ((new-filename (->> (shell-command-to-string "date -Is") - (replace-regexp-in-string "\n" "") - (concat "~/.emacs.d/.emacs.desktop.")))) - (copy-file "~/.emacs.d/.emacs.desktop" new-filename))) -(defun cp/cleanup-desktop-backups () - (let ((desktop-file-backups (-> (concat "find ~/.emacs.d/ -maxdepth 1 -type f |" - " grep -E \"\.emacs\.desktop\.[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}[-+]?[0-9]{2}:?[0-9]{2}\"") - (shell-command-to-string )) ))) - (if (> 10 ))) -;; ;; this one created loads and loads of backups -;; (add-hook 'desktop-save-hook 'cp/backup-desktop-file) -;; ;; not enough space for this - wasteful -;; (add-hook 'kill-emacs-hook 'cp/backup-desktop-file) -#+END_SRC - * The end Reset the GC settings, so Emacs doesn't use up tons of RAM. #+BEGIN_SRC emacs-lisp