From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kiwon Um Subject: Re: org-agenda-show-current-time-in-grid and automatic refresh Date: Thu, 13 Jan 2011 13:56:53 +0900 Message-ID: <87mxn54d0q.fsf@gmail.com> References: <87fwsyyfcr.fsf@gmail.com> <20110111231909.2338897e@bhishma.homelinux.net> <23120.1294820624@gamaville.dokosmarshall.org> <20110112133307.4705f99a@bhishma.homelinux.net> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from [140.186.70.92] (port=60456 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PdFFJ-0006DY-A4 for emacs-orgmode@gnu.org; Wed, 12 Jan 2011 23:57:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PdFFH-0000E2-6t for emacs-orgmode@gnu.org; Wed, 12 Jan 2011 23:57:13 -0500 Received: from mail-gw0-f41.google.com ([74.125.83.41]:57573) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PdFFH-0000Ds-4K for emacs-orgmode@gnu.org; Wed, 12 Jan 2011 23:57:11 -0500 Received: by gwj22 with SMTP id 22so592313gwj.0 for ; Wed, 12 Jan 2011 20:57:09 -0800 (PST) In-Reply-To: <20110112133307.4705f99a@bhishma.homelinux.net> (Suvayu Ali's message of "Wed, 12 Jan 2011 13:33:07 -0800") 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 Suvayu Ali writes: > Hi Nick, > > On Wed, 12 Jan 2011 03:23:44 -0500 > Nick Dokos wrote: > >> 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. > > Thanks for the hint. I tried it, works fine. But on reflecting on it > some more, I agree with you seems an overkill specially when a simple g > does the job. Thanks. Here is my hack for it. It works fine. ;; in the emacs init file ;; refresh agenda view regurally (defun kiwon/org-agenda-redo-in-other-window () "Call org-agenda-redo function even in the non-agenda buffer." (interactive) (let ((agenda-window (get-buffer-window org-agenda-buffer-name t))) (when agenda-window (with-selected-window agenda-window (org-agenda-redo))))) (run-at-time nil 300 'kiwon/org-agenda-redo-in-other-window) -- Kiwon Um