help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

how to rebuild org agenda while emacs is idle?


From: Gregor Zattler
Subject: how to rebuild org agenda while emacs is idle?
Date: Sat, 29 Aug 2015 18:15:07 +0200
User-agent: Mutt/1.5.23 (2014-03-12)

Hi everyone,

org-agenda is great but slow, sticky agenda solves this but gets
stale really fast.  I try to refresh my org-agenda while Emacs is
idle like so:

(defun gz/refresh-agenda-when-idle ()
  "Refresh Agenda while idle."
  (with-current-buffer-buffer "*Org Agenda(a)*"
    (org-agenda-redo ALL)))

(setq gz/idle-agenda-timer (run-with-idle-timer 9 t 'gz/update-agenda))


This should refresh my agenda after 9 seconds of idle time.  But
when I change one of my agenda files and save it the change does
not occur in the agenda after 9 seconds of idle time although the
echo area shows "Rebuilding agenda buffer...done"

What's wrong with this settings?


There is another problem.  For test purposes I have split the
Emacs window in two: The agenda (in order to see if something
changes) and another window for the buffer with the code.

When point is not in the agenda window the echo area
*sometimes* shows
Error running timer ‘gz/update-agenda’: (error "‘recenter’ing a
window that does not display current-buffer.")


I stop my experiment with:
(cancel-timer gz/idle-agenda-timer)


Ciao, Gregor
-- 
 -... --- .-. . -.. ..--.. ...-.-



reply via email to

[Prev in Thread] Current Thread [Next in Thread]