Caldav sync for Emacs Orgmode
For documentation, see the manual at doc/org-caldav.org. The manual is also available at https://jackkamm.neocities.org/org-caldav-manual.
Caldav sync for Emacs orgmode
License: GNU General Public License v3.0
Caldav sync for Emacs Orgmode
For documentation, see the manual at doc/org-caldav.org. The manual is also available at https://jackkamm.neocities.org/org-caldav-manual.
Hi,
I am currently getting a error using the latest org-mode. Here is the backtrace:
Debugger entered--Lisp error: (error "Could not find UID TS1-48bcbfbf-3945-4cd2-bc8a-900102c77a8c.")
signal(error ("Could not find UID TS1-48bcbfbf-3945-4cd2-bc8a-900102c77a8c."))
error("Could not find UID %s." "TS1-48bcbfbf-3945-4cd2-bc8a-900102c77a8c")
org-caldav-generate-md5-for-org-entry("TS1-48bcbfbf-3945-4cd2-bc8a-900102c77a8c")
org-caldav-update-eventdb-from-org(#<buffer org-caldav-3746tX2>)
org-caldav-sync()
call-interactively(org-caldav-sync record nil)
command-execute(org-caldav-sync record)
execute-extended-command(nil "org-caldav-sync")
call-interactively(execute-extended-command nil nil)
emacs-version: 24.3.1
org-version: 8.0.1
org-caldav commit: 9411d0d
Hi,
When I start syncing it only asks for the password and not the username. I use Baikal caldav server.
Thanks
It's awesome!!
I want to register org-caldav to MELPA.
MELPA is Emacs Lisp repositry http://melpa.milkbox.net/
But org-caldav don't has Version header.
In detail about header , see http://www.gnu.org/software/emacs/manual/html_node/elisp/Library-Headers.html
So, I hope add Version header in org-caldav.
This might be useful to others in e.g. a wiki, or the readme. Here's what I use for multiple calendars:
(defun org-caldav-sync-work ()
(interactive)
(require 'cl)
(setq org-caldav-event-list nil
org-caldav-calendar-id "org-work"
org-caldav-inbox "~/org/caldav-inbox-work.org"
org-caldav-files
(cl-set-difference org-agenda-files
'("~/org/home.org" "~/org/journal.org")
:test 'equal))
(org-caldav-sync))
(defun org-caldav-sync-home ()
(interactive)
(setq org-caldav-event-list nil
org-caldav-calendar-id "org-home"
org-caldav-inbox "~/org/caldav-inbox-home.org"
org-caldav-files '("~/org/home.org" "~/org/journal.org"))
(org-caldav-sync))
Note: I first messed up something in the event list, and had to delete both the org-caldav-SOMEID.el files and do a C-u org-caldav-delete-everything, but after that it seems to have worked.
org-caldav-sync
completes with the message:
CalDAV Sync finished.
Nothing was done.
The value of the variable output
in the function org-caldav-check-connection
during this process is:
(("[calendar URL]" DAV:status 207 . " "))
If i do:
(let ((url-request-extra-headers '(("Depth: 1")))
(url-request-method "PROPFIND"))
(display-buffer (url-retrieve-synchronously (org-caldav-events-url))))
the contents of the displayed buffer are (minus HTTP headers):
<?xml version="1.0" encoding="utf-8" ?>
<multistatus xmlns="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
<response>
<href>/davical/caldav.php/alexis/calendar/</href>
<propstat>
<prop>
<getcontenttype>httpd/unix-directory</getcontenttype>
<resourcetype>
<collection/>
<C:calendar/>
</resourcetype>
<displayname>Alexis' calendar</displayname>
<getlastmodified>Sun, 29 Jun 2014 07:22:30 GMT</getlastmodified>
<creationdate>20140629T064258Z</creationdate>
<getcontentlanguage/>
<supportedlock>
<lockentry>
<lockscope>
<exclusive/>
</lockscope>
<locktype>
<write/>
</locktype>
</lockentry>
</supportedlock>
<owner>
<href>/davical/caldav.php/alexis/</href>
</owner>
<current-user-principal>
<href>/davical/caldav.php/alexis/</href>
</current-user-principal>
</prop>
<status>HTTP/1.1 200 OK</status>
</propstat>
</response>
<response>
<href>/davical/caldav.php/alexis/calendar/dcc4493f-544c-42e9-89f7-0cfe8261c600.ics</href>
<propstat>
<prop>
<getcontenttype>text/calendar</getcontenttype>
<resourcetype/>
<getcontentlength>755</getcontentlength>
<displayname>Test Event</displayname>
<getlastmodified>Sat, 28 Jun 2014 21:22:31 GMT</getlastmodified>
<creationdate>20140628T212220Z</creationdate>
<getetag>"33da13fe1d46db16a192e8413f2b9a89"</getetag>
<getcontentlanguage/>
<supportedlock>
<lockentry>
<lockscope>
<exclusive/>
</lockscope>
<locktype>
<write/>
</locktype>
</lockentry>
</supportedlock>
<owner>
<href>/davical/caldav.php/alexis/</href>
</owner>
<current-user-principal>
<href>/davical/caldav.php/alexis/</href>
</current-user-principal>
</prop>
<status>HTTP/1.1 200 OK</status>
</propstat>
</response>
</multistatus>
I can not get this to sync. When I run without the patched url-dav I get:
if: You have to either use at least Emacs pretest, or the patched `url-dav' package (see Readme).
When I run is with the patched url-dav I get:
progn: Do not load this url-dav package on newer Emacsen.
Any Ideas? Thanks.
When I run the sync, it opens a new buffer with the following:
CalDAV Sync finished.
Nothing was done.
While it may not seem important when the sync is run manually, when it comes to running it automatically, it is preferrable to avoid a new buffer and use either a log file or simply run in a silent mode.
I was wondering if there is any way to prevent a new buffer opening. Thanks
Hi,
I would like to put org-caldav-sync in a cron. I can't seem to get this to work. I use google calendar with 2-phase authentication and an application specific password for org-caldav-sync.
What almost works is:
(setq org-caldav-url "https://[email protected]/calendar/dav")
and a ~/.netrc file:
machine www.google.com
password XXXX
port https
It still prompts for a username, however.
What doesn't work: supplying a login name via ~/.netrc, supplying a password via the URL.
Note that this problem is tricky to track down, because emacs caches login & password info.
emacs: GNU Emacs 24.1.1 (x86_64-pc-linux-gnu, GTK+ Version 2.24.10) of 2012-07-17 on lawrencium, modified by Debian
os: ubuntu precise
Hello,
https://developers.google.com/google-apps/calendar/caldav/v2/guide says that https://www.google.com/calendar/dav endpoint is deprecated. One should use https://apidata.googleusercontent.com/caldav/v2/calid/events instead. I tried to
(setq org-caldav-url "https://apidata.googleusercontent.com/caldav/v2")
and modified the source like this:
diff --git a/org-caldav.el b/org-caldav.el index cccb9bf..7241a26 100644 --- a/org-caldav.el +++ b/org-caldav.el @@ -322,7 +322,7 @@ Are you really sure? "))) (defun org-caldav-events-url () "Return URL for events." - (if (string-match "google\\.com" org-caldav-url) + (if (string-match "google\\(usercontent\\)?\\.com" org-caldav-url) (concat org-caldav-url "/" org-caldav-calendar-id "/events/") (concat org-caldav-url "/" org-caldav-calendar-id "/")))
I ended up with an error:
Debugger entered--Lisp error: (wrong-type-argument char-or-string-p nil) url-http-handle-authentication(nil) url-http-parse-headers() url-http-chunked-encoding-after-change-function(415 440 25) url-http-wait-for-headers-change-function(1 453 452) url-http-generic-filter(# "HTTP/1.1 401 Unauthorized \nWWW-Authenticate: Bearer realm=\"https://www.google.com/accounts/AuthSubRequest\" \nContent-Type: text/html; charset=UTF-8 \nDate: Tue, 24 Sep 2013 13:32:04 GMT \nExpires: Tue, 24 Sep 2013 13:32:04 GMT \nCache-Control: private, max-age=0 \nX-Content-Type-Options: nosniff \nX-Frame-Options: SAMEORIGIN \nX-XSS-Protection: 1; mode=block \nServer: GSE \nAlternate-Protocol: 443:quic \nTransfer-Encoding: chunked \n \ne \nLogin Required \n0 \n \n") accept-process-output(#) #[0 "\302�\303\300@!)\207" [(#) inhibit-quit nil accept-process-output] 2 "\n\n(fn)"]() funcall(#[0 "\302�\303\300@!)\207" [(#) inhibit-quit nil accept-process-output] 2 "\n\n(fn)"]) url-retrieve-synchronously("https://apidata.googleusercontent.com/caldav/v2/[email protected]/events/") url-http-options("https://apidata.googleusercontent.com/caldav/v2/[email protected]/events/") url-dav-supported-p("https://apidata.googleusercontent.com/caldav/v2/[email protected]/events/") (if (url-dav-supported-p (org-caldav-events-url)) nil (error "The URL %s does not seem to accept DAV requests" (org-caldav-events-url))) org-caldav-sync() call-interactively(org-caldav-sync record nil) command-execute(org-caldav-sync record) execute-extended-command(nil "org-caldav-sync") call-interactively(execute-extended-command nil nil)
Any idea why is that? With the old endpoint, everything works.
When I issue M-x org-caldav-sync, it stops after putting four events on my owncloud calendar and I get the error given at the bottom:
Any help would be greatly appreciated.
thanks
Debugger entered--Lisp error: (error "No UID could be found for current event.")
signal(error ("No UID could be found for current event."))
error("No UID could be found for current event.")
(if (re-search-forward "^UID:\s-(.+)\s-$" nil t) (let ((uid (match-string 1))) (while (progn (forward-line) (looking-at " (.+)\s-$")) (setq uid (concat uid (match-string 1)))) (while (string-match "\s-+" uid) (setq uid (replace-match "" nil nil uid))) (if (string-match "^([A-Z][A-Z][0-9]-)" uid) (progn (setq uid (replace-match "" nil nil uid)))) uid) (error "No UID could be found for current event."))
org-caldav-get-uid()
(setq uid (org-caldav-get-uid))
(and (setq uid (org-caldav-get-uid)) (not (string-match (car cur) uid)))
(while (and (setq uid (org-caldav-get-uid)) (not (string-match (car cur) uid))))
(if (eq (org-caldav-event-etag cur) (quote put)) (org-caldav-debug-print 1 (format "Event UID %s: Was already put previously." (car cur))) (org-caldav-debug-print 1 (format "Event UID %s: Org --> Cal" (car cur))) (widen) (goto-char (point-min)) (while (and (setq uid (org-caldav-get-uid)) (not (string-match (car cur) uid)))) (if (string-match (car cur) uid) nil (error "Could not find UID %s" (car cur))) (org-caldav-narrow-event-under-point) (org-caldav-cleanup-ics-description) (org-caldav-maybe-fix-timezone) (org-caldav-set-sequence-number cur event-etag) (message "Putting event %d of %d" counter (length events)) (if (org-caldav-put-event icsbuf) (org-caldav-event-set-etag cur (quote put)) (org-caldav-debug-print 1 (format "Event UID %s: Error while doing Org --> Cal" (car cur))) (org-caldav-event-set-status cur (quote error)) (setq org-caldav-sync-result (cons (list org-caldav-calendar-id (car cur) (quote error) (quote error:org->cal)) org-caldav-sync-result))))
(while --dolist-tail-- (setq cur (car --dolist-tail--)) (setq counter (1+ counter)) (if (eq (org-caldav-event-etag cur) (quote put)) (org-caldav-debug-print 1 (format "Event UID %s: Was already put previously." (car cur))) (org-caldav-debug-print 1 (format "Event UID %s: Org --> Cal" (car cur))) (widen) (goto-char (point-min)) (while (and (setq uid (org-caldav-get-uid)) (not (string-match (car cur) uid)))) (if (string-match (car cur) uid) nil (error "Could not find UID %s" (car cur))) (org-caldav-narrow-event-under-point) (org-caldav-cleanup-ics-description) (org-caldav-maybe-fix-timezone) (org-caldav-set-sequence-number cur event-etag) (message "Putting event %d of %d" counter (length events)) (if (org-caldav-put-event icsbuf) (org-caldav-event-set-etag cur (quote put)) (org-caldav-debug-print 1 (format "Event UID %s: Error while doing Org --> Cal" (car cur))) (org-caldav-event-set-status cur (quote error)) (setq org-caldav-sync-result (cons (list org-caldav-calendar-id (car cur) (quote error) (quote error:org->cal)) org-caldav-sync-result)))) (setq --dolist-tail-- (cdr --dolist-tail--)))
(let ((--dolist-tail-- events) cur) (while --dolist-tail-- (setq cur (car --dolist-tail--)) (setq counter (1+ counter)) (if (eq (org-caldav-event-etag cur) (quote put)) (org-caldav-debug-print 1 (format "Event UID %s: Was already put previously." (car cur))) (org-caldav-debug-print 1 (format "Event UID %s: Org --> Cal" (car cur))) (widen) (goto-char (point-min)) (while (and (setq uid (org-caldav-get-uid)) (not (string-match (car cur) uid)))) (if (string-match (car cur) uid) nil (error "Could not find UID %s" (car cur))) (org-caldav-narrow-event-under-point) (org-caldav-cleanup-ics-description) (org-caldav-maybe-fix-timezone) (org-caldav-set-sequence-number cur event-etag) (message "Putting event %d of %d" counter (length events)) (if (org-caldav-put-event icsbuf) (org-caldav-event-set-etag cur (quote put)) (org-caldav-debug-print 1 (format "Event UID %s: Error while doing Org --> Cal" (car cur))) (org-caldav-event-set-status cur (quote error)) (setq org-caldav-sync-result (cons (list org-caldav-calendar-id (car cur) (quote error) (quote error:org->cal)) org-caldav-sync-result)))) (setq --dolist-tail-- (cdr --dolist-tail--))))
(let ((events (append (org-caldav-filter-events (quote new-in-org)) (org-caldav-filter-events (quote changed-in-org)))) (counter 0) (url-show-status nil) (event-etag (org-caldav-get-event-etag-list)) uid) (let ((--dolist-tail-- events) cur) (while --dolist-tail-- (setq cur (car --dolist-tail--)) (setq counter (1+ counter)) (if (eq (org-caldav-event-etag cur) (quote put)) (org-caldav-debug-print 1 (format "Event UID %s: Was already put previously." (car cur))) (org-caldav-debug-print 1 (format "Event UID %s: Org --> Cal" (car cur))) (widen) (goto-char (point-min)) (while (and (setq uid (org-caldav-get-uid)) (not (string-match ... uid)))) (if (string-match (car cur) uid) nil (error "Could not find UID %s" (car cur))) (org-caldav-narrow-event-under-point) (org-caldav-cleanup-ics-description) (org-caldav-maybe-fix-timezone) (org-caldav-set-sequence-number cur event-etag) (message "Putting event %d of %d" counter (length events)) (if (org-caldav-put-event icsbuf) (org-caldav-event-set-etag cur (quote put)) (org-caldav-debug-print 1 (format "Event UID %s: Error while doing Org --> Cal" (car cur))) (org-caldav-event-set-status cur (quote error)) (setq org-caldav-sync-result (cons (list org-caldav-calendar-id ... ... ...) org-caldav-sync-result)))) (setq --dolist-tail-- (cdr --dolist-tail--)))) (setq event-etag (org-caldav-get-event-etag-list)) (let ((--dolist-tail-- events) cur) (while --dolist-tail-- (setq cur (car --dolist-tail--)) (let ((etag (assoc (car cur) event-etag))) (if (and (not (eq ... ...)) etag) (progn (org-caldav-event-set-etag cur (cdr etag)) (setq org-caldav-sync-result (cons ... org-caldav-sync-result))))) (setq --dolist-tail-- (cdr --dolist-tail--)))))
(save-current-buffer (set-buffer icsbuf) (widen) (goto-char (point-min)) (let ((events (append (org-caldav-filter-events (quote new-in-org)) (org-caldav-filter-events (quote changed-in-org)))) (counter 0) (url-show-status nil) (event-etag (org-caldav-get-event-etag-list)) uid) (let ((--dolist-tail-- events) cur) (while --dolist-tail-- (setq cur (car --dolist-tail--)) (setq counter (1+ counter)) (if (eq (org-caldav-event-etag cur) (quote put)) (org-caldav-debug-print 1 (format "Event UID %s: Was already put previously." (car cur))) (org-caldav-debug-print 1 (format "Event UID %s: Org --> Cal" (car cur))) (widen) (goto-char (point-min)) (while (and (setq uid ...) (not ...))) (if (string-match (car cur) uid) nil (error "Could not find UID %s" (car cur))) (org-caldav-narrow-event-under-point) (org-caldav-cleanup-ics-description) (org-caldav-maybe-fix-timezone) (org-caldav-set-sequence-number cur event-etag) (message "Putting event %d of %d" counter (length events)) (if (org-caldav-put-event icsbuf) (org-caldav-event-set-etag cur (quote put)) (org-caldav-debug-print 1 (format "Event UID %s: Error while doing Org --> Cal" ...)) (org-caldav-event-set-status cur (quote error)) (setq org-caldav-sync-result (cons ... org-caldav-sync-result)))) (setq --dolist-tail-- (cdr --dolist-tail--)))) (setq event-etag (org-caldav-get-event-etag-list)) (let ((--dolist-tail-- events) cur) (while --dolist-tail-- (setq cur (car --dolist-tail--)) (let ((etag (assoc ... event-etag))) (if (and (not ...) etag) (progn (org-caldav-event-set-etag cur ...) (setq org-caldav-sync-result ...)))) (setq --dolist-tail-- (cdr --dolist-tail--))))) (let ((events (org-caldav-filter-events (quote deleted-in-org))) (url-show-status nil) (counter 0)) (let ((--dolist-tail-- events) cur) (while --dolist-tail-- (setq cur (car --dolist-tail--)) (setq counter (1+ counter)) (message "Deleting event %d from %d" counter (length events)) (org-caldav-delete-event (car cur)) (setq org-caldav-sync-result (cons (list org-caldav-calendar-id (car cur) (quote deleted-in-org) (quote removed-from-cal)) org-caldav-sync-result)) (setq org-caldav-event-list (delete cur org-caldav-event-list)) (setq --dolist-tail-- (cdr --dolist-tail--))))) (let ((--dolist-tail-- (org-caldav-filter-events (quote error))) cur) (while --dolist-tail-- (setq cur (car --dolist-tail--)) (setq org-caldav-event-list (delete cur org-caldav-event-list)) (setq --dolist-tail-- (cdr --dolist-tail--)))))
org-caldav-update-events-in-cal(#)
(let ((org-caldav-url org-caldav-url) (org-caldav-calendar-id org-caldav-calendar-id) (org-caldav-files org-caldav-files) (org-caldav-select-tags org-caldav-select-tags) (org-caldav-inbox org-caldav-inbox) (org-caldav-empty-calendar nil)) (while calendar (let ((key (car-safe (prog1 calendar (setq calendar ...)))) (value (car-safe (prog1 calendar (setq calendar ...))))) (set (org-caldav-var-for-key key) value))) (org-caldav-check-connection) (if resume nil (setq org-caldav-ics-buffer (org-caldav-generate-ics)) (setq org-caldav-event-list nil) (org-caldav-load-sync-state) (let ((--dolist-tail-- org-caldav-event-list) cur) (while --dolist-tail-- (setq cur (car --dolist-tail--)) (org-caldav-event-set-status cur nil) (setq --dolist-tail-- (cdr --dolist-tail--)))) (org-caldav-update-eventdb-from-org org-caldav-ics-buffer) (org-caldav-update-eventdb-from-cal)) (org-caldav-update-events-in-cal org-caldav-ics-buffer) (org-caldav-update-events-in-org) (org-caldav-save-sync-state) (setq org-caldav-event-list nil) (save-current-buffer (set-buffer org-caldav-ics-buffer) (set-buffer-modified-p nil) (kill-buffer)) (delete-file (buffer-file-name org-caldav-ics-buffer)))
org-caldav-sync-calendar()
(if (null org-caldav-calendars) (org-caldav-sync-calendar) (let ((--dolist-tail-- org-caldav-calendars) calendar) (while --dolist-tail-- (setq calendar (car --dolist-tail--)) (org-caldav-debug-print 1 "Syncing first calendar entry:" calendar) (org-caldav-sync-calendar calendar) (setq --dolist-tail-- (cdr --dolist-tail--)))))
(if (and org-caldav-event-list (y-or-n-p "Last sync seems to have been aborted. Should I try to resume? ")) (org-caldav-sync-calendar org-caldav-previous-calendar t) (setq org-caldav-sync-result nil) (if (null org-caldav-calendars) (org-caldav-sync-calendar) (let ((--dolist-tail-- org-caldav-calendars) calendar) (while --dolist-tail-- (setq calendar (car --dolist-tail--)) (org-caldav-debug-print 1 "Syncing first calendar entry:" calendar) (org-caldav-sync-calendar calendar) (setq --dolist-tail-- (cdr --dolist-tail--))))))
org-caldav-sync()
call-interactively(org-caldav-sync record nil)
command-execute(org-caldav-sync record)
execute-extended-command(nil "org-caldav-sync")
call-interactively(execute-extended-command nil nil)
command-execute(execute-extended-command)
At least for Emacs 24.2 (in Debian) it is necessary to change
(require 'cl-lib)
to (require 'cl)
. README should mention this.
Hi,
I often organize my calendar like
* Irregular meeting
<2014-05-06 Tue 11:00-12:00>
<2014-05-07 Wed 14:00-15:00>
With the latest emacs-bzr
and org-mode-git
and org-caldav
the second time-stamp is ignored. In the *org-caldav-debug*
buffer it says it's a double-entry. However, ox-icalendar
already support events like the above by prefixing the UID with TS-n
where n
is an integer.
If it is technically possibly to support events such as the one above by org-caldav
it would be great if they worked.
I would find it very convenient to sync the org adress property (that can already be used with org-googlemaps) with the location field of google calendar. On an android phone (my only use of google calendar) it would open the possibility to lauch google maps, directions and so on.
I am getting the following error syncing:
Debugger entered--Lisp error: (wrong-type-argument integer-or-marker-p nil)
url-dav-process-response(#<buffer *http owncloud.e6h.org:443*> "https://owncloud.e6h.org/remote.php/caldav/calendars/egh/org/")
url-dav-request("https://owncloud.e6h.org/remote.php/caldav/calendars/egh/org/" "PROPFIND" DAV:propfind "<DAV:prop><DAV:getetag/></DAV:prop>" 1 nil $
url-dav-get-properties("https://owncloud.e6h.org/remote.php/caldav/calendars/egh/org/" (DAV:getetag) 1)
org-caldav-get-event-etag-list()
org-caldav-update-eventdb-from-cal()
org-caldav-sync()
call-interactively(org-caldav-sync record nil)
command-execute(org-caldav-sync record)
execute-extended-command(nil "org-caldav-sync")
call-interactively(execute-extended-command nil nil)
Emacs version: 24.3.1
org-caldav: fc20973
Let me know if you need more information. Thank you!
Sending a PROPFIND to a DAViCal CalDAV server results in an HTTP 207 ("Multi-Status") response, which in turn results org-caldav
raising a "Could not query CalDAV URL" error. The same URL works fine with IceDove/Thunderbird.
First of all: org-caldav is a great piece of software! Today I tried to test it. It seemed to work, but had resisting problems with some entries. The debug buffer gave me the UID, but I didn't know how to find the relative entries. So I opted for the radical solution: C-u M-x org-caldav-delete-everything
That did it. All tasks and appointments are gone. But afterwards I'am not able to start my favorite client, evolution. It always crashes with a segfault:
Dec 4 20:40:24 grmpf kernel: [ 453.725272] evolution[1693]: segfault at 7f580000001b ip 00007f58081bf625 sp 00007fff867c78a8 error 4 in libical.so.1.0.0[7f5808181000+55000]
Neither reboot nor --reinstall brought it back. Do you have any idea, how I can get evolution running again?
sincerely yours
Georg
In restricted network, We cannot use CALDAV protocol .
So, I think org-caldav should have option changing protocol, for example HTTP.
Hi, this is not really an 'issue', but a question: are there plans for org-mode 8 support? I have read of difficulties with org-mode 8, and sync did not seem to work when I tried; I did not pursue it, as I assumed it to be a compatibility issue. Is this so, or should I file another report?
Thanks to your code, I wrote the following code to convert an .ics
file (e.g., received as attachment to an email) to an org event in the org-caldav-inbox
:
(defun my:import-ics-to-org (path)
(with-current-buffer (get-buffer-create "*import-ics-to-org*")
(delete-region (point-min) (point-max))
(insert-file-contents path)
(let ((event (org-caldav-convert-event)))
(with-current-buffer (find-file-noselect (org-caldav-inbox-file org-caldav-inbox))
(let* ((point-and-level (org-caldav-inbox-point-and-level org-caldav-inbox))
(point (car point-and-level))
(level (cdr point-and-level)))
(goto-char point)
(apply #'org-caldav-insert-org-entry
(append event (list nil level))))))))
This depends on #67 being merged. Would it make sense to include this in org-caldav
?
When I create in my calendar an event with non-ASCII characters, the encoding in org-caldav-inbox
file is broken. For example, when I create in my Google calendar event tučňáččí
, after syncing my .org contains tu^MH\341^M^M\355
.
When the inbox file needs to be saved, emacs asks to select encoding for this file. This is annoying and to my best knowledge, there is no encoding that makes the non-ASCII characters stored correctly.
When I import my google calendar, the imported entries have switched day and month. For example, event scheduled on 3rd of december apears as 2012-03-12. I tracked this down to the value of calendar-date-style. If this is set to 'american (the default, in my case), the function icalendar--datetime-to-diary-date converts the date to american style, whereas org-caldav expects european style in org-caldav-convert-event here:
(start-d (icalendar--datetime-to-diary-date
dtstart-dec))
The workaround is to set calendar-date-style to 'european but org-caldav should not depend on this settings.
I have just installed the new version from org-caldav.
Now there is only the sync function....
I want to reset my calendar but the delete function is not available...
org-caldav-delete-everything [No match]
Entries that have no date (and thus should be skipped by org-caldav) still get a PROPERTIES drawer, is it possible to avoid this?
Hi, thanks for these great piece of software,
is there any way to include tags and categories in the summary of the exported entries?
Rationale: my org calendar entries (scheduled actions, meetings, deadlines, etc.) are structured in "tagged" and "categorized" "projects", a tipical headline is "Meeting". The entry in my google calendar is then "Meeting" but I don't know the project the meeting belongs.
This could be tricky since org-mode does not come with notification support out of the box. org-notify which is in org-contrib could be used
I've tried to run the org-calDAV-sync under MS windows (8.1, 64-bit), the error messages are as follows.
open-network-stream: make client process failed: connection timed out, :name, www.google.com, :buffer, #, :host, www.google.com, :service, 443, :nowait, nil
any suggestions? thx
Even though I have properly configured org-caldav I can't use it anymore - Typing "org-caldav" simply gives me no completions in Helm, and there also seems to be no function loaded beginning with these characters.
I do a org-caldav-sync, it errors with
progn: Could not find UID ANNIV-19801103-Some-Name.
in org-caldav-generate-md5-for-org-entry
, then I do another org-caldav-sync and it completes with "Nothing to sync".
I include the bbdb anniversary field in my org-agenda
(require 'bbdb-anniv nil 'noerror)
(when (fboundp 'bbdb-anniv-diary-entries)
(add-hook 'diary-list-entries-hook 'bbdb-anniv-diary-entries))
(when (fboundp 'bbdb-include-anniversaries)
(add-hook 'diary-list-entries-hook 'bbdb-include-anniversaries))
(setq org-agenda-include-diary t)
It's only a minor annoyance, but it would of course be nice to see anniversaries too in my calendar :-)
When I have the following in my .org file, synchronization fails. Note that in the following, github's markdown hides the date in angle backets after SCHEDULED.
** TODO Backup SCHEDULED: <2013-11-02 Sat .+1w> - State "DONE" from "TODO" [2013-10-21 Mon 10:22] - State "DONE" from "TODO" [2013-10-14 Mon 09:09] - State "DONE" from "TODO" [2013-10-03 Thu 11:40] - State "DONE" from "TODO" [2013-09-24 Tue 13:16] - State "DONE" from "TODO" [2013-09-17 Tue 16:58] - State "DONE" from "TODO" [2013-09-10 Tue 10:21] - State "DONE" from "TODO" [2013-08-13 Tue 00:32] - State "DONE" from "TODO" [2013-08-05 Mon 11:18] - State "DONE" from "TODO" [2013-07-23 Tue 21:33] - State "DONE" from "TODO" [2013-07-12 Fri 15:57] - State "DONE" from "TODO" [2013-06-28 Fri 10:58] - State "DONE" from "TODO" [2013-06-21 Fri 14:47] :PROPERTIES: :STYLE: habit :LAST_REPEAT: [2013-10-26 Sat 07:54] :ID: ab03d732-d319-4e41-b698-ef7859a4065c :END:
Minibuffer shows:
Could not find UID TS10-ab03d732-d319-4e41-b698-ef7859a4065c.
When I delete some "State DONE" lines, the problem disappears.
org-caldav-debug buffer contains the following, which looks suspicious:
=== Updating EventDB from Org Org UID ab03d732-d319-4e41-b698-ef7859a4065c: Changed Org UID ab03d732-d319-4e41-b698-ef7859a4065c: Synced Org UID ab03d732-d319-4e41-b698-ef7859a4065c: Synced Org UID ab03d732-d319-4e41-b698-ef7859a4065c: Synced Org UID ab03d732-d319-4e41-b698-ef7859a4065c: Synced Org UID ab03d732-d319-4e41-b698-ef7859a4065c: Synced Org UID ab03d732-d319-4e41-b698-ef7859a4065c: Synced Org UID ab03d732-d319-4e41-b698-ef7859a4065c: Synced Org UID ab03d732-d319-4e41-b698-ef7859a4065c: Synced
Dates with repetitions set in org, with the +1d format, get correctly exported to google calendar. But if I create an event in google calendar and set a repetition for it, when it's imported in org the timestamp doesn't have the repetition.
Hello, I have a calDAV server provided with Kolab 3.1 (using SabreDAV)
I tried to set up org-caldav but when I sync I get
The URL https://totosh.ampoliros.net/iRony/calendars/[email protected]/642e3b…/ does not seem to accept DAV requests
However this is strange. I can access these files with webDAV fine, I also configured some other things for the cardDAV part. I tried different settings (i tried both the "human" calendar id and the long-numerical-id) etc. but none of them worked.
I'm wondering if i'm missing some emacs package! I'm running emacs 24.3.1
Thanks for your help
Hi,
thanks for your great sync script. But is it possible to add support for baikal (http://baikal-server.com/) or radicale (http://radicale.org/) calendar?
I only use the oversized owncloud app because of org-caldav....
Would be great!
with best
Daniel
If a task has only a date stamp in org then the sync seems to work fine. However, if I have either of the useful :SCHEDULED: or :DEADLINE: keywords in org before the date stamp, then, in the first sync, these events go into the calendar but in the second sync they get removed from the calendar with the claim that they got deleted in org. I guess org-caldav somehow cannot find these kind of events in org after the first sync.
hello,
thank you very for this great tool.
I have problems to put my entries in a file+headline
<defvar org-caldav-inbox "~/org/appointments.org">
works fine but something like
<defvar org-caldav-inbox "~/org/appointments.org" "inbox">
doesn't work.
Is there anybody who can give me an example?
Thanks and cheers,
Matthias
Written in the code:
(defvar org-caldav-inbox "~/org/appointments.org"
"Where to put new entries obtained from calendar.
This can be simply be a filename to an Org file where all new
entries will bet put. It can also be an alist, in which case you
can choose between the following options:
- (file \"path/to/file\"), or
- (id \"id of existing org entry\"), or
- (file+headline \"path/to/file\" \"node headline\").")
Since upgrading to org 8.x I fixed the issue egh opened but I'm now experiencing problems with updating events. Creation, deletion, and update FROM calendar work but when I update the active timestamp for the event org-caldav doesn't update it on the calendar.
as title. because I've several computers with emacs installed
The sync with owncloud works perfect.
When i try to sync with my baikal installation i only get the following error:
url-http-options: Selecting deleted buffer
URL and Account Data is set correctly.
Hi, I took the Revision f5c0e27 from 16.11.2014. It connects to the owncloud server and pulls entries. With the second sync it deletes all entries from the remote calendar. My assumption is, that it lacks the org-caldav-files though the variable definition is on the standard value:
(setq org-caldav-files org-agenda-files)
org-agenda-files is a list of four files including the calendar inbox file.
Ich also tried:
(setq org-caldav-files (quote ("/Schreibtisch/Kalender.org" "/Schreibtisch/ToDo.org" "/Schreibtisch/oc-inbox.org" "/.notes.org")))
Sometimes I get error the message: byte-code: Wrong type argument: listp, "~/Schreibtisch/Kalender.org"
Sometimes it just says: „CalDAV Sync finished. / Nothing was done.“
Icalender export (org-icalendar-combine-agenda-files) works well, when done manually. org-caldav-sync writes permanently empty files:
ragp@grmpf:/tmp$ ls -la org-caldav*
…
-rw------- 1 ragp ragp 0 Dez 5 20:42 org-caldav-5459pqM
-rw------- 1 ragp ragp 0 Dez 5 20:57 org-caldav-5459QJf
-rw------- 1 ragp ragp 0 Dez 5 23:18 org-caldav-6166ZhI
-rw-r--r-- 1 ragp ragp 5644 Dez 5 23:26 org-caldav-6244_oz
(The last and only file with content ist done manually. )
I work with: Org-mode version 8.2.10 (release_8.2.10 @ /usr/share/emacs/24.4/lisp/org/)
It would be so nice if it would work.
Georg
Adding an entry like
* TODO
with no text and running org-caldav-sync I get the unhelpful error message
byte-code: Wrong type argument: stringp, nil
A more helpful error message would be nice (had to bisect through my org files to find what caused the error)
Hi,
since the update to iOS 8 I have problems, to sync between emacs and my iDevices.
The sync between emacs and the calendar on the mac still works fine.
If i create a new entry in emacs or the calendar application on the mac a new .ics file appears in my calendar folder end everything is fine.
Example:
folder-matthias-org-caldav
F99F40F0-9763-4E0C-98E5-6EB6EF1DDD78.ics
But if I create a new entry on an iDevide the .ics file appears in a subfolder, located under my calendar folder and synchronisation doesnt’ work.
Example:
folder-matthias-org-caldav
2AF4D8A9-B1F5-4B63-8BB1-D9BDE095F2AD (subfolder)
85EF49B8-F48B-4BE0-8885-9E973015733B.ics
Does anybody has the same problem or know if apple changed something according to caldav in iOS 8 ?
I think its more a problem from iOS 8 than from org-caldav but maybe some of you has the same problem or know a solution/workarround.
Thanks and cheers,
Matthias
Hi,
because of this error i switched from owncloud to baikal. But the error stays the same....
Every sync aborts with the message:
Could not find UID TS10-aa7e8257-c44f-47ef-b8ac-eb72130b8156.
The Message Buffer says:
Duplicate ID "29b80a9d-597d-459e-bea5-f5f671b59ea5", also in file
.....
.....
....
WARNING: 28 duplicate IDs found, check Messages buffer
progn: Could not find UID TS10-aa7e8257-c44f-47ef-b8ac-eb72130b8156.
I have also run "C-u M-x org-caldav-delete-everything" but it changed nothing. :-(
How can i solve this error?
This is what my org-caldav-5c29cd1.el looks like:
;; This is the sync state from org-caldav
;; calendar-id: org-jobb
;; Do not modify this file.
(setq org-caldav-event-list
'(("f88e077b-64ad-4d17-b3b5-987646fab166" "1ac0294a33473f38922ae739ae4706fa" "e9b239ca490a8a1b83394e37a921e08b" nil synced)
("3afbcae5-fc2d-42a2-8e98-b2dd7a0be2fa" "5899654fd48fcfd6f571e4ae05e884db" "17fdc5d228ec273a040e419a0ce57b40" nil synced)
("4558bb80-f12d-4c39-a947-a6fcee8a861c" "c4787ff1d05cad3760439ec9b3fbf578" "909ada5730be0a35553fde2d430d56fc" nil synced)
("bf313aa3-0b85-4b71-adad-42c8121417f7" "4961d813a53d3b3ecc84bc2bf7d3616e" "fdf62dd68e3e73a54f04b01fe8984cd3" nil synced)
("ad68fb7b-11c2-4909-aff5-9bf9a936c6b4" "410b5829dbdd26372e20d6799bf59587" "d8e5dcdbaf508db03f4abbabdb80901a" nil synced)
("2ef492cb-8d75-4ddd-8fda-16aef665f96b" "f21ff1e938431a1c9c12de5a0749a7ba" "6eccd5f4b677de53af6cd581db0eeefc" nil synced)
("9f3be3f0-41aa-4641-a9a8-af93e6d61214" "19fe315fb8928cab3ebd79a0bcc28492" "7e74b18b91237c1e47e18060e38e90ea" nil synced)
("643728c1-5a07-4dfc-8733-c0f4a454f21b" "42974692f9c7fa9cff5b748f90c243e6" "e14025f33bc553eb7b0c73158045c236" nil synced)
("5673ac4d-8c53-4657-bcb2-a3695b8bdecd" "052364a637d9b558b92cc9a762f899fd" "52b549a9f3ec00edcf38ef1637f64c8c" nil synced)
("2babab54-baac-4165-a988-7a5ff93e8b9d" "9e8eb8114c3abb75ff78d469179a6b8b" "390cb10bdf007ce8418320f273bf807c" nil synced)
...))
I believe it should have the full list of items instead of the "..." at the end. I don't know why this happens, but it has happened before.
I have
(setq org-caldav-calendars
'((:calendar-id "org-work"
:agenda-skip-function (org-agenda-skip-work 'inverse)
:inbox "~/Dokument/org/caldav-inbox-work.org")
(:calendar-id "org-home"
:agenda-skip-function org-agenda-skip-work
:inbox "~/Dokument/org/caldav-inbox-home.org")))
which worked great with emacs 24.3, but after 24.4, the upgraded org-mode first started adding PROPERTIES to all entries (regardless of whether they had dates and were to be exported or not), and then org-caldav started putting all my work stuff in my home calendar (saying things like "putting event 1 of 288" which is an obvious hint that things are not working :)).
However, within the regular agenda, the skip commands work fine, so something must not be communicated to the exporter.
When an event is deleted in org, at the end of the sync we can see something like
UID: 3f188258-2cf9-4471-b652-9971463f251d
Status: deleted-in-org Action: removed-from-cal
It would be nice to see the title/summary of the deleted event here. That would give confidence. This information is in the caldav server at this moment.
Hi,
ater upgrading to the current head, I see the following errors in Messages:
Under emacs 23.4.1:
...
Getting event 41 of 41
Wrote /home/wsh/.emacs.d/org-caldav-7838245.el
save-current-buffer: Symbol's function definition is void: pop-to-buffer-same-window
Under emacs 24.2.1:
Contacting host: www.google.com:443
error in process filter: url-http-parse-headers: Wrong type argument: char-or-string-p, nil
error in process filter: Wrong type argument: char-or-string-p, nil
Any idea what are the causes?
Hello,
Does the current version of org-caldav support DavMail? On one hand it is not mentioned either way in the README, on the other there is one mention of it in the .el file itself. As for me, so far I have been unsuccessful getting it going.
My set-up: emacs-24.3 running under Linux, org-mode as bundled with said version of Emacs, org-caldav cloned from master this morning. Relevant bit of .emacs:
(require 'org-caldav)
(setq org-caldav-url "https://caldav.company.com/users/[email protected]")
(setq org-caldav-calendar-id "calendar")
(setq org-caldav-uuid-extension ".EML")
(setq org-caldav-inbox "~/org/remote.org")
Upon running org-caldav-sync I immediately get asked for my user name (which again is [email protected]) and password. The connection then fails with the following error message:
Got error status from PROPFIND:
(("https://caldav.company.com/users/[email protected]/calendar/" DAV:status 401 . ""))
Emacs having trouble authenticating the connection properly? BTW. If I try to connect to the same calendar using Mozilla Thunderbird + Lightning (in which case I combine url and calendar-id into a single URL), everything works fine.
MS
org-caldav is mirrored on the Emacsmirror, which is a large up-to-date collection of Emacs packages.
As the maintainer of the mirror I am trying to resolve feature conflicts that result from one package bundling libraries from another package. I suspect in most cases these libraries were included so that users would not have to find, download and install each dependency manually.
Unfortunately bundling also has negative side-effects: if the bundled libraries are also installed separately, then it is undefined which version actually gets loaded when the respective feature is required.
Initially that isn't a big problem but in many cases upstream changes are not included or only after a long delay. This can be very confusing for users who are not aware that some of the installed packages bundle libraries which are also installed separately. In other cases bugs are fixed in the bundled versions but the fixes are never submitted to upstream.
Also now that Emacs contains the package.el package manager there is a better way to not require users to manually deal with dependencies: add the package (and when that hasn't been done yet the dependencies) to the Melpa package repository. If make
is required to install your make you might want to add it to the el-get (another popular package manager) package repository instead.
Alternatively if you want to keep bundling these libraries please move them to a directory only containing bundled libraries and add the file ".nosearch" to that directory. You can then load the library using something like this:
(or (require 'bundled nil t)
(let ((load-path
(cons (expand-file-name "fallback-libs"
(or load-file-name buffer-file-name)
load-path))))
(require 'bundled)))
Of course if your version differs from the upstream version this might not be enough in which case you should make an effort to get your changes merged upstream.
org-caldav bundles at least the following libraries:
Best regards,
Jonas
(require 'org-caldav)
(setq org-caldav-url "https://www.google.com/calendar/dav")
(setq org-caldav-calendar-id "[email protected]")
(setq org-caldav-inbox "/org/calendar.org")/org/notes.org")
(setq org-caldav-files "
Debugger entered--Lisp error: (wrong-type-argument stringp 126)
file-exists-p(126)
org-check-agenda-file(126)
byte-code(........)
org-agenda-prepare-buffers((126 47 111 114 103 97 110 105 122 101 114 47 115 111 117 114 99 101 47 114 105 115 113 117 101 115 80 115 121 99 104 111 83 111 99 105 97 117 120 46 111 114 103 "/org/calendar.org"))/org/calendar.org")
org-icalendar--combine-files(nil 126 47 111 114 103 97 110 105 122 101 114 47 115 111 117 114 99 101 47 114 105 115 113 117 101 115 80 115 121 99 104 111 83 111 99 105 97 117 120 46 111 114 103 "
apply(org-icalendar--combine-files nil (126 47 111 114 103 97 110 105 122 101 114 47 115 111 117 114 99 101 47 114 105 115 113 117 101 115 80 115 121 99 104 111 83 111 99 105 97 117 120 46 111 114 103 "~/org/calendar.org"))
org-caldav-generate-ics()
org-caldav-sync-calendar()
org-caldav-sync()
call-interactively(org-caldav-sync record nil)
command-execute(org-caldav-sync record)
execute-extended-command(nil "org-caldav-sync")
Any idea about what's going wrong?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.