From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id ANaxIjEszmFS3AAAgWs5BA (envelope-from ) for ; Thu, 30 Dec 2021 23:01:21 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id EKpXGzEszmG0RQAAG6o9tA (envelope-from ) for ; Thu, 30 Dec 2021 23:01:21 +0100 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 D548924D27 for ; Thu, 30 Dec 2021 23:01:20 +0100 (CET) Received: from localhost ([::1]:44324 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n33U8-0002nH-2H for larch@yhetil.org; Thu, 30 Dec 2021 17:01:20 -0500 Received: from eggs.gnu.org ([209.51.188.92]:41142) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n33Sq-0002mY-OV for emacs-orgmode@gnu.org; Thu, 30 Dec 2021 17:00:00 -0500 Received: from mail-sender-5.unibw-hamburg.de ([139.11.10.105]:40935 helo=premail.unibw-hamburg.de) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n33So-0000qS-6p for emacs-orgmode@gnu.org; Thu, 30 Dec 2021 17:00:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=hsu-hh.de; s=hsu-hh_de; h=Content-Type:MIME-Version:Message-ID:Subject:To:From:Date: Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=MbkqvouVrEvOJrHkVpUZZ5ld2li+6HW+wERnXdW4Cms=; t=1640901596; x=1641765596; b=vWLwzipIJERdHa3uhhHbT8vQRS/Xz/pHZtOe6w5GxJC3xcK6UbRNGDNqnIW0eNrI8P5OAeNuUMw lC79/FFbcTUZHFlMeU714rQ0aRx61wKDIVnESO1sz2nfDw/OrwpFxctP1F9DjKKblRGQXS8mwvLCi yzaadQ8cjkR+q2UI+ahPW8OPbtJBvRUIJN+SeZTQ8DzFF0nx3y79T7ubZaHdF7hQsvLszEO5QsC4n B+dkMy0Dakco8oI0T4rajXeZ1PGEqq7knLprxyOXchVnyz2yIlF7EBDdr1uANPIBp7AYey3NXdgeq pMcXhtVAhnYByib6G98WNittzQB5zo8ODBVw==; Received: from rzav4.unibw-hamburg.de ([139.11.12.54]:56971) by premail.unibw-hamburg.de with esmtp (HSU Mailserver) (envelope-from ) id 1n33Sz-0007gj-FR for emacs-orgmode@gnu.org; Thu, 30 Dec 2021 22:59:55 +0100 X-IronPort-AV: E=Sophos;i="5.88,248,1635199200"; d="ttl'?scan'208";a="70736579" Received: from mailcluster-1.unibw-hamburg.de (HELO premail.unibw-hamburg.de) ([139.11.5.101]) by rzav4.unibw-hamburg.de with ESMTP; 30 Dec 2021 22:59:56 +0100 Received: from dynamic-095-116-132-056.95.116.pool.telefonica.de ([95.116.132.56]:44250 helo=localhost.localdomain) by premail.unibw-hamburg.de with esmtpsa (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (HSU Mailserver) (envelope-from ) id 1n33Sz-0007e6-1t; Thu, 30 Dec 2021 22:59:55 +0100 Date: Thu, 30 Dec 2021 22:59:19 +0100 From: Detlef Steuer To: emacs-orgmode@gnu.org Subject: [patch] add TTL as defcustom to ox-icalendar Message-ID: <20211230225919.1a660666@hsu-hh.de> X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.31; x86_64-suse-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="MP_/qD8UC9E3JK61LYNKmWXGyox" X-HSU-Virusscan: Routed to first Viruswall X-Brisant: Sender steuer@hsu-hh.de X-HSU-Virusscan: First Viruswall passed X-Authenticated-Sender: 13438/95.116.132.56 X-HSU-Virusscan: Routed to second Viruswall (Cisco Ironport ESAV) X-Brisant: Sender steuer@hsu-hh.de Received-SPF: pass client-ip=139.11.10.105; envelope-from=prvs=09988d714e=steuer@hsu-hh.de; helo=premail.unibw-hamburg.de X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1640901681; 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:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=MbkqvouVrEvOJrHkVpUZZ5ld2li+6HW+wERnXdW4Cms=; b=rD8tbWC4pdMmhuyxSRhp6m1mj5+GYzOqWCfBjcNr1yOcnoScecYy00uHrOQ1yQmv+SDYGy 9GyZwxGwBEC6Alc7rPP52TIi+MzS9+vsKPpc6Hbqk7xMgkYPAmH0Kd2+EInWwMFKc46kN+ gPYFbPg8Sfeaq1q23VkXez4LOtIaCMYMGVpe9t/N9VW5Tn7+ZT+wpY2rnu+SZ0FuLGNTIP c6ZDF6oR+lTIW5gKHCVXatfgnyMZzLXGaO+GbB8ENF5TQ/PwVVbLEPcDYXFWen+pn2XkUa yjCrZYP9cDN80AkP6ybyvK74snUf/p8ocNIuIxlSoPA4zZMYYqmtV0Ok0WiKpw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1640901681; a=rsa-sha256; cv=none; b=dm1zmwOkR0/j/O5pFkWbo2xns8Y1E0Uf+vBm8665sw123C1p3lzxoPRG8LePPCJSveDu0V zSifiX22ztxNUlKP2wv4udNPP+B723QicJgqqINwgj3jpp4Eq+m/8NHw79b6Uo8gTl5Igr 5HGsL+U1LR7R2HHkC8Wei/MC1bLOcCCcdEqOPvlNEXjUg9v3hhbeg8epvdzPXlc4uju+ZG irFYMu/LxRux9h7hupi1jvgGfmQ+0nuD68uHWpv3PInYd6bYtZHeKgOWREIIxV6LAunnsX 8es4i87Y9Nzijg9V9GxOiu6ll6mkh1VFMN2OnD04NGBX/0HPWk32a8xBT8fy6g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=hsu-hh.de header.s=hsu-hh_de header.b=vWLwzipI; dmarc=none; 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" X-Migadu-Spam-Score: -2.47 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=hsu-hh.de header.s=hsu-hh_de header.b=vWLwzipI; dmarc=none; 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" X-Migadu-Queue-Id: D548924D27 X-Spam-Score: -2.47 X-Migadu-Scanner: scn1.migadu.com X-TUID: SsDILlEwg227 --MP_/qD8UC9E3JK61LYNKmWXGyox Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline This is my first try ever to contribute anything in elisp. The nextcloud calendar app supports the X-PUBLISHED-TTL option if subscribing to an ics file. Nextcloud defaults to a TTL of 1 week, what is much too long for my use case. When exporting to such a file from org I did not find any way to set this option during export. So I tried to add a defcustom in ox-icalendar.el. The default TTL in this patch is 1 hour. I think this qualifies as an tiny patch, as it is mostly a docstring :-), in case anybody finds this an useful addition. The patch is relative to 9.5.1 from elpa. All comments very much appreciated. And a happy new year to you all Detlef --MP_/qD8UC9E3JK61LYNKmWXGyox Content-Type: text/turtle Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=patch.ttl 267a268,280 > (defcustom org-icalendar-ttl "PT1H" > "The time to life for the exported calendar. > Subscribing clients to the exported ics file can derive the time interval > to read the file again from the server. One example of such a client is > the nextcloud calendar, which respects the setting of > X-PUBLISHED-TTL, i.e. X-PUBLISHED-TTL:PT1H . > > See https://icalendar.org/iCalendar-RFC-5545/3-8-2-5-duration.html > for a complete description of possiblee values of this option. I.e. > PT1H stands for 1 hour, PT0H27M34S for 0 hours, 27 minutes and 34 seconds." > :group 'org-export-icalendar > :type 'string) > 303c316,317 < (:icalendar-use-scheduled nil nil org-icalendar-use-scheduled)) --- > (:icalendar-use-scheduled nil nil org-icalendar-use-scheduled) > (:icalendar-ttl nil nil org-icalendar-ttl)) 833c847 < (defun org-icalendar--vcalendar (name owner tz description contents) --- > (defun org-icalendar--vcalendar (name owner tz description ttl contents) 835c849 < NAME, OWNER, TZ, DESCRIPTION and CONTENTS are all strings giving, --- > NAME, OWNER, TZ, DESCRIPTION, TTL and CONTENTS are all strings giving, 837c851,852 < used, a short description and the other components included." --- > used, a short description, the time-to-live resp. refresh period and > the other components included." 843a859 > X-PUBLISHED-TTL:%s 848c864,865 < (org-icalendar-cleanup-string description)) --- > (org-icalendar-cleanup-string description) > (org-icalendar-cleanup-string ttl)) 976a994 > org-icalendar-ttl 1000a1019,1020 > ;; TTL (Refresh period) > org-icalendar-ttl --MP_/qD8UC9E3JK61LYNKmWXGyox--