From a6b1206cf9ad8cdc1f2e579c141127e7a8341015 Mon Sep 17 00:00:00 2001 From: Levi Neely <141506390+lneely@users.noreply.github.com> Date: Thu, 26 Sep 2024 20:21:41 +0200 Subject: [PATCH] sync mail func --- emacs/module/module-notmuch.el | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/emacs/module/module-notmuch.el b/emacs/module/module-notmuch.el index f559092..861cef4 100644 --- a/emacs/module/module-notmuch.el +++ b/emacs/module/module-notmuch.el @@ -17,6 +17,17 @@ user-mail-address "me@lkn.uber.space" user-full-name "Levi Neely") +(defun sync-and-index-mail () + "Synchronize mail using mbsync and index with notmuch." + (interactive) + (let ((default-directory "~/")) + (message "Syncing mail...") + (shell-command "mbsync uberspace >/dev/null") + (message "Indexing mail...") + (shell-command "notmuch new >/dev/null") + (message "Mail sync and indexing completed."))) + +(global-set-key (kbd "C-x M") 'sync-and-index-mail) (provide 'module-notmuch) ;;; module-qt.el ends here.