Giter Club home page Giter Club logo

Comments (15)

hsanson avatar hsanson commented on September 25, 2024 1

To fully reproduce my index_format you will need the following config. Note I use nerdfonts for the tag-transforms but Github does so ensure to have a font that supports them or replace them with glyphs your font supports.

##########################################
# Nice icon fonts
##########################################
tag-transforms "attachment" "" \
               "encrypted"  "" \
               "signed"     "" \
               "amazon"     "" \
               "gitlab"     "" \
               "git"        "" \
               "youtube"    "" \
               "calendar"   "" \
               "list"       "" \
               "redmine"    "" \
               "replied"    "" \
               "sent"       "" \
               "flagged"    "" \
               "unread"     "" \
               "killed"     "" \
               "spam"       "" \
               "draft"      "" \
               "inbox"      "" \
               "zabbix"     ""

color index_tag red default "killed"
color index_tag red default "spam"
color index_tag cyan default "flagged"
color index_tag magenta default "zabbix"

##########################################
# Notmuch tag to format tag mapping
##########################################
tag-formats    "attachment" "Ga" \
               "encrypted"  "Ge" \
               "signed"     "GS" \
               "amazon"     "GA" \
               "gitlab"     "GG" \
               "git"        "Gg" \
               "youtube"    "Gy" \
               "calendar"   "Gc" \
               "list"       "Gl" \
               "redmine"    "GR" \
               "replied"    "Gr" \
               "sent"       "Gn" \
               "flagged"    "Gf" \
               "unread"     "Gu" \
               "killed"     "Gk" \
               "spam"       "Gs" \
               "draft"      "Gd" \
               "inbox"      "Gi" \
               "zabbix"     "Gz"

#########################################
# Index format
#

# Show number of messages in collapsed thread.
set index_format="%2M "

# Show either killed, spam, or inbox tag.
set index_format+="%<Gk?%Gk&%<Gs?%Gs&%<Gd?%Gd&%1Gi>>> "

# Show message flags.
set flag_chars="     "
set index_format+="%S "

# Show dates format depending on how old they are:
#
#  Hours old:     10:38
#  Days old:       金25日
#  Months old:    1月03日
#  Years old:    19年12月
set index_format+="%<[y?%<[m?%<[d?%[%-5H:%M]&%[(%-1a)%2d日]>&%[%-5b%2d日]>&%[%y年%b]> "

# Email author
set index_format+="%-20.20n "

# Show one, and only one, of the service tags (e.g. amazon, calendar, youtube, etc).
set index_format+="%<GA?%GA&%<GG?%GG&%<Gg?%Gg&%<Gy?%Gy&%<Gc?%Gc&%<GR?%GR&%<Gz?%Gz&%Gl>>>>>>>"

# Show if the message is encrypted or signed.
set index_format+="%<Ge?%Ge&%<GS?%GS&%1Ga>>"

# Show email subject
set index_format+="  %s"

from neomutt.

flatcap avatar flatcap commented on September 25, 2024 1
set index_format="%2M %<Gk?%Gk&%<Gs?%Gs&%<Gd?%Gd&%1Gi>>> %S %<[y?%<[m?%<[d?%[%-5H:%M]&%[(%-1a)%2d日]>&%[%-5b%2d日]>&%[%y年%b]> %-20.20n %<GA?%GA&%<GG?%GG&%<Gg?%Gg&%<Gy?%Gy&%<Gc?%Gc&%<GR?%GR&%<Gz?%Gz&%Gl>>>>>>>%<Ge?%Ge&%<GS?%GS&%1Ga>>  %s"

Your format string parses to this!
(click to expand)

Source: gv svg

from neomutt.

flatcap avatar flatcap commented on September 25, 2024 1

YES!!!
If you notice any other differences, however small, let me know.
Thanks!

from neomutt.

flatcap avatar flatcap commented on September 25, 2024

Oh dear, that's an oversight. Sorry.
The latest release, 2024-03-23, should be fine, but main contains some new development code.

The config system deals with types and we've changed the type all the format strings into expandos.
Unfortunately, we haven't implement += for expandos. Yet.

I'll try to fix that as soon as I can.

from neomutt.

flatcap avatar flatcap commented on September 25, 2024

Please can you give branch [devel/plus-equals] a try (PR #4211)

Thanks

from neomutt.

hsanson avatar hsanson commented on September 25, 2024

@flatcap thanks for the quick response. The error no longer shows and index_format seem to be set properly but for some reason it is not rendering properly:

image

Before it would look like this using same exact configuration:

image

from neomutt.

flatcap avatar flatcap commented on September 25, 2024

index_format seem to be set properly
but for some reason it is not rendering properly

OK, what's $index_format set to.
I'll see if I can reproduce (and fix) the problem.

from neomutt.

flatcap avatar flatcap commented on September 25, 2024

Please can you give branch [devel/notmuch-tags] a try.
It parses now, but I don't have the tags to really test it.

Note: This branch is on top of the fixes that should make main safe again.

Thanks

from neomutt.

hsanson avatar hsanson commented on September 25, 2024

@flatcap thanks for the fix... now it renders but some of the fonts are rendered twice for some reason:

image

The amazon and trash icons are shown twice in the screenshot when it should be one. Only happens with the notmuch tag-transforms ones, everything else seems to be ok.

from neomutt.

flatcap avatar flatcap commented on September 25, 2024

OK. I can repeat that.
Hmm... I think I see what's happening.
It seems to be rendering the test.

%<GA?%GA>

We're seeing an A for each of the %GAs.
I'll have a play around, tomorrow.

from neomutt.

flatcap avatar flatcap commented on September 25, 2024

Please can you give branch [devel/exp-dupe] a try (PR #4219)

You have one of the most complicated $index_formats that I've seen, so
if you have time, please could run two NeoMutts side-by-side (one old, one running this fix).
Try to spot any other differences.

Thanks!

from neomutt.

hsanson avatar hsanson commented on September 25, 2024

@flatcap unfortunately PR #4219 is causing some loop or something that hangs neomutt , eats my CPU and then kills it. This is how it looks when running this build:

Reading notmuch://?query=path:[email protected]/** AND tag:inbox
Sorting mailbox...Killed

from neomutt.

hsanson avatar hsanson commented on September 25, 2024

Previous #4211 does work but with the dup icons.

from neomutt.

flatcap avatar flatcap commented on September 25, 2024

Sorry about that; I've pushed a fix.
Please can you give main another try.

Thanks for your patience ❤️

from neomutt.

hsanson avatar hsanson commented on September 25, 2024

@flatcap tested latest main and now things seem to be working as before. Thanks.

from neomutt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.