emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nick Dokos <nicholas.dokos@hp.com>
To: aldrin d'souza <aldrindsouza@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: UIDs in icalendar export (exporting my agenda)
Date: Wed, 15 Jul 2009 15:17:20 -0400	[thread overview]
Message-ID: <18870.1247685440@gamaville.dokosmarshall.org> (raw)
In-Reply-To: Message from "aldrin d'souza" <aldrindsouza@gmail.com> of "Wed, 15 Jul 2009 23:28:34 +0530." <dd3cb46b0907151058u74f92b05u97c4a79029dcea3e@mail.gmail.com>

aldrin d'souza <aldrindsouza@gmail.com> wrote:

> i want to export my org-agenda as an icalendar file so that i can load it into some online calendar and access it on my phone. however, i'm facing some
> issues with the iCalendar files which org is generating. i can reproduce the problem by using org-export-icalendar-this-file on the following (simple)
> org file
> 
> ---<test.org>----
> * <2009-05-24 +1y> bob dylan
> * <2009-01-27 +1y> mozart
> ---</test.org>----
> 
> here's the test.ics that gets generated:
> 
> ---<test.ics>----
 ....
> ---</test.ics>----
> 
> if you notice, the UIDs in both the events are same. aren't they supposed to be different? when i import this file into an online calendar (like google)
> one of the event is dropped.
> am i missing something? i'm using org 6.28trans on emacs 23.0.94.
> 

I tried your test.org and my test.ics has different UIDs for the two events.
They also have a different format:

UID: TS-01503584-f7a0-4b1d-b826-6a573852c4f7
UID: TS-891e3508-5228-4101-84dd-72f509a4b757

so we must be using different methods of UID generation. What is the value
of org-id-method in your setup? Mine says:

   C-h v org-id-method<RET>

,----
| org-id-method is a variable defined in `org-id.el'.
| Its value is uuidgen
| ...
`----

Then, looking at the code, the UID is set through this expression:

		(if org-icalendar-store-UID
			(org-id-get-create)
		      (or (org-id-get) (org-id-new)))

I presume (but you should check) that you have org-icalendar-store-UID
set to t (mine is defaulted to nil) which means that it gets the UID
stored in an ID property in the item (with the variable set to nil, a
new UID is generated every time, which is OK for experimentation, but
probably not OK for synchronizing: you'd want the ID of an item to
remain constant in that case).

Could it be that both your items have the same value for this property?
What happens if you delete the ID value from one (or both) and then try
the export again?

HTH,
Nick

  reply	other threads:[~2009-07-15 19:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-15 17:58 UIDs in icalendar export (exporting my agenda) aldrin d'souza
2009-07-15 19:17 ` Nick Dokos [this message]
2009-07-15 19:43 ` Magnus Henoch
2009-07-16  5:29   ` aldrin d'souza

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=18870.1247685440@gamaville.dokosmarshall.org \
    --to=nicholas.dokos@hp.com \
    --cc=aldrindsouza@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).