diff options
-rw-r--r-- | gnus-conf.el | 6 | ||||
-rw-r--r-- | mail.el | 8 |
2 files changed, 10 insertions, 4 deletions
diff --git a/gnus-conf.el b/gnus-conf.el index 150b4e9..3affe4f 100644 --- a/gnus-conf.el +++ b/gnus-conf.el @@ -143,17 +143,17 @@ ;; (defalias 'durand-update-mail #'mu4e-update-mail-and-index) -;; Load mail configurations +;;;; Load mail configurations (load-config "mail.el") -;; Let notmuch know about the changes automatically. +;;;; Let notmuch know about the changes automatically. (load-config "notmuch-conf.el") (require 'notmuch) -(add-hook 'mu4e-index-updated-hook #'notmuch-poll) +(add-hook 'durand-mail-update-hook #'notmuch-poll) (define-key gnus-group-mode-map (vector 117) #'durand-mail-update) (define-key global-map (vector ?\C-c ?g) 'gnus) @@ -264,10 +264,16 @@ mails." (set-marker (process-mark process) (point-max) buffer)))))))) +(defvar durand-mail-update-hook nil + "The hook run after the process that updates mails is finished.") + (defun durand-mail-update-sentinel (process status) - "Handle STATUS changes of the PROCESS for updating mails." + "Handle STATUS changes of the PROCESS for updating mails. +This funciton runs the hook `durand-mail-update-hook' after the +PROCESS is finished." (cond ((string= status "finished\n") + (run-hooks 'durand-mail-update-hook) (let ((buffer (process-buffer process))) (cond ((buffer-live-p buffer) |