"Sebastien Vauban"
<wxhgmqzgw...@spammotel.com> 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