((string-equal field "count")
(insert (format (cdr (assoc field notmuch-search-result-format)) count)))
((string-equal field "authors")
- (insert (let ((sample (format (cdr (assoc field notmuch-search-result-format)) "")))
- (if (> (length authors)
- (length sample))
- (concat (substring authors 0 (- (length sample) 4)) "... ")
- (format (cdr (assoc field notmuch-search-result-format)) authors)))))
+ (insert (let* ((format-string (cdr (assoc field notmuch-search-result-format)))
+ (formatted-sample (format format-string ""))
+ (formatted-authors (format format-string authors)))
+ (if (> (length formatted-authors)
+ (length formatted-sample))
+ (concat (substring authors 0 (- (length formatted-sample) 4)) "... ")
+ formatted-authors))))
((string-equal field "subject")
(insert (format (cdr (assoc field notmuch-search-result-format)) subject)))
((string-equal field "tags")