Detlef Steuer <ste...@hsu-hh.de> 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 <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92>