From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id 0A6gNW1ed2a0RQAA62LTzQ:P1 (envelope-from ) for ; Sat, 22 Jun 2024 23:29:50 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id 0A6gNW1ed2a0RQAA62LTzQ (envelope-from ) for ; Sun, 23 Jun 2024 01:29:49 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=YEOwfjEh; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1719098989; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=3Q/u5g7/r9/oshF1BE10B51QD7mNK6GoHKd5vFUShLI=; b=brZ08DwbLv13gUbBomnd81tDI8yUvu6k+0dP+e6quTOkG93tVHyqv/SRnFdZ3KovzdlSVY uOx8NcGpd9xBmsEGFQEvf6a3owIUHkfJzgNWQJZ3L+45dMiaXWOdKHfXvjv0p6Afv3Uvsb sBVi4DZYNGCm+SvaSzCRKeboD9Wn2B/3YwuFnWdpSdL/VZrxhYuqU0M9f4oAnvQXKQQeqJ 1smBUPc5ql03UwpxGXfvmnQzRoc56lRTiRouhmmd1DBl2F6NzRE6taV1X1aEmvzCR+0Txk qE576Lxn2oW/fJfmVf1ybkWwfEfnbOgkc9oe7gibqU2Q1dH9lWihJSYwZafsPQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=YEOwfjEh; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=key1; d=yhetil.org; t=1719098989; a=rsa-sha256; cv=none; b=EpDvmygPkgiP11Pb3dI9nSAuEH+oVC3iUjPFmoVXz4GA/jKs/K5LbdbZ9JH345IVlKM6jC sFhWdcTz+NuOm9tJMeYwB5tlncdT2n1rIR9LKnuJ5hksGgBlY75k9FEGvuVNaBMDUkX3HL WcBXOBpC9Jhaq+CMr/PFUGGvhi68QLfaBGwZ/kSJVlHEPxEf2IIZfhPN8Pp1l3wsVcV4Zj XbhofLPkgpnYkeiuA47NpUqKkPSUS0iRckH99yJ9Mz1qHAR/hBtjwFBglrOiltvCAjo3up XUzX4eHBm22HJv0nMAtFPZHwmtNa28qh2de9lE+MpMfGb6c01RPTGo+sruAcZg== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 702F738B4E for ; Sun, 23 Jun 2024 01:29:49 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sLAA4-00056h-8d; Sat, 22 Jun 2024 19:28:48 -0400 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 1sLAA2-00056R-Pl for emacs-orgmode@gnu.org; Sat, 22 Jun 2024 19:28:46 -0400 Received: from mail-il1-x135.google.com ([2607:f8b0:4864:20::135]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sLAA1-0001Do-47 for emacs-orgmode@gnu.org; Sat, 22 Jun 2024 19:28:46 -0400 Received: by mail-il1-x135.google.com with SMTP id e9e14a558f8ab-3762c172d93so11166665ab.0 for ; Sat, 22 Jun 2024 16:28:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719098923; x=1719703723; darn=gnu.org; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=3Q/u5g7/r9/oshF1BE10B51QD7mNK6GoHKd5vFUShLI=; b=YEOwfjEhz3H52lhCFb78FEppWJv4yvvyACKMFSDPM96zbacJMHVXCZG0VfuC9LU0WS T3T/ljBkchTKmgrGTxe3ASc8wSF9zyR/2bL9yCPey6yBWgvmI2MjQ4qJmD1BL+hpjQin 2xJnI2I/KYNg94UERoEF46qJjRE+WvsRZvpLM6Doq3AH8VUWZ6WmbzTMGvXTkNuo0C3i UrMpx0SqWZb7MtRrnW+KpsrcgWn4y5IVIyRs0K9za7+0LiI2dRYv9oOdlfl4LQ2BDjAo G/R6OBNM5qCemVRA9uKLoI/dboGID8IFpIBZotOuJdL1qiy1K+YUu0U0q9Kq/uWT53Gb R9Pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719098923; x=1719703723; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:to:from:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=3Q/u5g7/r9/oshF1BE10B51QD7mNK6GoHKd5vFUShLI=; b=YZivazRUxrnStAyETedHumiFI2NcRbJPgRxal+LXOebXPo+k83OQP/8x3nUT8ELMzm j/Uqow9UnqsxIW2gUU5j1Xjjt8Y6rQyIGMcT6rzFNB3IikAMm9VSsIGcEFfnPoT0w2iu wZ+rt6sXmyGaFadwGfxWvcR2nk5UaXsRnwdZbt0NiUkUesPNtGaZ10Xpdva70hxUrh5h 2VKgt2Npx1I5KAAOIx4GKKABwmmZmByMGX5skIIvzq6a0EePstZhBe2mYSMGEnC/7C3A +aXCfuqdo3BhTMsDAHTJTKH17iUEYPshjzreYwRTlSxPVI8p+OamXG6t5y2qimGEbW9g wsnw== X-Forwarded-Encrypted: i=1; AJvYcCVbsAkhKp3DCk7ZqrOCHd1TtqybbdutQ06bEZ1Do3P93Wd6LtbQyLQwo7YaPsP4ZfSW6Pr/n53OZBrZsfBPcFyDOHY3cy4= X-Gm-Message-State: AOJu0Yyxi7m8V1PsfcCqlO68JGBUxKDdno6BhyL93+Zi7dmR8JyHlYhG gZokrfb7bdGtCJY4/Pq3gYKKTXFndsrCVaP6tR1RgqX18n0gOK6zpoxoTg== X-Google-Smtp-Source: AGHT+IEd/5KblW+H1+8AR7fjfGYNj6+n6nbNp1nxMhYVvwHxi1K0PkN+FQpNJ9UWk/kYZO9g1xsiZw== X-Received: by 2002:a05:6e02:1a81:b0:376:1c71:1e27 with SMTP id e9e14a558f8ab-3763f6cd367mr13148045ab.32.1719098923261; Sat, 22 Jun 2024 16:28:43 -0700 (PDT) Received: from localhost (157-131-78-143.fiber.dynamic.sonic.net. [157.131.78.143]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-716b4a72f9fsm2624958a12.48.2024.06.22.16.28.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 22 Jun 2024 16:28:42 -0700 (PDT) From: Jack Kamm To: =?utf-8?Q?Micha=C3=ABl?= Cadilhac , Org-Mode mailing list Subject: Re: ox-icalendar: Filter todo-types In-Reply-To: References: Date: Sat, 22 Jun 2024 16:28:41 -0700 Message-ID: <874j9ko8uu.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::135; envelope-from=jackkamm@gmail.com; helo=mail-il1-x135.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: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Queue-Id: 702F738B4E X-Migadu-Scanner: mx13.migadu.com X-Migadu-Spam-Score: -9.71 X-Spam-Score: -9.71 X-TUID: jfEI9Sb+ywFT Micha=C3=ABl Cadilhac writes: > I have a task that was recurring, which I KILLED a few weeks ago. It > now looks like: > > ** KILLED Do the right thing > SCHEDULED: <2023-07-14 Fri +1w> > > ox-icalendar still exports it every week, because I have > 'event-if-not-todo in org-icalendar-use-scheduled (which is the > behavior I want for some other headers). > > BEGIN:VEVENT > DTSTAMP:20240622T163042Z > UID:SC-671b3d13-f985-472a-be33-b4eeb298f2cd > DTSTART;VALUE=3DDATE:20230714 > DTEND;VALUE=3DDATE:20230715 > RRULE:FREQ=3DWEEKLY;INTERVAL=3D1 > SUMMARY:S: KILLED Do the right thing : > CATEGORIES:todos > END:VEVENT > > Would it be acceptable to add a variable to filter todo-types, e.g., > with a variable org-icalendar-excluded-todo-types? More generally, > one could think of introducing a variable: > org-icalendar-entry-filter > which receives the ENTRY argument of org-icalendar-entry, and would > return non-nil if the entry is to be treated. (This is basically what > I do using an advice.) I agree ox-icalendar should have an option to exclude certain todo-keywords from export. However I think the option should also be flexible to allow exporting todo-keywords as different STATUS: https://datatracker.ietf.org/doc/html/rfc5545#section-3.8.1.11 For example, in your case it might make more sense to export the task as CANCELLED in iCalendar. I think I'd rather have a customization option for this than a filter function. That way, other Lisp programs that import ICS to Org (such as org-caldav) could refer to this option to interoperate with ox-icalendar for 2-way sync. Perhaps we could have an option ox-icalendar-export-todo-keywords-as which could determine whether a keyword should be exported, and if so with what status, e.g.: (defcustom ox-icalendar-export-todo-keywords-as '((no-export . ("SKIP")) (cancelled . ("KILLED" "CANCELLED")) (in-process . ("PROG")))) By default, todo-keywords not in the list would be exported with status "NEEDS-ACTION" or "COMPLETED", depending on whether the keyword is a done state. What do you think?