diff options
author | JSDurand <mmemmew@gmail.com> | 2022-11-07 21:33:01 +0800 |
---|---|---|
committer | JSDurand <mmemmew@gmail.com> | 2022-11-07 21:33:01 +0800 |
commit | 687a1fa8890da895c830177826c4258d9843fcb7 (patch) | |
tree | b514bc3a986a181ce233accb7979c53159c00438 /mail.el | |
parent | 403b6278226d765470c11d1ceb709c45cb4457c9 (diff) |
mail + gnus: update notmuch database as well
* mail.el (durand-mail-update-hook, durand-mail-update-sentinel): Add
a hook to run after the update is finished.
* gnus-conf.el (mu4e-index-updated-hook, durand-mail-update-hook): Let
notmuch know about updated mails as well.
Diffstat (limited to 'mail.el')
-rw-r--r-- | mail.el | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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) |