emacs-orgmode
[Top][All Lists]
Advanced

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

[Orgmode] Re: Diary synchronising with Google calendar


From: Eric S Fraga
Subject: [Orgmode] Re: Diary synchronising with Google calendar
Date: Fri, 09 Jul 2010 21:28:27 +0100
User-agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (Gojō) APEL/10.7 Emacs/23.2 (i486-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)

On Fri, 9 Jul 2010 21:35:53 +0200, Jordi Inglada <address@hidden> wrote:
> 
> Hi Eric,
> 
> Sorry for bothering you again.

No problem!  I've "bothered" plenty of people in the past...

> First of all, the google2org workflow works perfect with your last
> script. Thanks!

Excellent.  You're very welcome.

> However, I do not understand how to proceed in the other direction
> (org2google). I got your advice function, but I don't know what to do
> with it ...

Well, you have to execute both elisp statements, the one that defines
the "advice" and the one that activates this advice.  If you want this
done every time, copy the code into your .emacs (or equivalent),
placing it after the code which loads org.

Once activate, the code in the advice will be automatically executed
every time you insert an entry in the diary (more below).

Note, however, that this advice assumes the following:

1. that you have installed the google command line scripts and that
   the "google" command is found at /usr/bin/google.  If it is
   somewhere else, please change the relevant line in the code.

2. that you have already authenticated yourself to Google, doing for
   instance a manual add of an entry to the calendar directly from the
   shell, i.e. executing something like

   google add --cal org "This is a test entry for 2pm"

Of course, the latter also assumes that you have created a calendar
named "org" in Google's calendar.

> Could you describe how things work when you add an entry to your
> diary.org file? Which is the fucntion executed for this? How comes
> that the advice is activated?

I have defined diary.org as the target for any agenda diary entries:

(setq org-agenda-diary-file "~/git/notes/diary.org")

and it is one of my agenda files.  Therefore, when I view the agenda
(default: "C-c a a"), and then ask to insert a diary entry ("i d"),
this will invoke the function which I have "advised" and the google
script will be called.

Hope this helps.
-- 
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]