From a9bddfe4deba2054463b2569bd686f7b89865bb1 Mon Sep 17 00:00:00 2001 From: jao Date: Thu, 19 Aug 2021 21:12:50 +0100 Subject: notmuch: adjustments to message line format --- notmuch.org | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'notmuch.org') diff --git a/notmuch.org b/notmuch.org index 518832b..ff6553e 100644 --- a/notmuch.org +++ b/notmuch.org @@ -41,7 +41,8 @@ (setq notmuch-tree-result-format '(("date" . "%12s ") ("authors" . "%-35s") - ((("tree" . "%s ") ("subject" . "%s")) . " %-100s") + ;; ("subject" . " %-96s") + ((("tree" . " %s ") ("subject" . "%s")) . " %-100s") ("tags" . " (%s)")) notmuch-search-result-format '(("date" . "%12s ") @@ -283,12 +284,11 @@ notmuch-tree-no-match-tree-face)) (set-face-attribute f nil :family "Fira Code" :foreground fg))) - (defun jao-notmuch--format-field (fun field &rest args) - (let ((rs (apply fun field args))) + (defun jao-notmuch--format-field (fun field fmt msg) + (let ((rs (funcall fun field fmt msg))) (cond ((and (stringp field) (string= field "tree")) (replace-regexp-in-string "►" "" rs)) ;; "→" - ((not (stringp field)) (truncate-string-to-width rs 100)) - (t rs)))) + (t (truncate-string-to-width rs 102 nil nil t))))) (advice-add 'notmuch-tree-format-field :around #'jao-notmuch--format-field) -- cgit v1.2.3