From b89f452564387368b6f7f6fc4ded8ce65c27146d Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Fri, 13 Jan 2023 22:52:30 -0600 Subject: Fleoo --- lisp/acdw-mail.el | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'lisp/acdw-mail.el') diff --git a/lisp/acdw-mail.el b/lisp/acdw-mail.el index d0ee28e..9545808 100644 --- a/lisp/acdw-mail.el +++ b/lisp/acdw-mail.el @@ -3,6 +3,7 @@ ;;; Code: (require 'cl-lib) +(require 'message) ;;; Variables @@ -56,6 +57,7 @@ Useful in `message-send-hook'." "Concatenate `notmuch' QUERIES with AND." (mapconcat #'identity queries " AND ")) +;;;###autoload (defun +notmuch-goto (&optional prefix) "Perform a saved `notmuch' search. Without a PREFIX argument, perform the first search in @@ -91,7 +93,7 @@ reversing the tag changes." (when (eq start end) (notmuch-search-next-thread))) -(defun +notmuch-tree-mark-spam (&optional ham) +(defun +notmuch-tree-mark-spam (&optional ham _ _) "Mark the current message as spam. That is, add the tags in `+notmuch-spam-tags' to the message. With an optional HAM argument (interactively, @@ -152,6 +154,7 @@ the saved search as well." :preface (defdir notmuch/ (sync/ "emacs/notmuch/") "Notmuch configuration directory." :makedir) + :bind (("C-c m" . notmuch-mua-new-mail)) :config ;; Options (setopt notmuch-init-file (notmuch/ "notmuch-init.el" t) @@ -172,8 +175,6 @@ the saved search as well." message-envelope-from 'header notmuch-saved-searches nil) ;; Key bindings - (keymap-global-set "C-c m" #'nomtuch-mua-new-mail) - (keymap-global-set "C-c n" #'+notmuch-goto) (keymap-set notmuch-search-mode-map "!" #'+notmuch-search-mark-spam) (keymap-set notmuch-search-mode-map "RET" #'notmuch-search-show-thread) (keymap-set notmuch-search-mode-map "M-RET" #'notmuch-tree-from-search-thread) @@ -197,7 +198,7 @@ the saved search as well." "tag:draft") (+notmuch-define-saved-search "all mail" "a" 'tree "*") ;; Hooks and advice - (add-hook 'message-send-hook #'+message-send-dispatch-rules) + (add-hook 'message-send-hook #'+message-send-set-variables) (add-hook 'message-setup-hook #'+message-signature-setup) (autoload 'visual-fill-column-mode "visual-fill-column" nil t) (add-hook 'notmuch-message-mode-hook #'visual-fill-column-mode) @@ -214,13 +215,14 @@ This version doesn't add any initial-input." "Make `notmuch-mua-new-reply' list-aware." (let ((ml (notmuch-show-get-header :List-Post))) (apply orig r) + (require 'message) (when ml (with-buffer-modified-unmodified (message-remove-header "To") (message-add-header (format "To: %s" (replace-regexp-in-string "" "\\1" ml))) - (messgage-goto-body))))) + (message-goto-body))))) (define-advice notmuch-tag (:filter-args (args) trim) "Trim whitespace from ends of tags." -- cgit 1.4.1-21-gabe81