From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: syncing with google calendar, file changed on disk Date: Thu, 13 Sep 2012 11:39:56 -0400 Message-ID: <10479.1347550796@alphaville> References: Reply-To: nicholas.dokos@hp.com Return-path: Received: from eggs.gnu.org ([208.118.235.92]:38310) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TCBWP-00068Q-0E for Emacs-orgmode@gnu.org; Thu, 13 Sep 2012 11:40:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TCBWK-0001L2-3w for Emacs-orgmode@gnu.org; Thu, 13 Sep 2012 11:40:04 -0400 Received: from g6t0187.atlanta.hp.com ([15.193.32.64]:29665) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TCBWJ-0001Ky-V3 for Emacs-orgmode@gnu.org; Thu, 13 Sep 2012 11:40:00 -0400 In-Reply-To: Message from Tyler Smith of "Thu, 13 Sep 2012 11:24:24 EDT." List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Tyler Smith Cc: Emacs-orgmode@gnu.org Tyler Smith wrote: > Hi, > > Following the instructions from Worg ( > http://orgmode.org/worg/org-tutorials/org-google-sync.html ), I've set > a cron job to download my google calendar, and use Eric Fraga's awk > script to convert it into google.org for inclusion in my agenda. This > works fine, and is currently my only syncing option as my access to > other web services (git, dropbox etc) is blocked at my workplace. > > One small issue: the google calendar file changes regularly, even when > I haven't added or modified any appointments. As a consequence, I am > interrupted by Emacs reminding me that google.org has changed on disk, > and I need to respond before I can continue to browse my agenda. This > isn't a big deal, but maybe one of you know how to eliminate this > problem? > > For the record, the sort of changes that I see are this: > > ~/.emacs.d/org$ diff google.org google.org-old > 488c488 > < ACTION:EMAIL > --- > > ACTION:DISPLAY > 490,491d489 > < SUMMARY:Alarm notification > < ATTENDEE:mailto:xxx@gmail.com > 495c493 > < ACTION:DISPLAY > --- > > ACTION:EMAIL > 496a495,496 > > SUMMARY:Alarm notification > > ATTENDEE:mailto:xxx@gmail.com > > > It seems the ACTION line switches back and forth between DISPLAY and > EMAIL. I don't understand the ics format to know what this means. > > I have searched the mailing list and stackoverflow, but if this has > come up before I missed it. Thanks for your help, > The brute force approach: make the cron job download to a different file, diff the two and if the diff is just ACTION:EMAIL<-->ACTION:DISPLAY lines and Alarm notification crud, then throw away the downloaded file. If the diff is different, move the downloaded file to google.org. If you go this way, you might want to play around with different diff formats to see which one is the easiest to parse for the minimal diff(s) above. Nick