;; on first run mkdir -p /nocow/user/.mufsf; mu index --maildir=/nocow/user/fsfmd
(defun mu-exit-wait ()
(interactive)
- (let ((wait (= 0 (call-process "/bin/pidof" nil nil nil "mu"))))
+ ;; taken from the mu source
+ (let* ((buf (get-buffer mu4e~proc-name))
+ (proc (and (buffer-live-p buf) (get-buffer-process buf))))
(mu4e-quit)
;; without sleep, we get database locked by another process error when hitting u
;; if another mu was running.
- (when wait (sleep-for 0 300))))
+ (if proc (sleep-for 0 1000))))
+
(defun fsf-mu4e ()
(interactive)
(unless (equal mu4e-maildir "/nocow/user/fsfmd") (mu-exit-wait))
user-mail-address "iank@fsf.org"
mail-signature "
---
+--
Ian Kelling | Senior Systems Administrator, Free Software Foundation
GPG Key: B125 F60B 7B28 7FF6 A2B7 DF8F 170A F0E2 9542 95DF
https://fsf.org | https://gnu.org