From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: org-agenda-show-current-time-in-grid and automatic refresh Date: Wed, 12 Jan 2011 03:23:44 -0500 Message-ID: <23120.1294820624@gamaville.dokosmarshall.org> References: <87fwsyyfcr.fsf@gmail.com> <20110111231909.2338897e@bhishma.homelinux.net> Reply-To: nicholas.dokos@hp.com Return-path: Received: from [140.186.70.92] (port=49270 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pcvzl-0005f5-EM for emacs-orgmode@gnu.org; Wed, 12 Jan 2011 03:23:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pcvzj-00037x-LE for emacs-orgmode@gnu.org; Wed, 12 Jan 2011 03:23:53 -0500 Received: from vms173003pub.verizon.net ([206.46.173.3]:41372) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pcvzj-00037H-Hs for emacs-orgmode@gnu.org; Wed, 12 Jan 2011 03:23:51 -0500 Received: from gamaville.dokosmarshall.org ([unknown] [173.76.32.106]) by vms173003.mailsrvcs.net (Sun Java(tm) System Messaging Server 7u2-7.02 32bit (built Apr 16 2009)) with ESMTPA id <0LEW008ATHZKIT80@vms173003.mailsrvcs.net> for emacs-orgmode@gnu.org; Wed, 12 Jan 2011 02:23:50 -0600 (CST) In-reply-to: Message from Suvayu Ali of "Tue, 11 Jan 2011 23:19:09 PST." <20110111231909.2338897e@bhishma.homelinux.net> 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: Suvayu Ali Cc: nicholas.dokos@hp.com, emacs-orgmode@gnu.org, Kiwon Um Suvayu Ali wrote: > Hi Kiwon, > > On Wed, 12 Jan 2011 12:23:48 +0900 > Kiwon Um wrote: > > > Dear org users, > > > > The recent function for showing current time in agenda view is quite > > cool. I have a question about it. When the agenda view is being shown, > > is there any way to refresh it automatically so that makes the current > > time line always recent? > > > > I have thought about that, I even worked up a small minor mode for that > (attached). But it doesn't seem to work very well. It updates only the > first time but fails subsequently. I am still a lisp newbie. If someone > could guide me, I could give it another try. > > Right now it only updates if any of the agenda file buffers change but I > would also like to put a timer. Then if no agenda files have been edited > in a while (say 5 mins) the agenda buffer is refreshed anyway. But I > don't know how to do that. Any suggestions would be welcome. > You can probably use run-with-timer or run-with-idle-timer to do things like this, but I'm with Detlef Steuer: pressing 'g' in the agenda to refresh it is simple and does not consume any extra resources - you do it when you need to and it's done. I just find the idea of running a timer in order to update a time line in the agenda every once in a while somewhat distasteful, but maybe it's just me. OTOH, I'm being somewhat hypocritical here because I run two visible clocks: one in the gnome panel and one in the emacs mode line with display-time. Having three of them however is clearly overkill :-) Nick