emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [Orgmode] Adding entries to Google calendar


From: Eric S Fraga
Subject: Re: [Orgmode] Adding entries to Google calendar
Date: Sat, 04 Sep 2010 17:34:19 +0100
User-agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (Gojō) APEL/10.8 Emacs/23.2 (i486-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)

On 4 Sep 2010 16:21:08 +0200, "Sven Bretfeld" <address@hidden> wrote:
> 
> Hi to all
> 
> I try to automatically add newly created dates to GoogleCalendar via
> GoogleCL. I have tried Eric Fraga's code from:
> 
> http://osdir.com/ml/emacs-orgmode-gnu/2010-07/msg00265.html
> 
> but I can't get it to work, nor do I understand it (is it complete?).

I'm not sure what you mean about complete.  It requires you to have
installed the Google command line tools (googlecl from Google Code).
However, this emacs lisp code is not what I would call full-featured
;-)

In any case, what happens when you try to get it to work?  The Google
command line tools are /fragile/, to say the least, but they do sort
of work.  What happens if you type

  google calendar list

at the command line?  Do the entries in your main Google calendar
appear as output?

What happens if you type in something like

  google calendar add "Do something interesting at 3pm tomorrow"

(or similar)?  You have to get these working before the emacs lisp
code I posted will have a chance of working.

Next, the emacs lisp code I posted assumes that you will have created
a Google calendar called "org" (to make it easy to clean up without
affecting your main Google calendar).  This has to be done via
google's calendar web interface directly (link for "add" below "My
calendars").  After that, you should be able to say things like

  google calendar list --cal org
  google calendar add --cal org "Do something really exciting at 9pm"

I hope this helps.

> Anyway, his approach depends on adding org-entries to diary. So, as far
> as I understand it, you have to create new schedules in a rather special
> way. Most people, I think, use remember, org-capture or insert new dates
> directly into an org file.

yes, it is definitely limited in this sense: only entries added via
the org-agenda-diary-entry interface can be added.  However, the
mechanism is there to support hooking into capture specifically and
possibly into org-time-stamp or org-schedule, say.  I don't use Google
calendar for scheduled tasks or deadlines so the latter don't matter
to me; I use it for appointments and my work flow is that I always
bring up the agenda view to see if my time is free before making the
appointment.

> What I (and probably others) need is a way to trigger a call of 'google
> calendar add' as soon as a new date is created by org-remember etc. What
> would be the best way to do this?

I'll let others answer this as I will get it wrong (I had been about
to suggest some form of org-post-capture-hook but there doesn't seem
to be any such variable...).

However, all you need to do is extract the information you want to
pass to google calendar and then execute the particular command.

> Up to now, although a full syncing orgmode with GoogleCalendar is not
> possible, we are quite close to it thanks to Eric's '2x2 method' and his
> awk-script solution. But that solves only three quarters of the
> problem.

Yes, I agree completely.  We're not really close, particularly because
you can't inform either org or google about deletions made in the
other.  Adding in either with links to the other works "okay" but the
inverse is not possible.

> Informing GoogleCalendar about dates one has created with org still
> needs the awkward manual import of ics-files via a web-browser. I think
> there could be a better solution.

Well, no, not if you can get the google command line scripts working.

Let me know how you get on.

eric
-- 
Eric S Fraga
GnuPG: 8F5C 279D 3907 E14A 5C29  570D C891 93D8 FFFC F67D

reply via email to

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