From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: org-batch-agenda lock problem Date: Tue, 9 Jun 2009 14:24:47 +0200 Message-ID: <679B0691-B585-4B34-9125-26955D8DBF68@gmail.com> References: <1D7BAF3A-23E5-4FFD-B1BB-A65E7BC53E72@gmail.com> Mime-Version: 1.0 (Apple Message framework v935.3) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ME0Ns-0003PY-5F for emacs-orgmode@gnu.org; Tue, 09 Jun 2009 08:24:56 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ME0Nn-0003P4-Az for emacs-orgmode@gnu.org; Tue, 09 Jun 2009 08:24:55 -0400 Received: from [199.232.76.173] (port=54579 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ME0Nn-0003Oz-6c for emacs-orgmode@gnu.org; Tue, 09 Jun 2009 08:24:51 -0400 Received: from mail-ew0-f225.google.com ([209.85.219.225]:33166) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1ME0Nm-0001G0-PM for emacs-orgmode@gnu.org; Tue, 09 Jun 2009 08:24:51 -0400 Received: by ewy25 with SMTP id 25so332475ewy.42 for ; Tue, 09 Jun 2009 05:24:50 -0700 (PDT) In-Reply-To: <1D7BAF3A-23E5-4FFD-B1BB-A65E7BC53E72@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Angus Gibson Cc: emacs-orgmode@gnu.org On Jun 9, 2009, at 12:40 PM, Angus Gibson wrote: > I am a recent convert to org-mode, and the ability to export the > agenda is very useful. Currently I have a script that runs every 10 > seconds or so that calls: > > emacs -batch -l ~/.emacs -eval '(org-batch-agenda "a" org-agenda- > ndays 1)' 2>/dev/null The following may or may not work, depending on what happens in non- interactive emacs sessions when a lock is encountered. Maybe this would work? emacs -batch -l ~/.emacs -eval '(progn (defun ask-user-about-lock (&rest args) nil) (org-batch-agenda "a" org-agenda-ndays 1))' 2>/dev/ null or emacs -batch -l ~/.emacs -eval '(progn (defun file-locked-p (&rest args) nil) (org-batch-agenda "a" org-agenda-ndays 1))' 2>/dev/null These are bad hacks, but should be OK sice creating an agenda should not modify any file buffers... - Carsten > > In order to put the agenda items on my desktop. This works fine, > until I start to edit the org file. From what I have gathered, this > causes a lock to be placed, and org-batch-agenda has a collision > with this lock, resulting in no output because it's trying to output > the message about resolving the collision. Obviously this isn't very > useful, so I was wondering why org-batch-agenda would have to modify > the file, or possibly the easiest way to resolve this (I'm not > amazing with Emacs). > > Thanks, > Angus > > > _______________________________________________ > 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