From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Manuel Giraud via Users list for the GNU Emacs text editor Newsgroups: gmane.emacs.help Subject: Org agenda and appointments Date: Fri, 10 Mar 2023 11:31:23 +0100 Message-ID: <87fsac52fv.fsf@ledu-giraud.fr> Reply-To: Manuel Giraud Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="863"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Mar 10 11:34:19 2023 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1paa4p-000AVw-KV for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 10 Mar 2023 11:34:19 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1paa28-0007YS-Sh; Fri, 10 Mar 2023 05:31:32 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1paa26-0007VB-Q7 for help-gnu-emacs@gnu.org; Fri, 10 Mar 2023 05:31:31 -0500 Original-Received: from ledu-giraud.fr ([51.159.28.247]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1paa23-0004FM-EI for help-gnu-emacs@gnu.org; Fri, 10 Mar 2023 05:31:30 -0500 DKIM-Signature: v=1; a=ed25519-sha256; c=simple/simple; s=ed25519; bh=5UIZF4UZ qFBJfeDSV5X4Cb3FVoOAsljctJJjmOWsLJ8=; h=date:subject:to:from; d=ledu-giraud.fr; b=fW+q3pAklxaLwviDejekgWXefZ+Q5KFu8z8fq3wN5TIvRCvpgn jej+cMFxv19KwRgOog5+bYd9RUw2asGeIaAQ== DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=rsa; bh=5UIZF4UZqFBJfeDS V5X4Cb3FVoOAsljctJJjmOWsLJ8=; h=date:subject:to:from; d=ledu-giraud.fr; b=rehmDEyuk4aP9reGFu8MUkpPh0Sh9IFbD1xttORf9npIJRFUl+ 7Gg6NCpnisjnQB4YcrBUg48cvFFf6u9ZXqe03aCPe5gJjzyKDU/KR0l87/HUQwKASOH1g+ 7Wy4As0NHAkD/R6GcDyzZTOguKGEAXz0OVxgibDIj7MsrQjQdm68wP+ySKNw3O3xZ+tTTX yCJsy1TYvVahy8u/LgqV2bHQT7KS+678V9iEbi50fGbiHnlTJlOEHyQntbM6DOozV5TiJg qzrzohl6Df+0dfOearuUCcEO3uxHpXP8TMQLqY9Ydg7YfrAy1ZRk6bthUiyX9ZmE5gtQi+ vnI0sCli34Sw== Original-Received: from computer ( [10.1.1.1]) by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id 22739e9b (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Fri, 10 Mar 2023 11:31:24 +0100 (CET) Received-SPF: pass client-ip=51.159.28.247; envelope-from=manuel@ledu-giraud.fr; helo=ledu-giraud.fr X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:142959 Archived-At: 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