From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ken Mankoff Subject: external process modifying buffers Date: Sun, 16 Sep 2012 13:47:00 -0700 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:58108) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TDLk7-0002Dl-MZ for emacs-orgmode@gnu.org; Sun, 16 Sep 2012 16:47:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TDLk6-000085-92 for emacs-orgmode@gnu.org; Sun, 16 Sep 2012 16:47:03 -0400 Received: from mail-iy0-f169.google.com ([209.85.210.169]:56639) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TDLk6-00007u-3g for emacs-orgmode@gnu.org; Sun, 16 Sep 2012 16:47:02 -0400 Received: by iagk10 with SMTP id k10so5351406iag.0 for ; Sun, 16 Sep 2012 13:47:01 -0700 (PDT) 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: emacs-orgmode@gnu.org Hi, I'd like to have my Mac iCal events appear in my agenda. I was using org-mac-iCal for this without problem, but it doesn't parse things as well as the external python ical2org program (http://www.doughellmann.com/projects/ical2org/). Right now I'm running ical2org via cron and re-generating iCal.org (redirecting stdout with ">"). When I try to regenerate the agenda, emacs complains: iCal.org changed on disk; really edit the buffer? (y, n, r or C-h) So... How to I get around this? Is there a flag to tell emacs (org org-mode) to not worry about a buffer changing? I don't think I can kill the buffer from the cron command because I'm not using emacs server so I don't know how to communicate with this specific emacs instance. Or should I drop cron and use emacs (run-at-time) to run this, killing the iCal.org buffer before I do so? I've tried this and have the following setup. It appears to work, but after I get split-screen and the output of the shell command. How to do this method tidier? (defun kdm/kill-iCal-buffer () (setq list (mapcar (function buffer-name) (buffer-list))) (mapc (lambda (x) (if (string-match "^iCal" x) (kill-buffer x))) list)) (defun kdm/iCal () (kdm/kill-iCal-buffer) ; remove the buffer (shell-command "ical2org>iCal.org") ) (run-at-time "03:30" 3600 '(lambda () (kdm/iCal))) (kdm/iCal) ; testing Any other solutions or advice? Thanks, -k.