dengste / org-caldav

Caldav sync for Emacs orgmode
GNU General Public License v3.0
724 stars 105 forks source link

Bugfix for org-caldav-create-time-range: Incorrect number of args #162

Closed niclasborlin closed 5 years ago

niclasborlin commented 6 years ago

The function org-caldav-create-time-range can be called from org-caldav-update-events-in-org with an incorrect number of arguments. The original code passes (butlast eventdata 3) as arguments. However, since org-caldav-create-time-range expects exactly four arguments, this will fail unless eventdata has exactly seven elements.

The fix replaces (butlast eventdata 3) with (seq-take eventdata 4).

I managed to trigger the failure once when I added a "note" to a Google calendar event ("DESCRIPTION:" in caldav).

Edit: On second thoughts, this bug might only be necessary if you have have added CLASS (pull request #161). Adding the fix to the main branch would still remove the latent bug.