From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id uC/QBpeO32OO5AAAbAwnHQ (envelope-from ) for ; Sun, 05 Feb 2023 12:10:15 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 2L7aBpeO32OYQwAA9RJhRA (envelope-from ) for ; Sun, 05 Feb 2023 12:10:15 +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 D119E3860A for ; Sun, 5 Feb 2023 12:10:14 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pOctR-0007ST-Cq; Sun, 05 Feb 2023 06:09:10 -0500 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 1pOctP-0007S6-Iy for emacs-orgmode@gnu.org; Sun, 05 Feb 2023 06:09:07 -0500 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pOctL-0006oN-2L for emacs-orgmode@gnu.org; Sun, 05 Feb 2023 06:09:06 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id CB61D240147 for ; Sun, 5 Feb 2023 12:09:00 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1675595340; bh=86bH02TlrJ6rmTYc0IBXsFeiS00Ky8xhTVhaICHGQKg=; h=From:To:Cc:Subject:Date:From; b=JtW2YM4WpId44Ap78ggutd9NhMViZqRD6Qp00LWgzGToutl+0DgDl7FaPCzJxhYsj KN49vzk2lVX1bsvBgQLguzviojCtzMoORCMot9g3cnYFjy6X/Y0bdkBoXrXcPwIGQ3 m9ZiXVjiZ3F6LDsptLWLOuOCtOHdk4cD0JhSklTlQVglI1sEOnZFWhcu/YtY35eC1P ACoFrY8aqZcElkLK9ZCMAwPx9tNXD6Bp7OWOtD0q//Hn93zSNB8ZJfaWnnCF+lu+OX K4Qs714np33qxKvvtThW1eO/HYluj1tBwmPAfQBgs5kySde18wbnMKBzHpWjv+6Zbm fYyLJASy14fug== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4P8mqH4h7zz6tq1; Sun, 5 Feb 2023 12:08:59 +0100 (CET) From: Ihor Radchenko To: Detlef Steuer Cc: emacs-orgmode@gnu.org Subject: Re: [patch] improved: add TTL as defcustom to ox-icalendar In-Reply-To: <20230204220104.2d74cc4e@linux.fritz.box> References: <20211230225919.1a660666@hsu-hh.de> <20220102142849.0af72bcb@hsu-hh.de> <20220103084141.72d2f384@hsu-hh.de> <20220103123253.6bb48655@hsu-hh.de> <87o7tgaa42.fsf@localhost> <20221109082520.066dc4c6@linux.fritz.box> <20230113181035.1469ab37@hsu-hh.de> <878ri52z06.fsf@localhost> <20230116234230.5080fb07@linux.fritz.box> <87lem1ijih.fsf@localhost> <20230117110316.56a1899e@gaia.unibw-hamburg.de> <87a62hihcg.fsf@localhost> <20230203142508.4140679f@linux.fritz.box> <87leldg00x.fsf@localhost> <20230204220104.2d74cc4e@linux.fritz.box> Date: Sun, 05 Feb 2023 11:09:37 +0000 Message-ID: <87fsbke5ce.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1675595414; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=3f8eDt0Z6Utbh0ldWX2UZtOcgVCfey3Ua1IgZOOMHZE=; b=ggUZg576F66JgC0zmqqWJDP2T7zex4eKZfXTBYMFwqxW+CcTGU95V8p7nyJqfjOo9G7waT lOQmJef2il8KYO4w8Lk7PTeOyOM9EMb9zrOEiSGjwQiq06huvDxAhU8r1WRn7uOKr8nnd1 PvIhvjNUCHtVuDuDsfT2yenOPKq6agAqw53FmfZJQ/7TkE6AGY6cDTwbAjdxewDpINItLk 2DLMYaau6xqPh+LPkcl3Qqv+pBm4GJ071aVyMQie1GvSwuMRJ/4qvthdHfAlLdiOxnGame BXkRSbl3/zPJX1KCS7frozgoBnaia3AVKEJampbCO/GTCRKtYS8FIe46b9Z8IA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=JtW2YM4W; 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=posteo.net ARC-Seal: i=1; s=key1; d=yhetil.org; t=1675595414; a=rsa-sha256; cv=none; b=RF/c0zNMkA8XVxGUEV8E7ZZZep4lWzaKTTtStZHtYtJks4GqlL+tUXSRaBCY6oECogu6LT 8vl5Xd2/y8iN284+aKz3nHX0p2+Isbs9re2fZT0tK/K6xUoa/5+Zo1Yn0PHLt8gtjWN0si mPxQZqQsYuRaAuZADqwIbHlpTsQQkPOTEy7Ea2Vq9xn5zmE9yO3dzoWbZHx6tzY9zeXBkv n/qlpmRF2GwN4cuDTeIwshIS0KbT/rXdWWmGKW3T2FvwWRVbNupEqyC9tdbGePy2cqvn+2 OcSZlY6Fjog8CyTjmeDdE+ysXuSC4myeg85i/66Bhge10AHM8FKOIQEJNDdwcQ== X-Migadu-Spam-Score: -6.05 X-Spam-Score: -6.05 X-Migadu-Queue-Id: D119E3860A Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=JtW2YM4W; 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=posteo.net X-Migadu-Scanner: scn1.migadu.com X-TUID: 0//XprvJlEfc Detlef Steuer writes: > Next try. Thanks! > +Default for ~org-icalendar-ttl~ is nil. In that case the setting will > +not be used in the exported ICS file. > + > +The option may also be set using the ICAL-TTL keyword. Should quote the Org syntax keyword according to our documentation standards: =ICAL-TTL= > @@ -295,7 +295,31 @@ Interesting value are: > (const :tag "Local time" ":%Y%m%dT%H%M%S") > (const :tag "Explicit local time" ";TZID=%Z:%Y%m%dT%H%M%S") > (const :tag "Universal time" ":%Y%m%dT%H%M%SZ") > - (string :tag "Explicit format"))) > + (string :tag "Other"))) This does not belong to this patch. Probably accidental change. > +(defcustom org-icalendar-ttl "PT1H" > + "The time-to-live 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 in an ICS file. Setting org-icalendar-ttl to \"PT1H\" `org-icalendar-ttl'. > +would advise a server to reload the file every hour. > + > +See https://icalendar.org/iCalendar-RFC-5545/3-8-2-5-duration.html > +for a complete description of possiblee values of this option. For example > +\"PT1H\" stands for 1 hour, \"PT0H27M34S\" stands for 0 hours, 27 minutes > +and 34 seconds. Default value is nil, which means no such option The default > +is set in the ICS file. > + > +This option can also be set with the ICAL-TTL keyword." > + :group 'org-export-icalendar > + :type '(choice > + (const :tag "no refresh" nil) "No refresh" > (concat (format "BEGIN:VCALENDAR > VERSION:2.0 > X-WR-CALNAME:%s > PRODID:-//%s//Emacs with Org mode//EN > X-WR-TIMEZONE:%s > -X-WR-CALDESC:%s > -CALSCALE:GREGORIAN\n" > - (org-icalendar-cleanup-string name) > - (org-icalendar-cleanup-string owner) > - (org-icalendar-cleanup-string tz) > - (org-icalendar-cleanup-string description)) > +X-WR-CALDESC:%s\n" > +(when ttl "X-PUBLISHED-TTL:%s\n") > +"CALSCALE:GREGORIAN\n") > + (org-icalendar-cleanup-string name) > + (org-icalendar-cleanup-string owner) > + (org-icalendar-cleanup-string tz) > + (org-icalendar-cleanup-string description) > + (org-icalendar-cleanup-string ttl)) > contents > "END:VCALENDAR\n")) This does not look right. Did you try to export anything with this patch applied? You are passing multiple string arguments to `format'. Finally, I think that we can document the new keyword in the manual. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at