[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orgmode] org-agenda-show-current-time-in-grid and automatic refresh
From: |
Kiwon Um |
Subject: |
Re: [Orgmode] org-agenda-show-current-time-in-grid and automatic refresh |
Date: |
Thu, 13 Jan 2011 13:56:53 +0900 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
Suvayu Ali <address@hidden> writes:
> Hi Nick,
>
> On Wed, 12 Jan 2011 03:23:44 -0500
> Nick Dokos <address@hidden> 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
[Orgmode] Re: org-agenda-show-current-time-in-grid and automatic refresh, Detlef Steuer, 2011/01/12