diff options
| author | jao <jao@gnu.org> | 2021-09-09 03:57:21 +0100 | 
|---|---|---|
| committer | jao <jao@gnu.org> | 2021-09-09 03:57:21 +0100 | 
| commit | 35d24f4590ad3576fc4be8944013448bd2e4ced0 (patch) | |
| tree | ea4f2c081e060f1aea0e70192bddb61e91a72c02 | |
| parent | aa3ca5e0f446fc06346a49b0cdd4ce1080a0d0e1 (diff) | |
| download | elibs-35d24f4590ad3576fc4be8944013448bd2e4ced0.tar.gz elibs-35d24f4590ad3576fc4be8944013448bd2e4ced0.tar.bz2  | |
jao-notmuch: notmuch-*-format-field got functions!
| -rw-r--r-- | lib/net/jao-notmuch.el | 7 | ||||
| -rw-r--r-- | notmuch.org | 10 | 
2 files changed, 5 insertions, 12 deletions
diff --git a/lib/net/jao-notmuch.el b/lib/net/jao-notmuch.el index 6039238..9a8ba5c 100644 --- a/lib/net/jao-notmuch.el +++ b/lib/net/jao-notmuch.el @@ -195,13 +195,6 @@  (setq mm-text-html-renderer #'jao-w3m-gnus-html-renderer) -;;;; Using arbitrary functions as "fields" in notmuch-tree-result-format - -(defun jao-notmuch--format-field (fun field fmt msg) -  (if (symbolp field) (funcall field msg) (funcall fun field fmt msg))) - -(advice-add 'notmuch-tree-format-field :around #'jao-notmuch--format-field) -  ;;;; Keeping track of unread messages in current tree view  (defvar-local jao-notmuch--query-name nil) diff --git a/notmuch.org b/notmuch.org index cbfee86..435a617 100644 --- a/notmuch.org +++ b/notmuch.org @@ -156,7 +156,7 @@        (when (eq 'notmuch jao-afio-mail-function)          (setq message-directory "~/var/mail/"                message-auto-save-directory "/tmp" -              mail-user-agent 'sendmail-user-agent)) +              mail-user-agent 'message-user-agent))        :bind (:map notmuch-common-keymap               (("E" . jao-notmuch-open-enclosure) @@ -305,7 +305,7 @@        (defun jao-notmuch--truncate (x)          (truncate-string-to-width (format "%-102s" x) 102 nil nil t)) -      (defun jao-notmuch--msg-ticks (msg) +      (defun jao-notmuch--msg-ticks (_ msg)          (let ((headers (plist-get msg :headers)))            (cond ((string-match-p jao-mails-regexp (or (plist-get headers :To) ""))                   (propertize " »" 'face 'notmuch-tree-match-tree-face)) @@ -313,7 +313,7 @@                   (propertize " ¬" 'face 'notmuch-tree-match-tree-face))                  (t "  ")))) -      (defun jao-notmuch--tree-subject (msg) +      (defun jao-notmuch--tree-subject (_ msg)          (thread-first '(("tree" . " %s") ("subject" . " %s"))            (notmuch-tree-format-field-list msg)            (jao-notmuch--truncate))) @@ -321,8 +321,8 @@        (setq notmuch-tree-result-format              '(("date" . "%12s  ")                ("authors" . "%-35s") -              (jao-notmuch--msg-ticks) -              (jao-notmuch--tree-subject) +              (jao-notmuch--msg-ticks . "%s") +              (jao-notmuch--tree-subject . "%s")                ("tags" . "  (%s)"))              notmuch-unthreaded-result-format notmuch-search-result-format              consult-notmuch-result-format  | 
