From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tassilo Horn Subject: Re: How to improve Org startup time? Date: Thu, 14 Feb 2013 10:30:45 +0100 Message-ID: <878v6ri6nu.fsf@thinkpad.tsdh.de> 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]:41620) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U5v9i-0005qM-Oc for emacs-orgmode@gnu.org; Thu, 14 Feb 2013 04:31:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U5v9c-0001V2-OM for emacs-orgmode@gnu.org; Thu, 14 Feb 2013 04:31:02 -0500 Received: from plane.gmane.org ([80.91.229.3]:46127) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U5v9c-0001Uw-Gt for emacs-orgmode@gnu.org; Thu, 14 Feb 2013 04:30:56 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1U5v9u-00068V-KU for emacs-orgmode@gnu.org; Thu, 14 Feb 2013 10:31:14 +0100 Received: from tsdh.uni-koblenz.de ([141.26.67.142]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 14 Feb 2013 10:31:14 +0100 Received: from tsdh by tsdh.uni-koblenz.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 14 Feb 2013 10:31:14 +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: >> 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 call it once at emacs startup and then only when I save an agenda file. --8<---------------cut here---------------start------------->8--- (defun th-org-agenda-to-appt () (org-agenda-to-appt t) (appt-activate 1)) (defun th-org-mode-init () ;; ... (when (and (org-agenda-file-p) (not (string= (file-name-nondirectory (buffer-file-name)) org-mobile-capture-file)) (not (string= (buffer-file-name) org-mobile-inbox-for-pull))) (add-hook 'after-save-hook 'th-org-agenda-to-appt t t))) (add-hook 'org-mode-hook 'th-org-mode-init) --8<---------------cut here---------------end--------------->8--- Bye, Tassilo