From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.help Subject: Re: Org agenda and appointments Date: Fri, 10 Mar 2023 12:10:06 +0100 Message-ID: <87jzzox3ox.fsf@gmail.com> References: <87fsac52fv.fsf@ledu-giraud.fr> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22996"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Manuel Giraud To: Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Mar 10 12:10:37 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 1paadx-0005mP-37 for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 10 Mar 2023 12:10:37 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1paadZ-0002M0-94; Fri, 10 Mar 2023 06:10:13 -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 1paadX-0002LW-3T for help-gnu-emacs@gnu.org; Fri, 10 Mar 2023 06:10:11 -0500 Original-Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1paadV-0005PP-Eb for help-gnu-emacs@gnu.org; Fri, 10 Mar 2023 06:10:10 -0500 Original-Received: by mail-wm1-x332.google.com with SMTP id p16so3121554wmq.5 for ; Fri, 10 Mar 2023 03:10:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678446607; h=mime-version:message-id:date:gmane-reply-to-list:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=tFd/Jxwltj5zUh9LSKlC5aTFloA0L0TFiT4ILP+y5ik=; b=hvuiDfK75XuoUwLBLaMDcOxwKvcrK33y8RoghYmjuK2v8xS73NUWF8SWDtZbLx+HnV nKwXDD/huow0dqWfDREHqBMbz7+AJQrNKOjgR5MQ/a7Qf5pi1BdHZvjFzXZ48Aoa8ypO crci3Q71A+WSqK9ic/rjrtUVqsEdevLCCZcwPZISudqcYP7uE1g75ZMoucS/7NZaDDbc DHlz+9GIUFZBFsQ/SwE4if7ED/lIAvuyX2ZELj8+QHT6PEycA79ljX0whjfN2wKKC7rv i/RpkQozSDL4Hyku+JUqWimKpA5hw62k+PxCMBNDgeEoUoYC8Gbuu4WbWI/BwsirGp6o Ddug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678446607; h=mime-version:message-id:date:gmane-reply-to-list:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tFd/Jxwltj5zUh9LSKlC5aTFloA0L0TFiT4ILP+y5ik=; b=bTGXfvNzZxzp5XWBdmX+GQjw89vZOtxZgl0prE5f0oOx5CHaVGCNFDNjM5u7FbJR7L XMj8o8udYJCuHHFkTjDdOu5W18oWt9fXQnJ6elpBB6BKKQkSWyR6Mz+yLi+SBcaMKCFZ hGIGfQErJE4bqxr97mG8g5P/EU/uGkIERcU/13xFKQdeidtwDnqHD3ml6wMmAAT9uMqC LAxuOeJTkkvBaIExAS/it6q6RZYajzDIfHOjb8VaU2ZRFHhZCcGvCIfJEK7h5f6sm2AD s6uoQflx+wj/XA41H5m1iDqKneQnm7d6Eaj2yI1qgY1GuTXSumEkfewp/kXtF/M+RF3s EfFw== X-Gm-Message-State: AO0yUKW3p+XcEk770FGSjYoo8EOfBsT/nQ+FRYuFvgZ82fyIAhWlfgKL 3R9bmReQQJGTgp1o6CPPb9o= X-Google-Smtp-Source: AK7set/oHzUa1r4ZopUKIcGGrpzYVjpiUsRrMN+AkSLiAZ/K2cWmwPSsyYMvG2i7SRlS6jNqN9RKyA== X-Received: by 2002:a7b:c851:0:b0:3eb:248f:a140 with SMTP id c17-20020a7bc851000000b003eb248fa140mr2347495wml.6.1678446607547; Fri, 10 Mar 2023 03:10:07 -0800 (PST) Original-Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id m1-20020a7bce01000000b003e91b9a92c9sm1818674wmc.24.2023.03.10.03.10.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Mar 2023 03:10:06 -0800 (PST) In-Reply-To: <87fsac52fv.fsf@ledu-giraud.fr> (Manuel Giraud via Users list for the's message of "Fri, 10 Mar 2023 11:31:23 +0100") Gmane-Reply-To-List: yes Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=rpluim@gmail.com; helo=mail-wm1-x332.google.com 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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:142960 Archived-At: >>>>> On Fri, 10 Mar 2023 11:31:23 +0100, Manuel Giraud via Users list for the GNU Emacs text editor said: Manuel> Hi, Manuel> I like to have Emacs remind me of upcoming appointments. For this, I Manuel> have put "(appt-activate 1)" in my init file and it works automagically Manuel> for anything that is (or will be) into the Diary. Manuel> Now, I'm also using Org agenda. For instance, I use 'org-capture' to Manuel> enter some new appointment. The Info manual says that I should call Manuel> 'org-agenda-to-appt' to add Org agenda appointments and also have Manuel> notifications about those. The problem is that I could forget to make Manuel> this call after entering a new appointment. Manuel> Inspired by what is done in 'appt-active', I came up with the following Manuel> solution in my init file: Manuel> (defun +org-agenda-update-appt () Manuel> (when (member buffer-file-name (org-agenda-files)) Manuel> (org-agenda-to-appt)) Manuel> nil) Manuel> (add-hook 'write-file-functions #'+org-agenda-update-appt) Manuel> So my question is: Is there a better/cleaner interface to do this? Manuel> Because what I have done seems bit tricky from a user point of view. I think this is what `org-capture-after-finalize-hook' is for. Robert --