From 639fabe62dad8f52fc0f4a435ed0170c89624433 Mon Sep 17 00:00:00 2001 From: jao Date: Sun, 7 Dec 2025 13:49:16 +0000 Subject: nits --- custom/jao-custom-notmuch.el | 25 ++++++++++++++++++------- custom/jao-custom-org.el | 2 +- init.el | 4 ++-- lib/doc/jao-org-notes.el | 1 + 4 files changed, 22 insertions(+), 10 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) diff --git a/custom/jao-custom-org.el b/custom/jao-custom-org.el index 45c2aee..e73a99b 100644 --- a/custom/jao-custom-org.el +++ b/custom/jao-custom-org.el @@ -154,7 +154,7 @@ :after-finalize jao-org-after-capture-hook))) (org-capture-upgrade-templates org-capture-templates)) -(jao-org-capture-templates "inbox.org") +(with-eval-after-load "org-capture" (jao-org-capture-templates "inbox.org")) ;;; MIME and file apps (setq org-file-apps diff --git a/init.el b/init.el index c0bc104..fe69f12 100644 --- a/init.el +++ b/init.el @@ -748,8 +748,8 @@ (use-package wgrep :ensure t) ;;;; executable scripts -(add-hook 'after-save-hook - 'executable-make-buffer-file-executable-if-script-p) +;; (add-hook 'after-save-hook +;; 'executable-make-buffer-file-executable-if-script-p) ;;;; spaces, tabs, kill (setq kill-whole-line t) diff --git a/lib/doc/jao-org-notes.el b/lib/doc/jao-org-notes.el index 0b2c65b..4ec0221 100644 --- a/lib/doc/jao-org-notes.el +++ b/lib/doc/jao-org-notes.el @@ -237,6 +237,7 @@ appear in any order in the tags list. ;;;###autoload (defun jao-org-notes-setup (mnemonic) "Set up the notes system, providing a mnemonic char for its org template." + (require 'org-capture) (add-to-list 'org-capture-templates (jao-org-notes--template mnemonic)) (setq jao-org-notes--tags (jao-org-notes-all-tags)) (when (fboundp 'org-capture-upgrade-templates) -- cgit v1.2.3