emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Adding entries to Google calendar
@ 2010-09-04 14:21 Sven Bretfeld
  2010-09-04 16:34 ` Eric S Fraga
  0 siblings, 1 reply; 16+ messages in thread
From: Sven Bretfeld @ 2010-09-04 14:21 UTC (permalink / raw)
  To: emacs-org

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?).
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.

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?

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.
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.

Greetings,

Sven

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Adding entries to Google calendar
  2010-09-04 14:21 Adding entries to Google calendar Sven Bretfeld
@ 2010-09-04 16:34 ` Eric S Fraga
  2010-09-04 19:49   ` Sven Bretfeld
  0 siblings, 1 reply; 16+ messages in thread
From: Eric S Fraga @ 2010-09-04 16:34 UTC (permalink / raw)
  To: Sven Bretfeld; +Cc: emacs-org

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

On 4 Sep 2010 16:21:08 +0200, "Sven Bretfeld" <sven.bretfeld@gmx.ch> 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

[-- 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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Adding entries to Google calendar
  2010-09-04 16:34 ` Eric S Fraga
@ 2010-09-04 19:49   ` Sven Bretfeld
  2010-09-05 11:48     ` Eric S Fraga
  0 siblings, 1 reply; 16+ messages in thread
From: Sven Bretfeld @ 2010-09-04 19:49 UTC (permalink / raw)
  To: emacs-org

Hi Eric

Eric S Fraga <ucecesf@ucl.ac.uk> writes:

> 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
> ;-)

There were several problems, most of which I have solved by now. First,
I didn't set org-agenda-diary-file. So, calling "i" from an agenda-view
merely opened the default diary file. That's why I wondered when
exactly the advice comes into play. (Therefore I suspected the code to
be possibly incomplete -- sorry, my fault.)

Now, the principle procedure works. Entries show up in Google after I
added them with org-agenda-diary-entry. 

There is one thing left. You have structured the shell-command according
to the American GoogleCL syntax. That's not working with the German
locale. For a German GoogleCalendar the only syntax I found working is:

  google calendar add --cal org "Test am 5.9.2010 um 14:00-16:00"

It's not problem, of course, to change the format of the shell-command.
But, the German GoogleCalendar doesn't seem to understand commands with
the time of day as the first argument. For example:

  google calendar add --cal org "14:00-16:00 Test am 5.9.2010"

results in an entry called "Test am" (instead of "Test") with the
correct time of the day but on the wrong calendar day, it is inserted to
today's column (Sat 4.9.2010 instead of Sun 5.9.2010). Strangely enough, the
correct date occurs nowhere in the entry, so it was not interpreted as
part of the text. This shows that we are dealing with a bug in GoogleCL.

Alas, there seems no description of the possible syntactical variants
available on the web. So I did try-and-error: with and without the "am"
and "um", with the English "on", with ISO formated dates etc etc. Except
the above structure 'text am date um time' no combination works.

I fear, there are only two solutions:

  1. As a workaround I have set my GoogleCalendar to the American
     locale. With that everything works fine.

  2. We have to isolate the time of day from the diary-entry as a
     further variable (not as part of the variable "text"), so that
     Germans can format the command correctly. Can you help me with
     that?

> However, the mechanism is there to support hooking into capture
> specifically and possibly into org-time-stamp or org-schedule, say. 

I have tried to work out an advice to org-time-stamp and/or
org-remember-finish today. But my Lisp is too weak. I couldn't figure
out how to grab the data.

> 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.

That's also my work flow, except of using org-remember "k-r" instead of
"i". I like to have everything in one org-file. But I can get used to
keep my appointments in a separate diary file. I can refile them to the
appropriate places during the "weekly review" which, then, ends with the
upload of a new ics file.

Thanks for sharing your code and your help

Sven

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Adding entries to Google calendar
  2010-09-04 19:49   ` Sven Bretfeld
@ 2010-09-05 11:48     ` Eric S Fraga
  2010-09-08  9:04       ` Sven Bretfeld
  0 siblings, 1 reply; 16+ messages in thread
From: Eric S Fraga @ 2010-09-05 11:48 UTC (permalink / raw)
  To: Sven Bretfeld; +Cc: emacs-org

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

On 4 Sep 2010 21:49:25 +0200, "Sven Bretfeld" <sven.bretfeld@gmx.ch> wrote:
> 
> Hi Eric
> 
> Eric S Fraga <ucecesf@ucl.ac.uk> writes:
> 
> > 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
> > ;-)
> 
> There were several problems, most of which I have solved by now. First,
> I didn't set org-agenda-diary-file. So, calling "i" from an agenda-view
> merely opened the default diary file. That's why I wondered when
> exactly the advice comes into play. (Therefore I suspected the code to
> be possibly incomplete -- sorry, my fault.)

ah!  yes, the code is complete but the instructions are not.

> Now, the principle procedure works. Entries show up in Google after I
> added them with org-agenda-diary-entry. 
> 
> There is one thing left. You have structured the shell-command according
> to the American GoogleCL syntax. That's not working with the German
> locale. For a German GoogleCalendar the only syntax I found working is:

[...]

> Alas, there seems no description of the possible syntactical variants
> available on the web. 

Yes, Google do not appear to be very forthcoming with their parsing
algorithms.  I had to do a lot of trial and error, especially to
support block entries, and I think the result is fragile at best.

> So I did try-and-error: with and without the "am"
> and "um", with the English "on", with ISO formated dates etc etc. Except
> the above structure 'text am date um time' no combination works.
> 
> I fear, there are only two solutions:
> 
>   1. As a workaround I have set my GoogleCalendar to the American
>      locale. With that everything works fine.
> 
>   2. We have to isolate the time of day from the diary-entry as a
>      further variable (not as part of the variable "text"), so that
>      Germans can format the command correctly. Can you help me with
>      that?

I this moment (swamped with a project application), all I can suggest
is you look at org's time parsing codes for handling new agenda
entries.  The text must be parsed somewhere...  If you use the same
code within the advice, you should be able to pick off the times.

I'll add this to my todo list but I won't get a chance to play anytime
soon unfortunately.

> > However, the mechanism is there to support hooking into capture
> > specifically and possibly into org-time-stamp or org-schedule, say. 
> 
> I have tried to work out an advice to org-time-stamp and/or
> org-remember-finish today. But my Lisp is too weak. I couldn't figure
> out how to grab the data.

Maybe post what you did to this list and somebody might be able to
help?

> > 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.
> 
> That's also my work flow, except of using org-remember "k-r" instead of
> "i". I like to have everything in one org-file. But I can get used to
> keep my appointments in a separate diary file. I can refile them to the
> appropriate places during the "weekly review" which, then, ends with the
> upload of a new ics file.

Can the diary file not be your all-in-one org file?

[-- 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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Adding entries to Google calendar
  2010-09-05 11:48     ` Eric S Fraga
@ 2010-09-08  9:04       ` Sven Bretfeld
  2010-09-08 15:34         ` Matt Price
  0 siblings, 1 reply; 16+ messages in thread
From: Sven Bretfeld @ 2010-09-08  9:04 UTC (permalink / raw)
  To: Eric S Fraga; +Cc: emacs-org

Hi Eric

Eric S Fraga <ucecesf@ucl.ac.uk> writes:

>> Alas, there seems no description of the possible syntactical variants
>> available on the web. 
>
> Yes, Google do not appear to be very forthcoming with their parsing
> algorithms.  I had to do a lot of trial and error, especially to
> support block entries, and I think the result is fragile at best.

So far it works with the language of GoogleCalendar set to US English.

>>   2. We have to isolate the time of day from the diary-entry as a
>>      further variable (not as part of the variable "text"), so that
>>      Germans can format the command correctly. Can you help me with
>>      that?
>
> I this moment (swamped with a project application), all I can suggest
> is you look at org's time parsing codes for handling new agenda
> entries.  The text must be parsed somewhere...  If you use the same
> code within the advice, you should be able to pick off the times.
>
> I'll add this to my todo list but I won't get a chance to play anytime
> soon unfortunately.

Yes, I see. Same for me. I think we can live with this workaround for the
moment. Probably (hopefully), GoogleCL will be developped in a way more
suited in the near future. Until that happens, we can suggest people to
use an English setting of GoogleCalendar. Most org users will probably
use Google as a secondary method anyway.

>> That's also my work flow, except of using org-remember "k-r" instead of
>> "i". I like to have everything in one org-file. But I can get used to
>> keep my appointments in a separate diary file. I can refile them to the
>> appropriate places during the "weekly review" which, then, ends with the
>> upload of a new ics file.
>
> Can the diary file not be your all-in-one org file?

As far as I see, the entries created by the "diary method" can't be
configured according to level and exact location within the diary.org
file. The entries are written in a tree structure beginning with the
year at the beginning of the file. This would spoil the organization
structure of my main org file.

Thanks very much for your help,

Sven

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Adding entries to Google calendar
  2010-09-08  9:04       ` Sven Bretfeld
@ 2010-09-08 15:34         ` Matt Price
  2010-09-08 15:58           ` Matt Price
                             ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Matt Price @ 2010-09-08 15:34 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 1268 bytes --]

Hi Erik et cal,

After having put it off for a ocuple of months finally trying to set this
up.  I have both halves of Erik's code working now -- the ical2org that
syncs from google, and the elisp wrapper on googlecl that syncs from org
(see http://osdir.com/ml/emacs-orgmode-gnu/2010-07/msg00265.html and
http://osdir.com/ml/emacs-orgmode-gnu/2010-07/msg00353.html).   I'm still
having a couple of little workability issues, that I think people on this
list have likely already solved, so if I may, briefly:

- as I understand it this system will only work with entries that have been
added via "i" in a calendar-mode org agenda view.  When I try to add items
this way I am never prompted for a time, only a date.  Am I missing
something here?

- Sven says something about using org-remember to do the same work -- it's
not clear to me whether you have that working, Sven.  In any case would it
be difficult to use org-capture instead of the diary?  That would certainly
be better for my workflow, since i'm not in my calendar view very often
(htough i suppose if i'm making an appointment maybe i ought to be.

I really appreciate the help -- my time management is severely remedial and
I really would like org-mode ot be the tool that fixes that for me.  Best,
Matt

[-- Attachment #1.2: Type: text/html, Size: 1494 bytes --]

[-- Attachment #2: 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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Adding entries to Google calendar
  2010-09-08 15:34         ` Matt Price
@ 2010-09-08 15:58           ` Matt Price
  2010-09-08 17:12           ` Stephen Eglen
  2010-09-09  8:56           ` Sven Bretfeld
  2 siblings, 0 replies; 16+ messages in thread
From: Matt Price @ 2010-09-08 15:58 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 886 bytes --]

On Wed, Sep 8, 2010 at 11:34 AM, Matt Price <moptop99@gmail.com> wrote:

>
>
> - Sven says something about using org-remember to do the same work -- it's
> not clear to me whether you have that working, Sven.  In any case would it
> be difficult to use org-capture instead of the diary?  That would certainly
> be better for my workflow, since i'm not in my calendar view very often
> (htough i suppose if i'm making an appointment maybe i ought to be.
>

so, having looked at the code a little more closely, I guess my question is,
can erik's defadvice be converted somehow into a hook that gets executed at
the end of an  org-capture event, provided that the org-capture template is
suitably set up?  I don't really understand how defadvice works, and where,
for instance, ad-get-arg gets its arguments from (so that the relevant
calendar fields can be defined properly).

Matt
>
>
>

[-- Attachment #1.2: Type: text/html, Size: 1369 bytes --]

[-- Attachment #2: 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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Adding entries to Google calendar
  2010-09-08 15:34         ` Matt Price
  2010-09-08 15:58           ` Matt Price
@ 2010-09-08 17:12           ` Stephen Eglen
  2010-09-08 22:23             ` Matt Price
  2010-09-09  8:56           ` Sven Bretfeld
  2 siblings, 1 reply; 16+ messages in thread
From: Stephen Eglen @ 2010-09-08 17:12 UTC (permalink / raw)
  To: emacs-orgmode

Matt Price <moptop99@gmail.com> writes:


> - as I understand it this system will only work with entries that have
> been added via "i" in a calendar-mode org agenda view.  When I try to
> add items this way I am never prompted for a time, only a date.  Am I
> missing something here?

hi Matt,
Carsten accepted a patch of mine a while ago that allows you to do stuff
like the following from the agenda:

"i d RET 09:00-09:30 meeting with Joe"

and the time is extracted from the text you enter, if you set:

(setq org-agenda-insert-diary-extract-time t)

Stephen

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Adding entries to Google calendar
  2010-09-08 17:12           ` Stephen Eglen
@ 2010-09-08 22:23             ` Matt Price
  2010-09-09  9:25               ` Stephen Eglen
  2010-09-10  8:28               ` Eric S Fraga
  0 siblings, 2 replies; 16+ messages in thread
From: Matt Price @ 2010-09-08 22:23 UTC (permalink / raw)
  To: Stephen Eglen, emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 1391 bytes --]

On Wed, Sep 8, 2010 at 1:12 PM, Stephen Eglen <S.J.Eglen@damtp.cam.ac.uk>wrote:

> The following message is a courtesy copy of an article
> that has been posted to gmane.emacs.orgmode as well.
>
> Matt Price <moptop99@gmail.com> writes:
>
>
> > - as I understand it this system will only work with entries that have
> > been added via "i" in a calendar-mode org agenda view.  When I try to
> > add items this way I am never prompted for a time, only a date.  Am I
> > missing something here?
>
> hi Matt,
> Carsten accepted a patch of mine a while ago that allows you to do stuff
> like the following from the agenda:
>
> "i d RET 09:00-09:30 meeting with Joe"
>
> and the time is extracted from the text you enter, if you set:
>
> (setq org-agenda-insert-diary-extract-time t)
>
> this is super, stephen thank you.
had some difficulties with google's timezone handling but those appear to be
fixed now.  seems to be woring perfectly!

for a real two-way sync to work with this method, I think we need access to
uid's of google calendar events.  If I read the documentation properly, the
underlying gdata-python library doesn't support uid queries.  So I filed an
enhancement bug:
http://code.google.com/p/gdata-python-client/issues/detail?id=444&q=uid
maybe someone with a better coding sense can improve it; in any case, we can
all follow its progress at that url.

matt



>  Stephen
>
>

[-- Attachment #1.2: Type: text/html, Size: 2205 bytes --]

[-- Attachment #2: 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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Adding entries to Google calendar
  2010-09-08 15:34         ` Matt Price
  2010-09-08 15:58           ` Matt Price
  2010-09-08 17:12           ` Stephen Eglen
@ 2010-09-09  8:56           ` Sven Bretfeld
  2010-09-10  8:36             ` Eric S Fraga
  2 siblings, 1 reply; 16+ messages in thread
From: Sven Bretfeld @ 2010-09-09  8:56 UTC (permalink / raw)
  To: Matt Price; +Cc: emacs-orgmode

Hi Matt

Matt Price <moptop99@gmail.com> writes:

> Sven says something about using org-remember to do the same work --
> it's not clear to me whether you have that working, Sven.  In any case
> would it be difficult to use org-capture instead of the diary?  That
> would certainly be better for my workflow, since i'm not in my
> calendar view very often (htough i suppose if i'm making an
> appointment maybe i ought to be. 

No, I don't. It is indeed possible to add an advice to
org-remember-finalize and I think this could be the right point to start
from. But we have to find a way to parse the data from the
remember-buffer. Eric's approach is different, because he uses variables
that do only occur when using the "agenda to diary" method. However, I
fear that my abilities are to weak for that. I cannot really read and
understand complex Lisp packages like org-remember.el or org-capture.el.

Greetings,

Sven

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Adding entries to Google calendar
  2010-09-08 22:23             ` Matt Price
@ 2010-09-09  9:25               ` Stephen Eglen
  2010-09-10  8:33                 ` Eric S Fraga
  2010-09-10  8:28               ` Eric S Fraga
  1 sibling, 1 reply; 16+ messages in thread
From: Stephen Eglen @ 2010-09-09  9:25 UTC (permalink / raw)
  To: Matt Price; +Cc: emacs-orgmode, Stephen Eglen

>     hi Matt,
>     Carsten accepted a patch of mine a while ago that allows you to do stuff
>     like the following from the agenda:
>    
>     "i d RET 09:00-09:30 meeting with Joe"
>    
>     and the time is extracted from the text you enter, if you set:
>    
>     (setq org-agenda-insert-diary-extract-time t)
> 
> this is super, stephen thank you.

Great.  I should make the docstring for that variable a bit more
informative, if it has n>1 user!


> for a real two-way sync to work with this method, I think we need access to
> uid's of google calendar events.  If I read the documentation properly, the
> underlying gdata-python library doesn't support uid queries.  So I filed an
> enhancement bug:
> http://code.google.com/p/gdata-python-client/issues/detail?id=444&q=uid
> maybe someone with a better coding sense can improve it; in any case, we can
> all follow its progress at that url.

That's a good idea.  

I was keen to see if I could upload my 'org.ics' file generated by org
mode using 'C-c C-e c' to google.  So effectively I just use google to
be a read-only version of my agenda.  That doesn't seem to be possible
either from what I read, but I thought I saw it was on a list of future
projects.

Stephen

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Re: Adding entries to Google calendar
  2010-09-08 22:23             ` Matt Price
  2010-09-09  9:25               ` Stephen Eglen
@ 2010-09-10  8:28               ` Eric S Fraga
  1 sibling, 0 replies; 16+ messages in thread
From: Eric S Fraga @ 2010-09-10  8:28 UTC (permalink / raw)
  To: Matt Price; +Cc: emacs-orgmode, Stephen Eglen

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

On Wed, 8 Sep 2010 18:23:45 -0400, Matt Price <moptop99@gmail.com> wrote:

[...]

> for a real two-way sync to work with this method, I think we need access to
> uid's of google calendar events.  If I read the documentation properly, the
> underlying gdata-python library doesn't support uid queries.  So I filed an
> enhancement bug:
> http://code.google.com/p/gdata-python-client/issues/detail?id=444&q=uid
> maybe someone with a better coding sense can improve it; in any case, we can
> all follow its progress at that url.

Thanks for this.

I have starred this issue and I would recommend others do so in case
Google pays attention to how many people would find this useful.

[-- 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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Re: Adding entries to Google calendar
  2010-09-09  9:25               ` Stephen Eglen
@ 2010-09-10  8:33                 ` Eric S Fraga
  2010-09-10 12:54                   ` Rémi Vanicat
  2010-09-13  7:54                   ` Sven Bretfeld
  0 siblings, 2 replies; 16+ messages in thread
From: Eric S Fraga @ 2010-09-10  8:33 UTC (permalink / raw)
  To: Stephen Eglen; +Cc: emacs-orgmode

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

On Thu, 09 Sep 2010 10:25:31 +0100, Stephen Eglen <S.J.Eglen@damtp.cam.ac.uk> wrote:

[...]

> I was keen to see if I could upload my 'org.ics' file generated by org
> mode using 'C-c C-e c' to google.  So effectively I just use google to
> be a read-only version of my agenda.  That doesn't seem to be possible
> either from what I read, but I thought I saw it was on a list of future
> projects.
> 
> Stephen

Stephen,

I haven't found a way to "push" an ics file to google; however, you
can tell google calendar to add a calendar that is based on a specific
url pointing to an ics file and google will periodically load that
file and update the calendar.  The problem with this is that, although
it works just fine, the url must be generally accessible (no
authentication support).  Of course, you can obfuscate the path to the
file so that it won't be found easily but this is only security by
hiding...  It's also not clear how often or when google checks that
file although it appears, from my limited testing, to be at least once
a day but not much more often than that.

[-- 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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Adding entries to Google calendar
  2010-09-09  8:56           ` Sven Bretfeld
@ 2010-09-10  8:36             ` Eric S Fraga
  0 siblings, 0 replies; 16+ messages in thread
From: Eric S Fraga @ 2010-09-10  8:36 UTC (permalink / raw)
  To: Sven Bretfeld; +Cc: emacs-orgmode

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

On 9 Sep 2010 10:56:56 +0200, "Sven Bretfeld" <sven.bretfeld@gmx.ch> wrote:
> 
> Hi Matt
> 
> Matt Price <moptop99@gmail.com> writes:
> 
> > Sven says something about using org-remember to do the same work --
> > it's not clear to me whether you have that working, Sven.  In any case
> > would it be difficult to use org-capture instead of the diary?  That
> > would certainly be better for my workflow, since i'm not in my
> > calendar view very often (htough i suppose if i'm making an
> > appointment maybe i ought to be. 
> 
> No, I don't. It is indeed possible to add an advice to
> org-remember-finalize and I think this could be the right point to start
> from. 

that would seem appropriate but, as you say:

> But we have to find a way to parse the data from the
> remember-buffer. Eric's approach is different, because he uses variables
> that do only occur when using the "agenda to diary" method.

Yes, I used the diary approach because the data I needed were readily
available.

>  However, I
> fear that my abilities are to weak for that. I cannot really read and
> understand complex Lisp packages like org-remember.el or org-capture.el.

and I'm in the same boat, although slowly getting better (but gaining
further expertise in emacs lisp is unfortunately low on my todo list
due to work... sigh).

The key to the code is indeed getting the data needed in the right
form because the google command line tool does the rest...

[-- 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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Adding entries to Google calendar
  2010-09-10  8:33                 ` Eric S Fraga
@ 2010-09-10 12:54                   ` Rémi Vanicat
  2010-09-13  7:54                   ` Sven Bretfeld
  1 sibling, 0 replies; 16+ messages in thread
From: Rémi Vanicat @ 2010-09-10 12:54 UTC (permalink / raw)
  To: emacs-orgmode

Eric S Fraga <ucecesf@ucl.ac.uk> writes:

>
> I haven't found a way to "push" an ics file to google; c

There exists Gcaldeamon (http://gcaldaemon.sourceforge.net/), but the
version as a bug that need a patch
(https://sourceforge.net/projects/gcaldaemon/forums/forum/643348/topic/3367835)
But there are still some problems with this.

I'm now trying to make it work, but it's not of release quality yet.
-- 
Rémi Vanicat

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Re: Adding entries to Google calendar
  2010-09-10  8:33                 ` Eric S Fraga
  2010-09-10 12:54                   ` Rémi Vanicat
@ 2010-09-13  7:54                   ` Sven Bretfeld
  1 sibling, 0 replies; 16+ messages in thread
From: Sven Bretfeld @ 2010-09-13  7:54 UTC (permalink / raw)
  To: emacs-orgmode

Hi

Eric S Fraga <ucecesf@ucl.ac.uk> writes:

> I haven't found a way to "push" an ics file to google; however, you
> can tell google calendar to add a calendar that is based on a specific
> url pointing to an ics file and google will periodically load that
> file and update the calendar.  

Yes, that works. I've tested this with my mydisk.se account last week
for one or two days.

> The problem with this is that, although it works just fine, the url
> must be generally accessible (no authentication support). Of course,
> you can obfuscate the path to the file so that it won't be found
> easily but this is only security by hiding... It's also not clear how
> often or when google checks that file although it appears, from my
> limited testing, to be at least once a day but not much more often
> than that.

That's right. You can't update the imported files manually. You always
have to wait for a day before the changes in your ics file become
visible in Google. That's why I abandoned this method.

Greetings,

Sven

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2010-09-13  7:54 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-04 14:21 Adding entries to Google calendar Sven Bretfeld
2010-09-04 16:34 ` Eric S Fraga
2010-09-04 19:49   ` Sven Bretfeld
2010-09-05 11:48     ` Eric S Fraga
2010-09-08  9:04       ` Sven Bretfeld
2010-09-08 15:34         ` Matt Price
2010-09-08 15:58           ` Matt Price
2010-09-08 17:12           ` Stephen Eglen
2010-09-08 22:23             ` Matt Price
2010-09-09  9:25               ` Stephen Eglen
2010-09-10  8:33                 ` Eric S Fraga
2010-09-10 12:54                   ` Rémi Vanicat
2010-09-13  7:54                   ` Sven Bretfeld
2010-09-10  8:28               ` Eric S Fraga
2010-09-09  8:56           ` Sven Bretfeld
2010-09-10  8:36             ` Eric S Fraga

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).