From: Ken Mankoff <mankoff@gmail.com>
To: emacs-orgmode@gnu.org
Subject: external process modifying buffers
Date: Sun, 16 Sep 2012 13:47:00 -0700 [thread overview]
Message-ID: <CAFdBzEqAv-ja8_Bs-U0peT7ddqAhboWPVacbO+t18svD-w0gTA@mail.gmail.com> (raw)
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.
next reply other threads:[~2012-09-16 20:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-16 20:47 Ken Mankoff [this message]
2012-09-16 21:08 ` external process modifying buffers 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAFdBzEqAv-ja8_Bs-U0peT7ddqAhboWPVacbO+t18svD-w0gTA@mail.gmail.com \
--to=mankoff@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).