diff options
| author | jao <jao@gnu.org> | 2025-12-07 13:49:16 +0000 |
|---|---|---|
| committer | jao <jao@gnu.org> | 2025-12-07 13:51:45 +0000 |
| commit | 639fabe62dad8f52fc0f4a435ed0170c89624433 (patch) | |
| tree | 08eaaf88c62bc6b81eb32224c2c027fb143e1da4 /custom/jao-custom-notmuch.el | |
| parent | 82065ce784427e6bbfd4e1c344beee3c614979d9 (diff) | |
| download | elibs-639fabe62dad8f52fc0f4a435ed0170c89624433.tar.gz elibs-639fabe62dad8f52fc0f4a435ed0170c89624433.tar.bz2 | |
nitsmain
Diffstat (limited to 'custom/jao-custom-notmuch.el')
| -rw-r--r-- | custom/jao-custom-notmuch.el | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/custom/jao-custom-notmuch.el b/custom/jao-custom-notmuch.el index 89bd217..2fa9be9 100644 --- a/custom/jao-custom-notmuch.el +++ b/custom/jao-custom-notmuch.el @@ -126,7 +126,7 @@ (defvar jao-notmuch-widened-searches nil) -(defun jao-notmuch-define-searches (s) +(defun jao-notmuch-define-searches (s &optional other) (jao-notmuch--set-new-search s) (setq notmuch-hello-sections nil @@ -140,6 +140,8 @@ ,(jao-notmuch--q "trove" "t") ,(jao-notmuch--q "local" "x"))) + (when other (jao-notmuch--def-searches (car other) (cdr other))) + (jao-notmuch--def-searches "news" (mapcar 'jao-notmuch--q-feed '(("fn" "news") @@ -417,6 +419,13 @@ (list (thread-last (replace-regexp-in-string jao-mail-clean-rx "" address) (replace-regexp-in-string " " ", "))))) +(defun jao-notmuch-open-in-mac-mail () + (interactive) + (jao-d-l + (when-let* ((id (ignore-errors (notmuch-show-get-message-id)))) + (jao-mac-open "message://%%3C%s%%3E" (substring id 3))) + (message "Only available in macs!"))) + (use-package notmuch-show :init (setq gnus-blocked-images "." @@ -439,12 +448,13 @@ :bind (:map notmuch-show-mode-map - (("h" . jao-notmuch-goto-tree-buffer) - ("r" . notmuch-show-reply) - ("R" . notmuch-show-reply-sender) - ("TAB" . jao-notmuch-show-next-button) - ([backtab] . jao-notmuch-show-previous-button) - ("RET" . jao-notmuch-show-ret)))) + (("h" . jao-notmuch-goto-tree-buffer) + ("r" . notmuch-show-reply) + ("R" . notmuch-show-reply-sender) + ("TAB" . jao-notmuch-show-next-button) + ([backtab] . jao-notmuch-show-previous-button) + ("RET" . jao-notmuch-show-ret) + ("M" . jao-notmuch-open-in-mac-mail)))) ;;; search (use-package notmuch-search @@ -591,6 +601,7 @@ ("k" . jao-notmuch-tree-read-thread) ("K" . jao-notmuch-tree-mark-all-read) ("N" . jao-notmuch-tree--forward) + ("M" . jao-notmuch-open-in-mac-mail) ("O" . notmuch-tree-toggle-order) ("o" . jao-notmuch-tree-widen-search) ("P" . jao-notmuch-tree--backward) |
