pimutils / khal

:calendar: CLI calendar application
https://lostpackets.de/khal/
MIT License
2.6k stars 199 forks source link

Repeated tasks on the calendar with --once should only show next occurance, not all of them #1233

Open dusanx opened 1 year ago

dusanx commented 1 year ago

Hi, I am generating ics file from org-mode and importing into khal with

khal import -a todo --batch ~/.todo.ics

and everything works great.

Now I have reoccurring task happening every week, example from ics file would be

BEGIN:VEVENT
DTSTAMP:20230410T175402Z
UID:TS1-af74116d-3ee3-42aa-b187-02be8451b958
DTSTART;VALUE=DATE:20230417
DTEND;VALUE=DATE:20230418
RRULE:FREQ=WEEKLY;INTERVAL=1
SUMMARY:Here is some repeating task example
DESCRIPTION:Yes, description too.
CATEGORIES:todo
END:VEVENT

and khal calendar --once today 30d correctly shows task once in the 'at' list on the right, but calendar itself highlights all Mondays in the future.

Expected behavior: with --once and repeated tasks, khal should only highlight next date on the calendar, not all repeated dates in the future.

I can snap screenshot if needed but this is easy to test and replicate. Anything I can help with just let me know.

dusanx commented 1 year ago

Update:

I can achieve desired results by removing repeat line from ics file before importing in khal but even better if khal can follow --once in calendar.

sed -i '/RRULE:FREQ/d' ~/.todo.ics