diff options
| author | Simon Parri <simonparri@ganzeria.com> | 2025-10-16 11:44:09 -0500 |
|---|---|---|
| committer | Simon Parri <simonparri@ganzeria.com> | 2025-10-16 11:44:09 -0500 |
| commit | c0c417233691a9c286f642e1503b5eeee103661d (patch) | |
| tree | a8be3509488a29364fab83a48bc394aae622b1cb | |
| parent | ce8fb270d7f8107a9452b035f7030cc7fc2c3c4c (diff) | |
| download | dotfiles-c0c417233691a9c286f642e1503b5eeee103661d.tar.gz dotfiles-c0c417233691a9c286f642e1503b5eeee103661d.zip | |
Emacs: Make `my/mbsync' call mbsync asynchronously
| -rw-r--r-- | common/.emacs.d/init.el | 7 |
1 files changed, 6 insertions, 1 deletions
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 "<f5>" 'my/mbsync) |
