help-gnu-emacs
[Top][All Lists]
Advanced

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

Org agenda and appointments


From: Manuel Giraud
Subject: Org agenda and appointments
Date: Fri, 10 Mar 2023 11:31:23 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

Hi,

I like to have Emacs remind me of upcoming appointments.  For this, I
have put "(appt-activate 1)" in my init file and it works automagically
for anything that is (or will be) into the Diary.

Now, I'm also using Org agenda.  For instance, I use 'org-capture' to
enter some new appointment.  The Info manual says that I should call
'org-agenda-to-appt' to add Org agenda appointments and also have
notifications about those.  The problem is that I could forget to make
this call after entering a new appointment.

Inspired by what is done in 'appt-active', I came up with the following
solution in my init file:
--8<---------------cut here---------------start------------->8---
(defun +org-agenda-update-appt ()
  (when (member buffer-file-name (org-agenda-files))
    (org-agenda-to-appt))
  nil)
(add-hook 'write-file-functions #'+org-agenda-update-appt)
--8<---------------cut here---------------end--------------->8---

So my question is: Is there a better/cleaner interface to do this?
Because what I have done seems bit tricky from a user point of view.

Thanks,
-- 
Manuel Giraud



reply via email to

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