dengste / org-caldav

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

Suggestion: don't execute org-babel source code blocks #235

Closed nikonikoniko closed 2 years ago

nikonikoniko commented 3 years ago

When i run org-caldav-sync I am not interested in the results from the code blocks in my org files. However, I see in the logs that they are all being executed before syncing the calendars. Is there a way to turn this behavior off? Is this expected behavior?

Additionally, if there are any 'errors' in the org files, such as a bad link ([[junk]]), the process also does not complete.

Thank you

florhizome commented 3 years ago

it seems like org-caldav "evaluates" the org file then - i think there should be functions who "evaluate-while ignoring source blocks"

you could probably look for org-babel propoerties to set on a file level, that helpcircumventing that but it might interfere with what you normally do with these files...

whirm commented 3 years ago

I think that happens when org-caldav exports the org file to ical via org-ical before syncing, Look at https://github.com/dfeich/org-babel-examples#131-org-91 for some tips on how to deal with it.

For the issues with broken links, look at the org-export-with-broken-links variable.

hrehfeld commented 2 years ago
(setq
   ;; essential for large org mode file syncing
   org-export-with-broken-links t
   org-export-use-babel nil
   org-babel-default-header-args (cons `(:eval . "never-export")
                                       org-babel-default-header-args))
Thaodan commented 2 years ago

You can this inside the org file

#+PROPERTY: header-args :eval never-export