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

Limit org-caldav to org-id-files only in specific directories? #304

Open
emacsomancer opened this issue Aug 10, 2024 · 0 comments
Open

Limit org-caldav to org-id-files only in specific directories? #304

emacsomancer opened this issue Aug 10, 2024 · 0 comments

Comments

@emacsomancer
Copy link

I have a lot of org-id-files, but I only want org-caldav to look at/deal with org-ids which are in files in particular directories. I currently have just brute force done this (after also setting org-caldav-calendars to the org files I want it to deal with)

  (setq org-id-files-temp nil)
  (defun bms/org-caldav-remove-org-id ()
    (setq org-id-files-temp org-id-files)
    (setq org-id-files nil))
  (defun bms/org-caldav-restore-org-id ()
    (when (not (equal org-id-files-temp nil))
      (setq org-id-files org-id-files-temp)))
  (advice-add 'org-caldav-sync :before #'bms/org-caldav-remove-org-id)
  (advice-add 'org-caldav-sync :after #'bms/org-caldav-restore-org-id))

But I wonder if there is a better way?

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

1 participant