From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id wMPLBTep0WH2cQAAgWs5BA (envelope-from ) for ; Sun, 02 Jan 2022 14:31:35 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id wK06Ajep0WHVugAAauVa8A (envelope-from ) for ; Sun, 02 Jan 2022 14:31:35 +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 91FE2EFA3 for ; Sun, 2 Jan 2022 14:31:34 +0100 (CET) Received: from localhost ([::1]:52768 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n40xQ-0005YW-PU for larch@yhetil.org; Sun, 02 Jan 2022 08:31:32 -0500 Received: from eggs.gnu.org ([209.51.188.92]:58336) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n40vR-0005XA-TE for emacs-orgmode@gnu.org; Sun, 02 Jan 2022 08:29:30 -0500 Received: from mail-sender-5.unibw-hamburg.de ([139.11.10.105]:55467 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 1n40vP-0005fE-MC for emacs-orgmode@gnu.org; Sun, 02 Jan 2022 08:29:29 -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:References:In-Reply-To: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:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=tFoQLrgTR7P59d61V2Q6IgIgk/vqNUEzL7dk90Hh3ZM=; t=1641130165; x=1641994165; b=W+8GwyhhY2PTFcIMvQs9fjSfUrXv1f6E5u4ZSxywDwml7sztRUS8boK3pLhG0bRL+L/FM8VmIzH EA8hS2okgoFBZy8F5XvVkxKE/BWug50UhX3CiYZY9PKGur12uhNVwGWWhx79Bs0uHV14QfLO01zdO dvQrnpFhpb648RqhprG1DBop4antX6bsjeF5rmNbbfpL5gJx1x2C9tS00PKVdlQFrIs4PAPaNXEYi JEKL3EbgCMOHibFP0irteNWBJhZL0+6LucuqbeBs54BD+BplFTyD4AOefqfxB3miPfMT6PuYHJklh jCnbFkRR4P8L3nkt7pEa3/EEBaJ+Ih7U+IIQ==; Received: from rzav4.unibw-hamburg.de ([139.11.12.54]:63420) by premail.unibw-hamburg.de with esmtp (HSU Mailserver) (envelope-from ) id 1n40vc-0007a3-Al for emacs-orgmode@gnu.org; Sun, 02 Jan 2022 14:29:24 +0100 X-IronPort-AV: E=Sophos;i="5.88,255,1635199200"; d="scan'208";a="70762518" Received: from mailcluster-1.unibw-hamburg.de (HELO premail.unibw-hamburg.de) ([139.11.5.101]) by rzav4.unibw-hamburg.de with ESMTP; 02 Jan 2022 14:29:24 +0100 Received: from dynamic-077-000-183-111.77.0.pool.telefonica.de ([77.0.183.111]:43808 helo=localhost.localdomain) by premail.unibw-hamburg.de with esmtpsa (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (HSU Mailserver) (envelope-from ) id 1n40vc-0007VP-0A; Sun, 02 Jan 2022 14:29:23 +0100 Date: Sun, 2 Jan 2022 14:28:49 +0100 From: Detlef Steuer To: emacs-orgmode@gnu.org Subject: Re: [patch] improved: add TTL as defcustom to ox-icalendar Message-ID: <20220102142849.0af72bcb@hsu-hh.de> In-Reply-To: <20211230225919.1a660666@hsu-hh.de> References: <20211230225919.1a660666@hsu-hh.de> Organization: HSU 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_/k.qdVOAwK/tnozk.sgLRxHZ" X-HSU-Virusscan: Routed to first Viruswall X-Brisant: Sender steuer@hsu-hh.de X-HSU-Virusscan: First Viruswall passed X-Authenticated-Sender: 13438/77.0.183.111 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=000162685e=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, RCVD_IN_MSPIKE_H2=-0.001, 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=1641130294; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=tFoQLrgTR7P59d61V2Q6IgIgk/vqNUEzL7dk90Hh3ZM=; b=sVWs/aI0NX0VV2PUq5FAJSghKP0KMgjvKaEMjub81yD+BgSMX1WX7iQ6Lp1bZpdPPj1V8D zDgXimH1oB97C7kJLcobOgwXAnHrBqdSxlQdCjmPqohTS0ogx12B+wy0QMC5RH2mMXizPd PJjDvOjpLyQwz/aOyI65hI+vvrJJA0SVRg1n2dO6ME/Zs6AgtcBCiuj3btLXFHFLmzceH8 sumd+BDIK+4gibsb7g6jelmuQK79bYdpVdQYXyHbouD+f4YRYgt6KQ/3McaTOaU8MCXK4t rJ0yPLSSBiBj/vtODF3wDI5u53i/y5kjsmBU/ybKSd2mX6JCDHm2f3RLBF3qiw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1641130294; a=rsa-sha256; cv=none; b=VdJj/FmL7DJ1Or2cbyw87Y5q1qB8WwDpeSz/c1Ez0gFHkmNpyH7yHKDVoLRTdsmJhn+NNH Yzr290KmTe+axQwFg0FtHxs8qFrP7roBbqb/nytiEpUB8zm9Rvw2GktOAIBiS971HVEpDr i0VdEXbAVKILZwhbgQGoiYEG8BmUvROutQ8M+Tbve+Tz3WIZCtgaJIRP5R43A45Qp7C+wt bM5InenKQIjiek5f9kEjiwuYAbSEfAghvyVkCw7zmvG2y75VK6Z5HF4ebG1QR+nhIjb7nO Gw3doTmdkLfUxH1NkHW2oT6zgz8Ghf6d30rB9FG+eTQ773wpTCicoGlHVTrqRg== 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=W+8Gwyhh; 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.48 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=hsu-hh.de header.s=hsu-hh_de header.b=W+8Gwyhh; 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: 91FE2EFA3 X-Spam-Score: -2.48 X-Migadu-Scanner: scn1.migadu.com X-TUID: QcualHy68YJ4 --MP_/k.qdVOAwK/tnozk.sgLRxHZ Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline Improved patch since org-icalendar-template needed to use the new variable, too. And now based on 9.5.2 from elpa. Detlef Am Thu, 30 Dec 2021 22:59:19 +0100 schrieb Detlef Steuer : > 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_/k.qdVOAwK/tnozk.sgLRxHZ Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=addttl.patch 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)) 830a845,846 > ;; TTL > org-icalendar-ttl 833c849 < (defun org-icalendar--vcalendar (name owner tz description contents) --- > (defun org-icalendar--vcalendar (name owner tz description ttl contents) 835c851 < NAME, OWNER, TZ, DESCRIPTION and CONTENTS are all strings giving, --- > NAME, OWNER, TZ, DESCRIPTION, TTL and CONTENTS are all strings giving, 837c853,854 < 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." 843a861 > X-PUBLISHED-TTL:%s 848c866,867 < (org-icalendar-cleanup-string description)) --- > (org-icalendar-cleanup-string description) > (org-icalendar-cleanup-string ttl)) 976a996 > org-icalendar-ttl 1000a1021,1022 > ;; TTL (Refresh period) > org-icalendar-ttl --MP_/k.qdVOAwK/tnozk.sgLRxHZ--