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

Only Level 1 headings syncing even though IDs are assigned #306

Open
code-SL opened this issue Aug 25, 2024 · 3 comments
Open

Only Level 1 headings syncing even though IDs are assigned #306

code-SL opened this issue Aug 25, 2024 · 3 comments

Comments

@code-SL
Copy link

code-SL commented Aug 25, 2024

Syncing two-way is working well, but only for headlines at level 1. Is this expected behavior? I am only syncing DEADLINE marked entries, but these entries are at multiple levels some at level 1, 2, etc.

IDs are being assigned on the right entries (i.e. even non-level-1 headlines, which is expected behavior), but only level 1 headlines are actually being exported to the icalendar export (and thus being synced).

See below config.

(use-package org-caldav
  :straight (org-caldav :type git :host github :repo "dengste/org-caldav")
  :config
  (setq org-caldav-url "myurl.com/foo/bar")
  (setq org-caldav-calendar-id "orgmode")
  (setq org-caldav-inbox "baz.org")
  (setq org-caldav-debug-level 2)
  (setq org-caldav-files nil)
  (setq org-caldav-sync-todo t)
  (setq org-icalendar-include-todo 'all)
  (setq org-caldav-skip-conditions '(notdeadline))
  (setq org-caldav-save-directory "bazdirectory")
  (setq org-icalendar-timezone "America/New_York")
  (setq org-caldav-sync-on-save t)
  (setq org-caldav-delete-org-entries 'ask)
  )
@r39ex
Copy link

r39ex commented Oct 1, 2024

I suspect skip conditions is the culprit: if any parent heading (on level 1 for instance) would be skipped according to skip conditions sub headings are also skipped when syncing, regardless of whether skip conditions apply to them and even though ID:s are correctly generated for them. At least that's what I make of the code. ID:s are generated by org-caldav-create-uid while the questionable logic described above is applied in org-caldav-skip-function. I personally "solved" this issue by overwriting org-caldav-skip-function with a dummy-function (that does nothing apart from sending a warning to the message buffer). Seems to work. Mind you, this breaks any functionality associated with org-caldav-days-in-past.

@chaapp87
Copy link

@r39ex would you share your override?
I'm interested in that because my Todo are structered:

  • PROJECT
    ** NEXT

Because PROJECT has no timestamp there are sync errors, because the target calendar does not accept items without a date.
If I try to filter out these PROJECT items to underlying NEXT items don't get processed.

@r39ex
Copy link

r39ex commented Nov 1, 2024

@chaapp87 Not much to share, I just override the function, effectively making it a NOP:

(defun org-caldav-skip-function (foo)
   (message "Skipping org-caldav-skip-function!"))

Obviously, it's not a good solution, but it works for me.

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