Suvayu Ali <fatkasuvayu+li...@gmail.com> writes:

> Hi Nick,
>
> On Wed, 12 Jan 2011 03:23:44 -0500
> Nick Dokos <nicholas.do...@hp.com> 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

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

Reply via email to