mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-22 10:58:10 +01:00
emacs: Fix `notmuch-search-insert-field'
Compare the formatted version of the authors with the formatted sample string rather than the un-formatted authors with the formatted sample string.
This commit is contained in:
parent
e2516a343b
commit
6afa0b16a3
1 changed files with 7 additions and 5 deletions
|
@ -582,11 +582,13 @@ matching will be applied."
|
||||||
((string-equal field "count")
|
((string-equal field "count")
|
||||||
(insert (format (cdr (assoc field notmuch-search-result-format)) count)))
|
(insert (format (cdr (assoc field notmuch-search-result-format)) count)))
|
||||||
((string-equal field "authors")
|
((string-equal field "authors")
|
||||||
(insert (let ((sample (format (cdr (assoc field notmuch-search-result-format)) "")))
|
(insert (let* ((format-string (cdr (assoc field notmuch-search-result-format)))
|
||||||
(if (> (length authors)
|
(formatted-sample (format format-string ""))
|
||||||
(length sample))
|
(formatted-authors (format format-string authors)))
|
||||||
(concat (substring authors 0 (- (length sample) 4)) "... ")
|
(if (> (length formatted-authors)
|
||||||
(format (cdr (assoc field notmuch-search-result-format)) authors)))))
|
(length formatted-sample))
|
||||||
|
(concat (substring authors 0 (- (length formatted-sample) 4)) "... ")
|
||||||
|
formatted-authors))))
|
||||||
((string-equal field "subject")
|
((string-equal field "subject")
|
||||||
(insert (format (cdr (assoc field notmuch-search-result-format)) subject)))
|
(insert (format (cdr (assoc field notmuch-search-result-format)) subject)))
|
||||||
((string-equal field "tags")
|
((string-equal field "tags")
|
||||||
|
|
Loading…
Reference in a new issue