emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Moritz Ulrich <moritz@tarn-vedra.de>
To: Ken Mankoff <mankoff@gmail.com>
Cc: Charles Philip Chan <cpchan@bell.net>, Org-mode <emacs-orgmode@gnu.org>
Subject: Re: external process modifying buffers
Date: Tue, 18 Sep 2012 14:28:09 +0200	[thread overview]
Message-ID: <m2obl3v7lf.fsf@tarn-vedra.de> (raw)
In-Reply-To: <CAFdBzEopVJ1exkFwWpxr2UKL4rmAS9zCAGJim9iBhF=ndjBSuQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1354 bytes --]


Ken Mankoff writes:

> Thanks! That makes it much cleaner. My setup is now reduced to this:
>
> (setq global-auto-revert-mode t)
> (run-at-time "2 minutes" 600 '(lambda () (shell-command "ical2org>iCal.org")))
>
> With full paths to the ical2org binary and the iCal.org file.
>
> Thanks,
>
>    -k.
>

Please note that `global-auto-revert-mode' reverts ALL Emacs buffers
when the underlaying file changes. This isn't just active for the
iCal.org buffer, but for all open buffers.

If you like this behavior, ok, but if you prefer it for the iCal.org
buffer only, enable auto-revert-mode (without global-) via a file-local
variable in it:

http://www.gnu.org/software/emacs/manual/html_node/emacs/File-Variables.html

>
> On Sun, Sep 16, 2012 at 2:08 PM, Charles Philip Chan <cpchan@bell.net> wrote:
>> Ken Mankoff <mankoff@gmail.com> writes:
>>
>> Hi Ken:
>>
>>> 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)
>>
>> Set "global-auto-revert-mode" to "t".
>>
>> Cheers,
>> Charles
>>
>> --
>> linux: the choice of a GNU generation
>> (ksh@cis.ufl.edu put this on Tshirts in '93)

Cheers,
Moritz


-- 
Moritz Ulrich

[-- Attachment #2: Type: application/pgp-signature, Size: 486 bytes --]

  parent reply	other threads:[~2012-09-18 12:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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=m2obl3v7lf.fsf@tarn-vedra.de \
    --to=moritz@tarn-vedra.de \
    --cc=cpchan@bell.net \
    --cc=emacs-orgmode@gnu.org \
    --cc=mankoff@gmail.com \
    /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).