[Orgmode] Re: Agenda and Reloading Changed Files

2009-10-20 Thread Chris Gray
Bernt Hansen wrote:

 Make sure you don't have any unsaved information in _any_ org files in
 emacs before you run this to sync your emacs buffers with the on disk
 files -- otherwise you'll lose information.

I got burned by that a couple of times, so now I use a script that does
the following:

--8---cut here---start-8---
emacsclient -e (save-some-buffers t)

for dir in $DIRS; do
cd $dir
git pull

done

emacsclient -e (org-revert-all-org-buffers)
--8---cut here---end---8---

Cheers,
Chris



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Agenda and Reloading Changed Files

2009-10-19 Thread Bernt Hansen
Peter Jones mli...@pmade.com writes:

 I have a couple of org files that are generated from cronjobs in the
 morning.  Throughout the day, however, reloading the agenda prompts me
 with:

 library.org changed on disk; really edit the buffer? (y, n, r or C-h)

 And it does so every time I reload, even though the file hasn't changed
 since this morning.

 Anyone know a workaround for this?

I sync my files with git which modifies the on-disk versions separate
from my open emacs session.  I use M-x org-revert-all-org-buffers to
replace the Emacs versions with the more-correct versions on disk (newly
updated with git) -- but I don't have automatic updates.  I know exactly
when the files on disk are newer than my Emacs buffers so I can safely
use this function.

Make sure you don't have any unsaved information in _any_ org files in
emacs before you run this to sync your emacs buffers with the on disk
files -- otherwise you'll lose information.

HTH,
Bernt


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode