diff options
author | jao <jao@gnu.org> | 2021-04-18 02:55:22 +0100 |
---|---|---|
committer | jao <jao@gnu.org> | 2021-04-18 02:56:13 +0100 |
commit | 7d8344ac8af19d7a88c3547fa0ab8ced01135e86 (patch) | |
tree | 490eb7b83a077b59ac51f3ca7c0e7245d7d17173 /gnus.org | |
parent | 8ea756c5d0ff541d33fb1be56d4c53a0b12f90e4 (diff) | |
download | elibs-7d8344ac8af19d7a88c3547fa0ab8ced01135e86.tar.gz elibs-7d8344ac8af19d7a88c3547fa0ab8ced01135e86.tar.bz2 |
email.org, with some notmuch fine-tuning
Diffstat (limited to 'gnus.org')
-rw-r--r-- | gnus.org | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -12,6 +12,28 @@ (defvar jao-gnus-use-nnml nil) (defvar jao-gnus-use-maildirs nil) #+end_src +* Startup and kill + #+begin_src emacs-lisp + ;;;;; close gnus when closing emacs, but ask when exiting + (setq gnus-interactive-exit t) + + (defun jao-gnus-started-hook () + (add-hook 'before-kill-emacs-hook 'gnus-group-exit)) + + (add-hook 'gnus-started-hook 'jao-gnus-started-hook) + + (defun jao-gnus-after-exiting-hook () + (remove-hook 'before-kill-emacs-hook 'gnus-group-exit)) + + (add-hook 'gnus-after-exiting-gnus-hook 'jao-gnus-after-exiting-hook) + + ;; define a wrapper around the save-buffers-kill-emacs + ;; to run the new hook before: + (defadvice save-buffers-kill-emacs + (before my-save-buffers-kill-emacs activate) + "Install hook when emacs exits before emacs asks to save this and that." + (run-hooks 'before-kill-emacs-hook)) + #+end_src * Looks *** Verbosity #+begin_src emacs-lisp |