From dbe020299a9ffc10681a84e9d635f2ff8f96bd0a Mon Sep 17 00:00:00 2001 From: Ian Kelling Date: Thu, 25 Jan 2018 17:37:09 -0500 Subject: [PATCH] minor fixes --- my-init.org | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/my-init.org b/my-init.org index 6dcb7f1..d2e596f 100644 --- a/my-init.org +++ b/my-init.org @@ -1040,11 +1040,14 @@ and Ian Kelling as the name" ;; 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)) @@ -1057,7 +1060,7 @@ and Ian Kelling as the name" 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 -- 2.30.2