From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?S=C3=A9bastien?= Delafond Subject: icalendar export skips todos with a scheduled time-range Date: Thu, 12 Apr 2012 12:10:37 +0000 (UTC) Message-ID: <20120412140601.494@usenet.piggo.com> Return-path: Received: from eggs.gnu.org ([208.118.235.92]:34549) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SIIrk-0002zT-EI for emacs-orgmode@gnu.org; Thu, 12 Apr 2012 08:11:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SIIrb-0000hb-Kw for emacs-orgmode@gnu.org; Thu, 12 Apr 2012 08:11:07 -0400 Received: from plane.gmane.org ([80.91.229.3]:44836) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SIIrb-0000hJ-De for emacs-orgmode@gnu.org; Thu, 12 Apr 2012 08:10:59 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1SIIrW-00071c-T2 for emacs-orgmode@gnu.org; Thu, 12 Apr 2012 14:10:54 +0200 Received: from 74.123.29.134 ([74.123.29.134]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 12 Apr 2012 14:10:54 +0200 Received: from sdelafond by 74.123.29.134 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 12 Apr 2012 14:10:54 +0200 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 Hello, >From Debian bug #668496[0]: If I have an org-file containing a todo with a scheduled date range, like this: ,----[ foo.org ] *** TODO Weekend with the lads SCHEDULED: <2012-05-04 Fr>--<2012-05-08 Di> `---- and try to export it via org-export-icalendar-this-file, the resulting foo.ics will look like this ,----[ foo.ics ] BEGIN:VCALENDAR VERSION:2.0 X-WR-CALNAME:foo PRODID:-//Friedrich Delgado//Emacs with Org-mode//EN X-WR-TIMEZONE:Europe/Berlin X-WR-CALDESC:nil CALSCALE:GREGORIAN END:VCALENDAR `---- (i.e.: contain no appointments at all) I think the responsible section of code may reside in /usr/share/emacs23/site-lisp/org-mode/org-icalendar.el, line 360: ,---- (if (looking-at re2) (progn (goto-char (match-end 0)) (setq ts2 (match-string 1) inc (not (string-match "[0-9]\\{1,2\\}:[0-9][0-9]" ts2)))) (setq tmp (buffer-substring (max (point-min) (- pos org-ds-keyword-length)) pos) ts2 (if (string-match "[0-9]\\{1,2\\}:[0-9][0-9]-\\([0-9]\\{1,2\\}:[0-9][0-9]\\)" ts) (progn (setq inc nil) (replace-match "\\1" t nil ts)) ts) deadlinep (string-match org-deadline-regexp tmp) scheduledp (string-match org-scheduled-regexp tmp) todo (org-get-todo-state) ;; donep (org-entry-is-done-p) )) `---- From my basic understanding of the code-flow it looks like re2 == (concat "--?-?\\(" org-ts-regexp "\\)") is meant to match date-ranges, but the code in the t branch of the if doesn't set deadlinep, schedulep and todo, preventing all further processing of the entry. But I may be wrong about the intentions of that function. Cheers, --Seb [0] http://bugs.debian.org/668496