From mboxrd@z Thu Jan 1 00:00:00 1970 From: Memnon Anon Subject: Re: How to improve Org startup time? Date: Thu, 14 Feb 2013 17:52:24 +0000 (UTC) Message-ID: <87621uhmsz.fsf@mean.albasani.net> References: <867gmviujs.fsf@somewhere.org> <87txpzoagt.fsf@bzg.ath.cx> <86d2wndo4x.fsf@somewhere.org> <874nhyab4s.fsf@bzg.ath.cx> <86sj5iwb62.fsf@somewhere.org> <86d2wltlx8.fsf@somewhere.org> <87mwvp2bd3.fsf@bzg.ath.cx> <868v793ph5.fsf@somewhere.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:40201) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U62zB-00037q-UY for emacs-orgmode@gnu.org; Thu, 14 Feb 2013 12:52:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U62z8-0003O2-J2 for emacs-orgmode@gnu.org; Thu, 14 Feb 2013 12:52:41 -0500 Received: from plane.gmane.org ([80.91.229.3]:46134) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U62z8-0003Nf-AG for emacs-orgmode@gnu.org; Thu, 14 Feb 2013 12:52:38 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1U62zQ-00069S-HN for emacs-orgmode@gnu.org; Thu, 14 Feb 2013 18:52:56 +0100 Received: from e178216033.adsl.alicedsl.de ([85.178.216.33]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 14 Feb 2013 18:52:56 +0100 Received: from gegendosenfleisch by e178216033.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 14 Feb 2013 18:52:56 +0100 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@gnu.org "Sebastien Vauban" writes: > Bastien wrote: >> "Sebastien Vauban" writes: >> >>> However, I've left it in the `org-finalize-agenda-hook' hook, so that the >>> `appt-list' is fed up as soon as I begin using agenda functions. >> >> But then org-agenda-to-appt will be called each time your generate >> a new agenda... not sure you really want this right. >> >> Why not simply calling it interactively when you need it? > > I can't count on myself to do it at a regular enough interval (at least > daily). > > Then, this is the only (?) solution found so that the appt-list is still quite > up-to-date. I am using the same setup (thanks Bernt :): - Initialize on Startup - Update on midnight for next day with run-at-time - Update frequently via org-finalize-agenda-hook The last piece eats up quite some time (couple of seconds on my ancient machine), so what about a different solution just for the last bit. E.g., updating, when an item gets scheduled/timestamped for today. Something like (pseudo code!): (defadvice org-schedule (after my-adv-update-appt activate) "org-agenda-to-appt when org-last-timestamp todayp" (when (= (time-to-days (org-time-string-to-time org-last-inserted-timestamp)) (org-today)) (message "Updating appt!") (org-agenda-to-appt))) (defadvice org-time-stamp (after my-adv-update-appt activate) "org-agenda-to-appt when org-last-timestamp todayp" (when (= (time-to-days (org-time-string-to-time org-last-inserted-timestamp)) (org-today)) (message "Updating appt!") (org-agenda-to-appt))) Would that work? I agree, calling it interactively feels error prone and I would probably forget it ... Memnon