diff options
| author | Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> | 2022-12-08 21:52:32 +0200 |
|---|---|---|
| committer | Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> | 2022-12-08 21:55:27 +0200 |
| commit | 093efefb985ad06170d89a29e20bbdae38732f0a (patch) | |
| tree | 5dead7779f0793363899b7000cdb5f9d86363938 | |
| parent | 9f50ad9cf5f4bc3dfaab132a99c0bbf3a6f7cb1a (diff) | |
mu4e-headers: fallback to :subject for :thread-subject
If we're not showing threads, use the normal subject.
Fixes #2341.
| -rw-r--r-- | mu4e/mu4e-headers.el | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/mu4e/mu4e-headers.el b/mu4e/mu4e-headers.el index f0c7838..daa321c 100644 --- a/mu4e/mu4e-headers.el +++ b/mu4e/mu4e-headers.el @@ -567,7 +567,7 @@ and `mu4e-headers-time-format'." Otherwise, return the thread-prefix without the subject-text. In other words, show the subject of a thread only once, similar to e.g. \"mutt\"." - (let* ((tinfo (mu4e-message-field msg :meta)) + (let* ((tinfo (mu4e-message-field msg :meta)) (subj (mu4e-msg-field msg :subject))) (concat ;; prefix subject with a thread indicator (mu4e~headers-thread-prefix tinfo) @@ -600,7 +600,10 @@ found." ;; work-around: emacs' display gets really slow when lines are too long; ;; so limit subject length to 600 (truncate-string-to-width val 600))) - (:thread-subject (mu4e~headers-thread-subject msg)) + (:thread-subject ;; if not searching threads, fall back to :subject + (if mu4e-search-threads + (mu4e~headers-thread-subject msg) + (mu4e~headers-field-value msg :subject))) ((:maildir :path :message-id) val) ((:to :from :cc :bcc) (mu4e~headers-contact-str val)) ;; if we (ie. `user-mail-address' is the 'From', show |
