From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Gregor Zattler Newsgroups: gmane.emacs.help Subject: how to rebuild org agenda while emacs is idle? Date: Sat, 29 Aug 2015 18:15:07 +0200 Message-ID: <20150829161507.GA7263@boo.workgroup> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1440864973 9404 80.91.229.3 (29 Aug 2015 16:16:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 29 Aug 2015 16:16:13 +0000 (UTC) To: help-gnu-emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Aug 29 18:16:06 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZVinV-00064X-TV for geh-help-gnu-emacs@m.gmane.org; Sat, 29 Aug 2015 18:16:06 +0200 Original-Received: from localhost ([::1]:53425 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZVinV-0005eA-79 for geh-help-gnu-emacs@m.gmane.org; Sat, 29 Aug 2015 12:16:05 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37164) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZVinE-0005e0-F2 for help-gnu-emacs@gnu.org; Sat, 29 Aug 2015 12:15:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZVinB-0007rZ-7H for help-gnu-emacs@gnu.org; Sat, 29 Aug 2015 12:15:48 -0400 Original-Received: from mout.gmx.net ([212.227.15.19]:59400) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZVinA-0007rB-QD for help-gnu-emacs@gnu.org; Sat, 29 Aug 2015 12:15:45 -0400 Original-Received: from boo.workgroup ([87.185.159.84]) by mail.gmx.com (mrgmx001) with ESMTPSA (Nemesis) id 0Md3Eg-1ZEbNd0LrO-00IGUa for ; Sat, 29 Aug 2015 18:15:43 +0200 Original-Received: from grfz by boo.workgroup with local (Exim 4.84) (envelope-from ) id 1ZVin3-0003xK-Bd; Sat, 29 Aug 2015 18:15:37 +0200 Mail-Followup-To: help-gnu-emacs Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-Provags-ID: V03:K0:T0eY+yFnAAFjwHtR62Z/09ZAhvc/rzfhFs5R736xgGAzUrNLO+n StcPEccmZzsMWBxB65PW+Cpitj9EzqUnC2Cat640Mg5eUpgvNBTW3YFfQ9X+HDxmc6YJ+zs xQa50Fl32jXTD/a0XZWFmgiesagCCETPxukhvte/FmlU/eROMVvdEYWp8iGYSwgRYegI1ID cXQpnwY3t8nh0/hEgDrDQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:PlGd9OftAvk=:pQbYDEd4yjLowhzy5MVt0m jBvla2BICqYWl/DWZqQetMGtDeZ5YAaJrLN20WNaRE7FtMMKOA6g2+t7byDkarGzmi9tH5Qto WL3vZZfEl3yeCjEw0d7NULIaQIoqD/j0rLHuvkDcy1Y01bx5Ke5UGkBuqsePUGE1cm1KFA0ex 63rR1M+OWupePli3DHFC1Ef/hgRxDO1P7KNdzPRvOi8hzeatJUhaCdtBrmu7spXPY5JhZHgLV BCp8drHM/uzvhChjaVTU+NZaEd/wXCCDsNL8NwwrrPQloob+Oz7FVQaPbj7CgzyIKvl9qpiQs U0d6Uj6K0wsl/Y9b3WNibL5glVFq76Cely1tSYd+VyKwEfVMfAUvMc+w7KMqIWea+P4MuI4vj lQs0SS/0uno1FKZBco9loBPABa2l1G1or3LI6RtHh6l6jR5mzAabRPh7pCrn/I6MjXnTvdo3r 8SbuBdlRk78t40VVvNYVqhcJQF90s+9F57PeD3dEQGlROkdODStHlM2HbuuYyp1k5U8QwP+vP S39P5mQBMjB1/fUSNfvJw3vuw4d+ZYxSMYDTfbdE06FFO8GWAHYfLrMMEisZNzDxE5SEb2twM uI8bKGRwBSmWuLlvvwLfQy/s/fChG+BOGrlais+aKjIVuJgEl2D+CA+g9DAvmDUZUn/JkKYVD 2vFhVMs7eRZnKcQSntucSO31C/h2leF5OVdGMhPZl0sQmHeDxkhu/8KFTCn3gZpomxmE1e61Y 25sVXAB2srCBFchQ X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.15.19 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:106920 Archived-At: 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 -- -... --- .-. . -.. ..--.. ...-.-