pimutils / khal

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

Khal generates empty CATEGORIES: property in ics files #1300

Closed thibaut-ient closed 8 months ago

thibaut-ient commented 9 months ago

Describe the bug When editing an existing event, or when creating it in ikhal, the resulting .ics file contains an empty "CATEGORIES:" line. This does not happen when using khal new. This prevent the incriminated events to get synchronized to some servers using vdirsyncer

To Reproduce Simply create or edit an event in ikhal and observe a "CATEGORIES:" line in the resulting file.

Expected behavior ikhal shoudn't write out that line if there is no categories information?

OS, version, khal version and how you installed it: khal, version 0.11.2 from Arch OS repos Python 3.11.3 OS Archlinux

WhyNotHugo commented 9 months ago

As I mentioned on IRC: I did a quick read of the icalendar RFC, and it seems that CATEGORIES: must have at least one category; an empty label doesn’t seem to be valid.

I guess that servers could be lenient and allow this, but strictly speaking, the ics file is not valid.

WhyNotHugo commented 9 months ago

I thought this sounded familiar, we already had this issue in the past: https://github.com/pimutils/khal/issues/453

titibandit commented 9 months ago

Is there anything that speaks against merging that pull request?

geier commented 8 months ago

no, but I believe it's merged already.