emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric S Fraga <ucecesf@ucl.ac.uk>
To: Sven Bretfeld <sven.bretfeld@gmx.ch>
Cc: emacs-org <emacs-orgmode@gnu.org>
Subject: Re: Adding entries to Google calendar
Date: Sun, 05 Sep 2010 12:48:28 +0100	[thread overview]
Message-ID: <87pqwsxvg3.wl%ucecesf@ucl.ac.uk> (raw)
In-Reply-To: <87wrr1z3ui.fsf@rub.de>

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

  reply	other threads:[~2010-09-05 11:48 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

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=87pqwsxvg3.wl%ucecesf@ucl.ac.uk \
    --to=ucecesf@ucl.ac.uk \
    --cc=e.fraga@ucl.ac.uk \
    --cc=emacs-orgmode@gnu.org \
    --cc=sven.bretfeld@gmx.ch \
    /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).