From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Morrissey Subject: Re: "S:" prefix when syncing via CalDAV Date: Sun, 23 Jul 2017 17:02:14 -0400 Message-ID: <20170723210214.f5kccngmufqr57ts@boost.horde.net> References: <20170719191841.b3hevzvh7ths3mqo@boost.horde.net> <87lgnfmlhs.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35306) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dZO15-0002mM-I6 for emacs-orgmode@gnu.org; Sun, 23 Jul 2017 17:02:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dZO12-00064s-GQ for emacs-orgmode@gnu.org; Sun, 23 Jul 2017 17:02:19 -0400 Received: from boost.horde.net ([69.55.65.181]:43694) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dZO12-00064T-Bj for emacs-orgmode@gnu.org; Sun, 23 Jul 2017 17:02:16 -0400 Content-Disposition: inline In-Reply-To: <87lgnfmlhs.fsf@nicolasgoaziou.fr> 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" To: Nicolas Goaziou Cc: emacs-orgmode@gnu.org On Sun, Jul 23, 2017 at 01:38:23PM +0200, Nicolas Goaziou wrote: > John Morrissey writes: > > > I'm syncing to Nextcloud via CalDAV with org-mode 9.0.3 and the latest > > org-caldav. > > > > Events are sometimes synced (and modified in the .org file) with the > > prefix "S:". The symptoms are exactly like: > > > > https://github.com/dengste/org-caldav/issues/33#issuecomment-74551937 > > > > "The SCHEDULED time gets converted to an active timestamp and a > > freshly created property drawer with a new id is inserted above that > > newly created active timestamp." > > > > It looks like this prefix is being prepended by org-icalendar-entry in > > ox-icalendar, but I don't know enough about Lisp or org internals to > > debug much further. > > > > Here are my org-{icalendar,caldav} settings: > > > > (setq org-icalendar-alarm-time 30) > > (setq org-icalendar-use-deadline '(event-if-todo event-if-not-todo todo-due) > > org-icalendar-use-scheduled '(event-if-todo event-if-not-todo todo-start)) > > (setq org-export-exclude-category (list "dummy")) > > > > (setq org-caldav-inbox (expand-file-name "~/org/caldav-inbox.org")) > > (setq org-caldav-files org-agenda-files) > > (setq org-caldav-show-sync-results nil) > > (setq org-caldav-resume-aborted 'never) > > > > Is there some configuration I need to change to stop this behavior? > > Since "org-caldav.el" is not distributed with Org mode, I need to > understand what part of the problem is specifically related to > "ox-icalendar.el". > > Could you show an example demonstrating why the generated ".ics" file is > not correct, and what should be done instead? Hi Nicolas, the behavior I'm observing isn't so much that the .ics is incorrect. Instead, it's what happens to the corresponding item in the org file. For example, an entry that looks like: * TODO do a thing SCHEDULED: <2017-07-24 Mon> :PROPERTIES: :ID: 03fe6016-6373-450f-aa31-e8403a573c49 :END: turns into: * TODO S: call european motorsports :PROPERTIES: :ID: ca7ecc02-0c67-4c22-ad6c-9c06e6d19e9a :END: <2017-07-24 Mon> :PROPERTIES: :ID: 03fe6016-6373-450f-aa31-e8403a573c49 :END: "S:" is prepended, the scheduled timestamp is replaced by an active timestamp, and an additional properties drawer is created with a different ID. This happens with deadline items, too. This usually happens around the time of the scheduled/deadline timestamp, so an item can sync just fine until sometime around the scheduled date, then this transformation happens. It doesn't seem to happen at any fixed point relative to the scheduled/deadline timestamp. Sometimes several CalDAV syncs will happen on the day of the timestamp before one sync finally triggers(?) the transformation. Does that make sense? I don't know much Lisp or org internals, so I'm not entirely sure where this is happening. The only reference point I could find in the code is in ox-icalendar where it inserts the "S:" prefix, which happens concurrently with the other org item transformations I mentioned above. -john