[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Yak-shaving from org-caldav to url-dav.el

From: Alexis
Subject: Yak-shaving from org-caldav to url-dav.el
Date: Mon, 30 Jun 2014 21:27:17 +1000

Hi all,

Trying to get org-caldav working has raised a tangled web of issues,
which i'm not sure i can tease apart enough to be able to submit
suitable bug reports.

Context: Emacs 24.3.92 on 32-bit Debian Wheezy. The CalDAV server with
which i'm trying to interact is DAViCal 1.1.1; i can confirm that the
server works fine with IceDove/Thunderbird.

(1) Calling the `org-caldav-sync` command results in failure:

> Got error status from PROPFIND: 
> (("[calendar URL]" DAV:status 207 . " "))

The `org-caldav` page:



> This package depends on the url-dav package, which unfortunately is
> broken in Emacs <=24.2. If you don't want to upgrade Emacs, you can
> get a working version here:
> http://randomsample.de/url-dav.el

One critical bit of code included in this version, but not in the
24.3.92 version of `url-dav.el`, are lines 420-423:

    ;; This package was initially written for a different kind of
    ;; QNAMES expansion, hence we have now to rewrite those so that
    ;; for example ("DAV:" . "foo") becomes the symbol 'DAV:foo.
    (url-dav-changexml (car tree))

Without this, HTTP 207 ("Multi-Status") responses from the CalDAV
server aren't processed correctly, resulting in the "error status from
PROPFIND" failure.

(2) So, let's "(load)" the randomsample version of `url-dav.el`. Doing
so results in a new failure:

> "The URL [calendar URL] does not seem to accept DAV requests"

It turns out the problem is in this version's `url-dav-supported-p`;
specifically, the line:

    (fboundp 'xml-expand-namespace)

which, from what i can tell, was removed from `url-dav.el` in 2012.

(3) So, let's comment out that line. Doing so results in a new

> "No child nodes in DAV:prop"

when in `url-dav-process-DAV:prop`. This is rather odd, because if we

    (let ((url-request-extra-headers '(("Depth: 1")))
          (url-request-method "PROPFIND"))
      (display-buffer (url-retrieve-synchronously (org-caldav-events-url))))

the buffer shows that there are two `<response>` elements in the
`<multistatus>` tag, the second of which contains a fully-fleshed out
`<prop>` element, which itself contains the details of the single
event on that calendar.

(4) Finally, not a functionality issue, but a maintenance issue:
what's with the comment on line 409 of the 24.3.92 version of

    ;; We should now be

It looks like it's been truncated, but that line apparently hasn't
been modified since initial checkin in 2004.

So i'm now stuck. Am i doing something wrong? Any suggestions for how
i might be able to proceed?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]