Advertisement
petersalazar

saving-things.el

May 19th, 2015
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lisp 2.17 KB | None | 0 0
  1. ;; Save all
  2. (add-hook 'org-mode-hook (lambda () (setq buffer-save-without-query t)))
  3. (add-hook 'org-mode-hook (lambda () (setq palimpsest-mode t)))
  4. (add-hook 'markdown-mode-hook (lambda () (setq buffer-save-without-query t)))
  5. (add-hook 'emacs-lisp-mode-hook (lambda () (setq buffer-save-without-query t)))
  6. (add-hook 'text-mode-hook (lambda () (setq buffer-save-without-query t)))
  7. (add-hook 'css-mode-hook (lambda () (setq buffer-save-without-query t)))
  8.  
  9. (define-hyper-key "s" 'save-some-buffers) ; save all
  10.  
  11.  
  12. ;; don't save org-agenda
  13. ;; doesn't work though, I get all kinds of org-agenda autosaves in my ~ home directory
  14. (add-hook 'org-agenda-mode-hook
  15.           (lambda ()
  16.             (add-hook 'auto-save-hook 'org-save-all-org-buffers nil t)
  17.             (auto-save-mode)))
  18.  
  19.  
  20.  
  21.  
  22.  
  23. ;;;; Ignore / Exclude Uninteresting Things
  24.  
  25. ;; Make Buffer-stack ignore uninteresting buffers
  26. (defun buffer-stack-filter-regexp (buffer)
  27.   "Non-nil if buffer is in buffer-stack-tracked."
  28.   (not (or (string-match "Help\\|minibuf\\|org2blog\\|echo\\|conversion\\|server\\|Messages\\|tex\\|Output\\|temp\\|autoload\\|Customize\\|address\\|clock\\|Backtrace\\|Completions\\|grep\\|Calendar\\|archive\\|Work\\|Compile\\|tramp\\|accountability\\|helm\\|Alerts\\|Minibuf\\|Agenda\\|Echo\\|gnugol\\|RNC\\|widget\\|acct\\|melpa\\|fontification\\|Helm\\|daycolate\\|*Warnings*\\|*tags*\\|*gnugol*\\|*guide-key*" (buffer-name buffer))
  29.        (member buffer buffer-stack-untracked))))
  30. (setq buffer-stack-filter 'buffer-stack-filter-regexp)
  31.  
  32. ;; make it so that recentf does not record the following uninteresting file types
  33. (add-to-list 'recentf-exclude "\\ido.last\\'")
  34. (add-to-list 'recentf-exclude "\\recent-addresses\\'")
  35. (add-to-list 'recentf-exclude "org-clock-save.el")
  36. (add-to-list 'recentf-exclude "*message*")
  37. (add-to-list 'recentf-exclude ".tex")
  38. (add-to-list 'recentf-exclude "helm")
  39. (add-to-list 'recentf-exclude "\\ido*")
  40. (add-to-list 'recentf-exclude "archive")
  41. (add-to-list 'recentf-exclude "agenda")
  42. (add-to-list 'recentf-exclude "gnugol")
  43.  
  44.  
  45. ;; in dired, omit certain filetypes
  46. ;; ido-ignore
  47. (setq
  48.  ido-ignore-files (quote ("\\`CVS/" "\\`#" "\\`.#" "\\`\\.\\./" "\\`\\./" "html" "*.mm" "Icon*" "*gz" "*ido.hist" "*archive*" "ics")))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement