summaryrefslogtreecommitdiffhomepage
path: root/gnus.org
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2021-04-18 02:55:22 +0100
committerjao <jao@gnu.org>2021-04-18 02:56:13 +0100
commit7d8344ac8af19d7a88c3547fa0ab8ced01135e86 (patch)
tree490eb7b83a077b59ac51f3ca7c0e7245d7d17173 /gnus.org
parent8ea756c5d0ff541d33fb1be56d4c53a0b12f90e4 (diff)
downloadelibs-7d8344ac8af19d7a88c3547fa0ab8ced01135e86.tar.gz
elibs-7d8344ac8af19d7a88c3547fa0ab8ced01135e86.tar.bz2
email.org, with some notmuch fine-tuning
Diffstat (limited to 'gnus.org')
-rw-r--r--gnus.org22
1 files changed, 22 insertions, 0 deletions
diff --git a/gnus.org b/gnus.org
index 58ef9d3..44a5b8e 100644
--- a/gnus.org
+++ b/gnus.org
@@ -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