Hi John, On Mon, Aug 8, 2011 at 8:12 PM, John Hendy <jw.he...@gmail.com> wrote: >> Do you run into the same problem if you one the file before hand in >> read only mode? Something like this before the agenda command might >> work. >> >> (find-file-read-only "FILENAME") > > How would I do this via the command line? Also, it's pulling from > about 10 project files, so I'm not sure if I'd have to do this for > every file or how that works since the org-batch-agenda command seems > to be pulling from all of them. Perhaps there's some way to trigger > emacs to think, "Everything is read-only from here out"?
If you can use wildcards to specify your files, it might be possible by just one extra call to --eval. Something like this might work: emacs --batch -l ~/.emacs --eval '(find-file-read-only "<wildcard>" t)' \ --eval '(org-batch-agenda "w")' > ~/org/aux/agenda-export.txt > find-file-read-only is an interactive compiled Lisp function in > `files.el'. > > It is bound to C-x C-r. > > (find-file-read-only FILENAME &optional WILDCARDS) > > Edit file FILENAME but don't allow changes. > Like C-x C-f, but marks buffer as read-only. > Use C-x C-q to permit editing. Hope this helps. -- Suvayu Open source is the future. It sets us free.