Re: Diary sexp and comparing dates, agenda

2024-01-13 Thread David Rogers
Ihor Radchenko writes: David Rogers writes: This setup seems to work so far. Does it look reasonable to you? Yes, but I may not be a reliable judge. I do not have a lot of practical experience with diary sexps other than when people report Org mode bugs :) Since it looks not-stupid to

Re: Diary sexp and comparing dates, agenda

2024-01-13 Thread Ihor Radchenko
David Rogers writes: > This setup seems to work so far. Does it look reasonable to you? Yes, but I may not be a reliable judge. I do not have a lot of practical experience with diary sexps other than when people report Org mode bugs :) -- Ihor Radchenko // yantar92, Org mode contributor,

Re: Diary sexp and comparing dates, agenda

2024-01-12 Thread David Rogers
Ihor Radchenko writes: You don't need diary-float - it returns true/false whether current DATE fits the arguments. Instead, you can make use of `calendar-nth-named-absday'. For example, <%%(and (= 245 (mf-days-from-easter)) (< (calendar-absolute-from-gregorian date)

Re: Diary sexp and comparing dates, agenda

2024-01-12 Thread Ihor Radchenko
David Rogers writes: > * Example 1 > <%%(= 245 (mf-days-from-easter))> > > because "mf-days-from-easter" is defined in my init file, along > with the definition of Easter itself. This does what it looks like > it should do; this year, Example 1 is shown on December 1. > > And I can do > > *

Re: Diary sexp and comparing dates, agenda

2024-01-12 Thread Ken Mankoff
Hi David, I'm not sure if this will help, but I have to file time sheets on the last weekday less than or equal to the 15th and last-day-of-month. I wrote two diary functions to achieve this (I don't handle holiday edge cases). I use these functions with: ** INFO [#A] Time Sheet

Re: Diary sexp and comparing dates, agenda

2024-01-12 Thread Tory S. Anderson
I don't have an answer -- my own use of diary-sexp is nothing more than standard holiday inclusion -- but I'm interested and watching for answers on the list. I personally didn't know that you could do such calculations the way you are, such as "too close to DATE", so I'm impressed! - Tory

Diary sexp and comparing dates, agenda

2024-01-11 Thread David Rogers
Hello all I'm using the Org agenda to show when certain church occasions will happen. Mostly I've got them working correctly, after "stealing" the method used in holidays.el for finding the date of Easter, along with someone else's function that then uses that to find the difference between