emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric S Fraga <ucecesf@ucl.ac.uk>
To: Jordi Inglada <jordi.inglada@cesbio.cnes.fr>
Cc: org-mode mailing list <emacs-orgmode@gnu.org>
Subject: Re: Diary synchronising with Google calendar
Date: Fri, 09 Jul 2010 21:28:27 +0100	[thread overview]
Message-ID: <87mxu0iems.wl%ucecesf@ucl.ac.uk> (raw)
In-Reply-To: <19511.31257.267848.353668@gargle.gargle.HOWL>

[-- Attachment #1: Type: text/plain, Size: 1987 bytes --]

On Fri, 9 Jul 2010 21:35:53 +0200, Jordi Inglada <jordi.inglada@cesbio.cnes.fr> 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.

[-- Attachment #2: Type: text/plain, Size: 75 bytes --]

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

[-- Attachment #3: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

  parent reply	other threads:[~2010-07-09 20:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-07 21:19 Diary synchronising with Google calendar Jordi Inglada
2010-07-07 22:20 ` Eric S Fraga
     [not found] ` <25098780.22494.1278541157993.JavaMail.root@zm-cesbio-01>
     [not found]   ` <19511.31257.267848.353668@gargle.gargle.HOWL>
2010-07-09 20:28     ` Eric S Fraga [this message]
     [not found]     ` <18737865.23968.1278707659240.JavaMail.root@zm-cesbio-01>
     [not found]       ` <19512.6390.427253.455577@gargle.gargle.HOWL>
2010-07-10 22:10         ` Eric S Fraga

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=87mxu0iems.wl%ucecesf@ucl.ac.uk \
    --to=ucecesf@ucl.ac.uk \
    --cc=e.fraga@ucl.ac.uk \
    --cc=emacs-orgmode@gnu.org \
    --cc=jordi.inglada@cesbio.cnes.fr \
    /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).