lfos / calcurse

A text-based calendar and scheduling application
https://calcurse.org
BSD 2-Clause "Simplified" License
990 stars 94 forks source link

Delete Event until a certain date #180

Open NWuensche opened 5 years ago

NWuensche commented 5 years ago

For repeating events, it would be nice not only to delete the event for the current day or for all days, but for all dates starting with the selected date. I'm currently trying to implement this, but I get a segmentation fault. Maybe someone can please help me? You can find the code at: https://github.com/NWuensche/calcurse/tree/delete-until-now

lhca commented 5 years ago

For repeating events, it would be nice not only to delete the event for the current day or for all days, but for all dates starting with the selected date.

That is already possible: edit the event, select 2) Repetion, and set the end date to the day before the selected date. There is really nothing to delete. Explanation follows.

Just like an ordinary appointment or event, a recurrent one has one entry in the data file (apts) with text and time-of-day information (for appointments start/stop time, for events only day-begin). In addition a recurrent item has a "recipe" that describe how it repeats (how often and how long). From this recipe calcurse calculates whether a recurrent item has an occurrence on any given day. If it has, the item is displayed. When you "delete an occurrence", the day is added to the recipe as an exception day where the item is not displayed. When you "delete all occurrences", the entry in the data file is removed.

NWuensche commented 5 years ago

Thanks for the explanation. Maybe I am a bit biased by Google calendar, but I find it not that intuitive to change the end date by editing the event instead of deleting it. Of course, deleting might be the wrong word here, as basically just the end date changes, but in my opinion it would be nice when it would be possible to update the end date in the deleting-menu. What do you think?

lhca commented 5 years ago

That's a possibility, of course, but the interface (menu?) is not very well suited and easily becomes cluttered. You propose adding a third possibility to "Delete (a)ll occurrences or just this (o)ne?", I suppose? Like for instance?

NWuensche commented 5 years ago

I already tried to start this on my fork https://github.com/NWuensche/calcurse/tree/delete-until-now. I propose the options "Delete (a)ll occurences or just this (o)ne or (u)ntil now?".