The patches features-common/0003-feature-nested-if.patch and features-common/0004-feature-cond-date.patch have been implemented in a different way upstream. Please see http://www.mutt.org/doc/manual/#index-format-hook and the "Dynamic $index_format Content" section in http://www.mutt.org/relnotes/1.11/ If you feel strongly these patches are still needed, of course feel free to keep them. :-) But I believe the index-format-hook and the new $index_format expando %@name@ provide a clearer and more powerful way to achieve the same thing, and don't have any plans to merge those patches in.
Thanks for checking it out. I'm going to see if I can "translate" my config to 1.11.1 dynamic content. If that works, I'll drop the patches as you suggest.
set index_format = "%@reldate@ %Z %-21.21F %?M?+& ?%s %* %?M?[%M]&(%c)?"" index-format-hook reldate "%d<12H" "%[%H:%M ]" # show time index-format-hook reldate "%d<7d" "%[!%a-%d]" # show day of week-day index-format-hook reldate "%d<12m" "%[!%d-%b]" # show day-month index-format-hook reldate "~A" "%[!%b-%y]" # show month-year Seems to result in two question marks before and two after the date printed. I need to figure out why that is. I'm not sure about the order of the hooks, nothing is mentioned about first hit or overrides. Above is my translation for the original "smart date": #set index_format = "%[%Q] %Z %-21.21F %?M?+& ?%s %* %?M?[%M]&(%c)?" and then the if-conditional-based one: #set index_format = "%<[12m?%<[7d?%<[12H?%[%H:%M ]&%[!%a-%d]>&%[!%d-%b]>&%[!%b- %y]> %Z %-21.21F %?M?+& ?%s %* %?M?[%M]&(%c)?"
I see no question marks with your example config (against vanilla mutt HEAD, not the gentoo package). Perhaps it's something with the index coloring patch? You could try a simpler substitution: $index_format = "%@test@" index-format-hook test "~A" "hello" As for ordering, the documentation under manual/#index-format-hook says: "Matching is done in the order specified in the .muttrc, with the first match being used. [...] Because the first match is used, best practice is to put a catch-all ~A pattern as the last hook." I'm not familiar with the "smart date" option. Is that another patch, or an extension to strftime?
I tried on Darwin (macOS) and Solaris (SunOS) just to be sure, but relied too much on the state of things. This indeed is introduced by features-extra/0004-feature-index-color. The feature seems to work fine.
Problem found, due to colouring, escape codes were in the expanded hook format. They showed up as question marks. I think I got this fixed now. Next revision will no longer include the nested-if and cond-date patches.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3df596d62c4acc8e63139433ac8241b93931bd8a commit 3df596d62c4acc8e63139433ac8241b93931bd8a Author: Fabian Groffen <grobian@gentoo.org> AuthorDate: 2019-01-02 10:54:07 +0000 Commit: Fabian Groffen <grobian@gentoo.org> CommitDate: 2019-01-02 10:54:25 +0000 mail-client/mutt: revbump to fix some patches Bug: https://bugs.gentoo.org/674176 Bug: https://bugs.gentoo.org/674202 Signed-off-by: Fabian Groffen <grobian@gentoo.org> Package-Manager: Portage-2.3.51, Repoman-2.3.11 mail-client/mutt/Manifest | 2 +- mail-client/mutt/{mutt-1.11.1.ebuild => mutt-1.11.1-r1.ebuild} | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-)