What are you currently using in emacs to store contacts? bbdb? Also, what do you use for your calendar program in emacs? My answer will differ for say org-mode vs diary mode.
–
Steven DSep 10 '10 at 15:37

Actually I am just starting, and am planning to use bbdb for contacts. I was planning to use diary mode for calendar, but now that I know of and read about org-mode that might be a good option, too. Thanks!!
–
hpySep 10 '10 at 18:08

This would be a great option, if it's even possible, I would like to know. Building an outlook client into emacs would definitely be cool.
–
ThomasSep 10 '10 at 19:32

1

Also asked at Super User. Don't do this! (Exception: when the question hasn't had any good answer at a site, and then link to the original question.)
–
GillesSep 10 '10 at 20:23

I had no idea, sorry! Still looking for a good answer, though.
–
hpySep 10 '10 at 21:12

4 Answers
4

Unfortunately, I am unable to give a complete answer. All I have is advice about some possible paths to wander down.

The easiest route would be if the emacs-g-client that Gilles mentioned in the SU version of this question works. If that doesn't work, I would look into the following:

At the very least you should be able to get some calendar functionality by accessing your google calendar using ical. The function icalendar-import-file can import an ical file to a emacs diary file (icalendar-import-file documentation). Thus, in your .emacs file you could have a bit of emacs lisp to get the google calendar ical file and import it into your diary. If you do end up using org-mode there are a number of ways to integrate org-mode with diary-mode.

I think that the ultimate goal would be to make use of the gdata api. I don't think that there is an easy way to get access to Google contacts outside of this api. There is a command line utility that supports a wide range of functionality using this api called Google CL, which could theoretically be used inside some emacs lisp functions to provide full access to your contacts, calendar, and many other Google-hosted services. This however, would likely be much more difficult than just a few lines thrown into your .emacs.

For Google Calendar, I have a one way sync setup successfully. Emacs fetches my calendars at startup and transfers it in the emacs diary. This is then displayed by org-mode in the agenda, but you can set it up anyway you want.

For sending back to Google Calendar, I have yet setup anything as I don't need it that much. However, I think it would be pretty easy to have a function that adds an entry in the diary and calls googlecl to add an entry in your google calendar.

To fetch the calendars, I have the following in my .emacs (not that this is not my code, it comes from the org-mode mailing list, but I can't remember where I found it exactly):

Replace "http://www.google.com/calendar/ical/DFSDFSDFSDFASD/basic.ics" with the urls to the calendars you want to fetch (you find it at the bottom of the setup page of each calendar in google calendar). You can add as many as you wish.

Now, you can just call (getcals) when you want to fetch the calendars. You can put this in your .emacs to do it at startup, but it might stall your startup.

To have org-mode display the diary entries in the agenda, just add (setq org-agenda-include-diary t) in your .emacs. See the org-mode manual for details.