From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gregor Zattler Subject: how to rebuild org agenda while emacs is idle? Date: Sat, 13 Feb 2016 21:15:41 +0100 Message-ID: <20160213201541.GA6043@len.workgroup> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59643) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aUgcA-0004QL-5Q for emacs-orgmode@gnu.org; Sat, 13 Feb 2016 15:16:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aUgc6-0007fz-Ve for emacs-orgmode@gnu.org; Sat, 13 Feb 2016 15:16:22 -0500 Received: from mout.gmx.net ([212.227.17.22]:50331) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aUgc6-0007ft-MT for emacs-orgmode@gnu.org; Sat, 13 Feb 2016 15:16:18 -0500 Received: from boo.workgroup ([87.185.152.159]) by mail.gmx.com (mrgmx102) with ESMTPSA (Nemesis) id 0MaE4a-1ak95z3bmi-00JtWP for ; Sat, 13 Feb 2016 21:16:16 +0100 Content-Disposition: inline List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode Hi org-mode users and developers, 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." (org-agenda-redo 'all)) (setq gz/idle-agenda-timer (run-with-idle-timer 3 t 'gz/refresh-agenda-when-idle)) This should refresh my agenda after 3 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? If you want to play with this, use this test.org: >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> (defun gz/refresh-agenda-when-idle () "Refresh Agenda while idle." (org-agenda-redo 'all)) (setq gz/idle-agenda-timer (run-with-idle-timer 3 t 'gz/refresh-agenda-when-idle)) ; in order to cancel the timer ans start afresh: (cancel-timer gz/idle-agenda-timer) * Change this heading and watch the agenda buffer: changing? <2016-02-13 Sa>--<2036-02-13 Mi> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< nd visit it like so: emacs24 -Q -nw /tmp/nuff.org --eval '(org-agenda-file-to-front)' --eval '(org-agenda "a")' The problem is the same with emacs25 and org-mode from git as of today (but with emacs25 you'll have to arrange the windows yourself). Ciao, Gregor