[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] external process modifying buffers

From: Ken Mankoff
Subject: [O] external process modifying buffers
Date: Sun, 16 Sep 2012 13:47:00 -0700


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

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)))
   (lambda (x)
     (if (string-match "^iCal" x)
                 (kill-buffer x)))
(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?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]