dengste / org-caldav

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

Creation of ID properties on every headings #298

Open renbus opened 5 months ago

renbus commented 5 months ago

Hello,

Is it necessary for Org-caldav to create ID property blocks on every headings in files covered by the org-caldav-files variable? I work on different projects, and I keep most of my projects' informations in org files, one by project. In each files I usually have one heading I reserve for tasks and events, all the other headings are for other stuff, and so there are no timestamp or TODO mark anywhere else. Would it be workable to have Org-caldav to put IDs only on headings that it syncs?

Thanks for this useful package.

jackkamm commented 4 months ago

Maybe org-caldav-skip-conditions will help you. Entries it matches shouldn't get a UID.

renbus commented 4 months ago

Hello, thank you for your answer. I tried, but I can't set properly the variable, I do:

(setopt org-caldav-skip-conditions '('nottimestamp))

And I get:

Warning (emacs): Value ‘('nottimestamp)’ does not match type list.

I don't know what's wrong with my syntax. So far nottimestamp is still set to org-caldav-skip-conditions, even with the warning, but it still put IDs on all headings, even ones without timestamps. Obviously, I would only want headings with timestamps to get synced, I don't know why by default it puts IDs on those headings that are no use for an ical sync library.

jackkamm commented 4 months ago

Does it work if you try '(nottimestamp) instead of '('nottimestamp)?

Obviously, I would only want headings with timestamps to get synced, I don't know why by default it puts IDs on those headings that are no use for an ical sync library.

Not obvious, icalendar spec supports unscheduled todos.

renbus commented 4 months ago

I did some testing and it seems like (setopt org-caldav-skip-conditions '(nottimestamp)) does work - the file parsing do skip headlines without a timestamp. But setting the variable this way gives this warning anyway:

Warning (emacs): Value ‘(nottimestamp)’ does not match type list

Using setq instead of setopt does not gives this warning. So it does work, but with a false warning.

Not obvious, icalendar spec supports unscheduled todos.

You're right. But still, if then org-caldav-sync-todo isn't set to t, then 'nottimestamp would be a reasonable default (otherwise, 'nottimestamp and 'nottodo would be sufficient), since there are no points in putting IDs to headlines that aren't meaningful for calendar synchronization.

I'm saying this because I'm still unhappy for having a few hundred of headlines that got IDs while they aren't a task or an event, but it's alright. ;)

Thanks again for your help.