From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Abrahamsen Subject: Re: [OT] org-caldav and radicale Date: Tue, 20 Jan 2015 17:51:10 +0800 Message-ID: <87zj9dok4x.fsf@ericabrahamsen.net> References: <87oapvxvnu.fsf@ericabrahamsen.net> <54BD7043.2080205@gmx.de> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41145) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YDVMo-0003pA-1K for emacs-orgmode@gnu.org; Tue, 20 Jan 2015 04:44:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YDVMj-00019F-Sy for emacs-orgmode@gnu.org; Tue, 20 Jan 2015 04:44:57 -0500 Received: from plane.gmane.org ([80.91.229.3]:45586) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YDVMj-000193-LR for emacs-orgmode@gnu.org; Tue, 20 Jan 2015 04:44:53 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1YDVMg-0008Cp-O6 for emacs-orgmode@gnu.org; Tue, 20 Jan 2015 10:44:51 +0100 Received: from 123.122.44.237 ([123.122.44.237]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 20 Jan 2015 10:44:50 +0100 Received: from eric by 123.122.44.237 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 20 Jan 2015 10:44:50 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Simon Thum writes: > On 01/19/2015 05:05 AM, Eric Abrahamsen wrote: >> I'm finally getting around to trying to have an Org-generated calendar >> available on my Android tablet. I looked at a few caldav servers, and >> settled on Radicale as looking like about the right level of >> usability/configurability. >> >> I don't think I'm doing it right, and can't find any examples online. >> Can someone who's doing this (I know there are some of you) just show me >> the basic configuration? Specifically, how do I create a new calendar on >> the server, and how do I refer to it? My Radicale config has this: > > Well I just put it on my server over http/DAV and have it > auto-regenerate from org (happens to be in git on the same machine) > using a script. But even if you generate locally and push, the > following might help you: Thanks Simon! It's true that it wouldn't be too hard just to export an ics and get it onto the server somehow. But I'd still like to use org-caldav, as it allows for two-way syncing, and that gets more complex. I guess I'll just poke around in org-caldav and see exactly what it's doing, and figure out where I'm going wrong. > export bash script: > > # export ical via org (funnyly, the X.org-trick causes harm here) > echo ">>> exporting iCalendar..." > emacs -batch -l ~/.emacs.d/init.el -l ~/bin/ical-export-3.el --kill > > echo ">>> done with export." > > > export elisp script: > > > ;; export icalendar using new icalendar exporter > (require 'ox-icalendar) > > ; remove-if and friends > (require 'cl) > > ; inhibit source block execution during export > (setq org-export-babel-evaluate nil) > > ;; TODO check this TZ (also if to give decimal 47 (solidus) prefix) > (setq org-icalendar-timezone "Europe/Berlin") > > ;; while this violates iCal (missing VTIMEZONE), it is the nicest of > options for my setup > (setq org-icalendar-date-time-format ";TZID=%Z:%Y%m%dT%H%M%S") > > ;; Mins alarm > (setq org-icalendar-alarm-time 15) > > ;; use inhertited tags for iCal categories (add TODO state?) > (setq org-icalendar-categories '(all-tags)) > > ;; target file > (setq org-icalendar-combined-agenda-file "~/org-export/all.ics") > > ; create sumo "all.ics" iCal > (org-icalendar-combine-agenda-files) > > ; create one without external stuff; sadly tags cannot yet be used > (let ( > (org-agenda-files (remove-if (lambda (f) (string-match > "external" f)) (org-agenda-files))) > (org-icalendar-combined-agenda-file "~/org-export/org-native.ics") > ) > (org-icalendar-combine-agenda-files) > ) > > > The last part (without external) is only relevant if you have external > calendars represented in org that you do not neccessarily want > re-represented in the ical. Anyway, tweak as neccessary. > > > HTH, > > Simon > >> >> [storage] >> type = filesystem >> filesystem_folder = /home/eric/apps/cal/collections >> >> If I touch a file called "eric" in the "collections" directory, and then >> access the server via HTTP (ie http://cal.myserver.com/eric), the file >> is correctly served as an (empty) calendar and downloaded by my browser. >> >> How do I get org-caldav to mesh with that? I thought this would do it: >> >> (setq org-caldav-url "http://cal.myserver.com") >> (setq org-caldav-calendar-id "eric") >> >> But when I call `org-caldav-sync' it first collects all the headings >> it's supposed to, and then gives me: >> >> org-caldav-get-event-etag-list: Error while getting eventlist from >> http://cal.myserver.com/eric/. Got status code: 207. >> >> If I run it again, it offers to delete all the relevant Org headings. >> >> I suspect I've just got something configured wrong, but can't think of >> what. Any pointers? >> >> Thanks! >> Eric >> >> >>