[Gnus] Remove hook to reload notmuch cache before searching

We need another way to ensure the cache is always up to date.
This commit is contained in:
Daniel - 2018-11-17 20:17:02 +01:00
parent 8870030daa
commit 041a2b473f
Signed by: dbo
GPG Key ID: 4F63DB96D45AA9C6
1 changed files with 2 additions and 16 deletions

18
gnus.el
View File

@ -704,22 +704,8 @@ entry of the current mail."
(nntp . gmane)))
(use-package notmuch
:config (progn
;; (bind-key "GG" 'notmuch-search gnus-group-mode-map)
(defun db/notmuch-search-update-index (orig-fun &rest args)
"Update notmuch index before searching"
(message "Indexing new Mail...")
(shell-command "notmuch new --quiet 2>&1 | grep -v \"Note: Ignoring\"")
(message "Indexing new Mail... done.")
(apply orig-fun args))
(advice-add 'notmuch-search
:around #'db/notmuch-search-update-index)
(advice-add 'nnir-run-notmuch
:around #'db/notmuch-search-update-index)
(setq notmuch-fcc-dirs nil)))
:init (progn
(setq notmuch-fcc-dirs nil)))
;;;