emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] How to improve Org startup time?


From: Tassilo Horn
Subject: Re: [O] How to improve Org startup time?
Date: Thu, 14 Feb 2013 10:30:45 +0100
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 (gnu/linux)

"Sebastien Vauban"
<address@hidden> 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




reply via email to

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