Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 674202 - mail-client/mutt-1.11.1 - remove obviated patches features-common/0003-feature-nested-if.patch features-common/0004-feature-cond-date.patch
Summary: mail-client/mutt-1.11.1 - remove obviated patches features-common/0003-featur...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Fabian Groffen
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-31 20:48 UTC by Kevin J. McCarthy
Modified: 2019-01-02 10:56 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin J. McCarthy 2018-12-31 20:48:48 UTC
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.
Comment 1 Fabian Groffen gentoo-dev 2019-01-01 14:50:24 UTC
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.
Comment 2 Fabian Groffen gentoo-dev 2019-01-01 16:06:00 UTC
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)?"
Comment 3 Kevin J. McCarthy 2019-01-01 17:44:47 UTC
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?
Comment 4 Fabian Groffen gentoo-dev 2019-01-01 19:31:35 UTC
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.
Comment 5 Fabian Groffen gentoo-dev 2019-01-02 10:01:36 UTC
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.
Comment 6 Larry the Git Cow gentoo-dev 2019-01-02 10:54:38 UTC
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(-)