[mu4e rfe] Improve `:thread-subject` field in `mu4e-header-info`
Is your feature request related to a problem? Please describe.
It's not a "problem", just a small idea to make things nicer. mu4e-header-info provides the field :thread-subject for use with a threaded header view which grants a cleaner view of the messages by removing redundancy, and makes the threads clearer to spot. I like it and use it.
However, sometimes I disable threading (with mu4e-headers-toggle-threading, P) to get a better grasp of the chronology of messages, in which case :thread-subject gives poor results (completely empty subject for all messages).
Describe the solution you'd like
I'd like to suggest :thread-subject fall back to :subject when threading is disabled (that is, when mu4e-search-threads is nil). Which can be done by a simple conditional in mu4e~headers-thread-subject.
Describe alternatives you've considered
For personal use, I have defined :subject-maybe-thread in mu4e-header-info-custom which I feed to mu4e-headers-fields:
(add-to-list 'mu4e-header-info-custom
'(:subject-maybe-thread
. (:name "Subject"
:shortname "Subject"
:help "Subject of the message"
:function (lambda (msg)
(if mu4e-search-threads
(mu4e~headers-field-value msg :thread-subject)
(mu4e~headers-field-value msg :subject))))))
It works fine, of course. I'm just suggesting this would be a more meaningful behavior for the default :thread-subject.
Additional context
Sounds like a good idea
Hi, @djcb . Nice, thanks for considering. Since this one is trivial, I'm not sure what is most convenient for you. But, if you prefer, I can volunteer a PR, just let me know. (I just don't have FSF papers, I'm not sure if this is a problem for mu/mu4e).
Thanks for the offer :) but I just added a fix for this. Don't need FSF paperwork for mu/mu4e :-)
Thank you! :-)