From c0c417233691a9c286f642e1503b5eeee103661d Mon Sep 17 00:00:00 2001 From: Simon Parri Date: Thu, 16 Oct 2025 11:44:09 -0500 Subject: Emacs: Make `my/mbsync' call mbsync asynchronously --- common/.emacs.d/init.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/common/.emacs.d/init.el b/common/.emacs.d/init.el index 6b99704..32793d8 100644 --- a/common/.emacs.d/init.el +++ b/common/.emacs.d/init.el @@ -2039,7 +2039,12 @@ buffer's text scale." (defun my/mbsync (&optional arg) (interactive "P") (kill-buffer (get-buffer-create " *mbsync*")) - (call-process-shell-command "mbsync -a; mu index" nil " *mbsync*" arg)) + (let ((p (start-process-shell-command "mbsync" " *mbsync*" "mbsync -a; mu index"))) + (set-process-sentinel + p (lambda (p _) + (ignore _) + (unless (process-live-p p) + (message "mbsync done")))))) (keymap-set gnus-group-mode-map "" 'my/mbsync) -- cgit v1.2.3