On Tue, Aug 31, 2021 at 05:54:23AM -0700, li...@ifohancroft.com wrote:

> Hi,
> 
> I am using an index-format-hook inside of index_format, to change the way
> the date column is displayed based on how old the email is.
> 
> My current setting is the following:
> 
> # ID, Attachments, Flags, Subject, Correspondent, Date
> set index_format = "%4C %?X?📎&
> ?%-1.1@replied@%-2.2@encrypted@%-1.1@flagged@ %-92.92s
> %-64.64@correspondent@ %* %10@date@"
> 
> index-format-hook date "~d<1d" "%[%H:%M]" # If it's from today - I only want
> the time
> index-format-hook date "~d<1w" "%[%d %a]" # If it's from this week - I only
> want the day and the date
> index-format-hook date "~d<1y" "%[%b %d]" # If it's from this year, I only
> want the date and the month
> index-format-hook date "~A" "%[%d/%m/%Y]" # If it's from a past year I only
> want the date, the month and the year
> 
> The rest works as I want it to and as I expect it to, besides the week
> pattern. If any email is from the last seven days, it gets caught by the
> week pattern. I don't want that. I want only emails from the current week to
> get caught by the week pattern, not all emails from the last 7 days.
> 
> Here's what is currently happening:
> 
> Today is Tuesday, August 31st. In my email, currently, the oldest email
> being caught by the week pattern is from Wednesday, August 25th.
> 
> Here's what I want to be happening:
> 
> Today is Tuesday, August 31st. In my email, the oldest email that should be
> getting caught by the week pattern should be from Monday, August 30th.
> 
> Is there another week pattern or another pattern in general, that I can use
> to make that happen or perhaps a way to make the current pattern work like
> this?
> 
> Best Regards,
> IFo Hancroft

Perhaps you could use an actual date, and cron a weekly
update to your .muttrc file (and not leave mutt running
for too long).

cheers,
raf

Reply via email to