Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creation of ID properties on every headings #298

Open
renbus opened this issue Mar 26, 2024 · 5 comments
Open

Creation of ID properties on every headings #298

renbus opened this issue Mar 26, 2024 · 5 comments

Comments

@renbus
Copy link

renbus commented Mar 26, 2024

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
Copy link
Collaborator

jackkamm commented Apr 1, 2024

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

@renbus
Copy link
Author

renbus commented Apr 2, 2024

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
Copy link
Collaborator

jackkamm commented Apr 6, 2024

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
Copy link
Author

renbus commented Apr 9, 2024

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.

@jtoloe
Copy link

jtoloe commented Nov 22, 2024

(setopt org-caldav-skip-conditions '(nottimestamp)) does not work if entries are in subtrees to an entry that does not have a timestamp. In that case they are skipped regardless.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants