Refresh the eww message count whenever a message is updated in mu4e
This commit is contained in:
parent
719a2ffac7
commit
6a1d358548
12
init.el
12
init.el
@ -530,6 +530,13 @@ printed representation (via `princ') set as the new value for the key."
|
|||||||
(when cfg-dir
|
(when cfg-dir
|
||||||
(setq args (nconc (list "-c" cfg-dir) args)))
|
(setq args (nconc (list "-c" cfg-dir) args)))
|
||||||
(apply 'call-process "eww" nil 0 nil args)))
|
(apply 'call-process "eww" nil 0 nil args)))
|
||||||
|
(defun my/eww-poll-variables (&rest vars)
|
||||||
|
"Poll each variable in VARS, which is a lists of strings or symbols."
|
||||||
|
(let* ((args (cons "poll" (mapcar #'(lambda (elt) (format "%s" elt)) vars)))
|
||||||
|
(cfg-dir (my/eww-current-config-dir)))
|
||||||
|
(when cfg-dir
|
||||||
|
(setq args (nconc (list "-c" cfg-dir) args)))
|
||||||
|
(apply 'call-process "eww" nil 0 nil args)))
|
||||||
|
|
||||||
;; mozc
|
;; mozc
|
||||||
(require 'mozc nil t)
|
(require 'mozc nil t)
|
||||||
@ -2647,6 +2654,11 @@ The name is compared with the field name using TESTFN (defaults to `equal')."
|
|||||||
(mu4e-alert-set-default-style 'libnotify))
|
(mu4e-alert-set-default-style 'libnotify))
|
||||||
(mu4e t)
|
(mu4e t)
|
||||||
(mu4e-context-switch nil "Personal")
|
(mu4e-context-switch nil "Personal")
|
||||||
|
;; refresh the eww message count
|
||||||
|
(defun my/-mu4e-eww-refresh-unread-count ()
|
||||||
|
"Refresh the eww unread message count."
|
||||||
|
(my/eww-poll-variables "mu4e"))
|
||||||
|
(add-hook 'mu4e-message-changed-hook #'my/-mu4e-eww-refresh-unread-count)
|
||||||
|
|
||||||
;; mu4e compose HTML messages
|
;; mu4e compose HTML messages
|
||||||
(use-package org-mime)
|
(use-package org-mime)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user