emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* external process modifying buffers
@ 2012-09-16 20:47 Ken Mankoff
  2012-09-16 21:08 ` Charles Philip Chan
  0 siblings, 1 reply; 7+ messages in thread
From: Ken Mankoff @ 2012-09-16 20:47 UTC (permalink / raw)
  To: emacs-orgmode

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.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-10-13 16:58 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-16 20:47 external process modifying buffers Ken Mankoff
2012-09-16 21:08 ` Charles Philip Chan
2012-09-16 21:24   ` Ken Mankoff
2012-09-17  3:34     ` Nick Dokos
2012-09-18 12:28     ` Moritz Ulrich
2012-10-13 16:27       ` Ken Mankoff
2012-10-13 16:57         ` Sean O'Halpin

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).