Hi, The problem is that when Remind parses the PRIORITY argument, the trigger algorithm has not yet run, so $Tm is not yet set to anything useful. It's whatever the previously-calculated trigger month is.
Regards, Dianne. PS: sorry for top-posting; I'm replying from my phone. On August 24, 2019 5:49:09 PM EDT, Tim Chase <[email protected]> wrote: >Running with our conversation about post-processing with awk, I think >I may have found a bug: > >--------------------------------------------------- >$ cat ~/.reminders > >FSET msgprefix(x)=x + " " + $DefaultPrio + " " > >REM 10 PRIORITY [(($Tm == 7) * 1000) + $DefaultPrio] \ > MSG %"Our [iif($Tm == 7, "anniversary", "mesaversary")]%" \ > [(($Tm == 7) * 1000) + $DefaultPrio]%"% > >$ for m in 6 7 8; do rem 2019-${m}-10 ; done >Reminders for Monday, 10th June, 2019: > >5000 5000 Our mesaversary 5000 >Reminders for Wednesday, 10th July, 2019: > >5000 5000 Our anniversary 6000 >Reminders for Saturday, 10th August, 2019: > >5000 5000 Our mesaversary 5000 >--------------------------------------------------- > >I was expecting to see that 2nd one as > > 6000 5000 Our anniversary 6000 > >Note that the > > [(($Tm == 7) * 1000) + $DefaultPrio] > >is correctly calculated as part of the MSG (5000 = $DefaultPrio on >June 10 and Aug 10; and 6000 on July 10) but that same expression's >result doesn't seem to get properly passed to msgprefix() to get >tacked on as the first value. > >[context: We do a small "mesaversary" celebration each month on the >day we were married, but when it's a full anniversary, we celebrate >bigger. So I wanted to bump the PRIOIRTY to 6000 for the actual >anniversary, while the "mesaversary" is a more mundane $DefaultPrio] > >Is expression-pasting allowed in a PRIORITY clause or is this a bug? > >Thanks! > >-tim > > > >On 2019-08-24 10:23, Dianne Skoll wrote: >> H >> Hi, >> >> On 8/24/19 9:09 AM, Tim Chase wrote: >> >> > Is there a way to tell remind that I only want to output items of >> > a certain priority (or above a certain priority)? Preferably >> > without touching every one of my 1500+ reminders to add some sort >> > of filter to them? >> >> Remind doesn't have that built-in. Your solution using an external >> filter is best. You can define variables and functions on the >> command-line, so you could make a wrapper script so you don't need >> to define msgprefix() in your actual .rem files. >> >> Regards, >> >> Dianne. >> _______________________________________________ >> Remind-fans mailing list >> [email protected] >> https://dianne.skoll.ca/mailman/listinfo/remind-fans >> Remind is at https://dianne.skoll.ca/projects/remind/ > >_______________________________________________ >Remind-fans mailing list >[email protected] >https://dianne.skoll.ca/mailman/listinfo/remind-fans >Remind is at https://dianne.skoll.ca/projects/remind/ _______________________________________________ Remind-fans mailing list [email protected] https://dianne.skoll.ca/mailman/listinfo/remind-fans Remind is at https://dianne.skoll.ca/projects/remind/
