>From edecd8c97961b759c3aa608d6e05daeb09989c3d Mon Sep 17 00:00:00 2001 From: Eric Abrahamsen Date: Sat, 19 Aug 2017 14:51:44 -0700 Subject: [PATCH 2/2] Inherit TIMEZONE and LOCATION properties in iCalendar export * lisp/ox-icalendar.el (org-icalendar-entry): Both properties now optionally inherit, depending on value of `org-use-property-inheritance'. * doc/org.texi: Mention change. * etc/ORG-NEWS: Mention change. --- doc/org.texi | 2 +- etc/ORG-NEWS | 3 +++ lisp/ox-icalendar.el | 8 ++++++-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/doc/org.texi b/doc/org.texi index d8a8a8e81..8bb6fa7f4 100644 --- a/doc/org.texi +++ b/doc/org.texi @@ -14162,7 +14162,7 @@ and write it to @code{org-icalendar-combined-agenda-file} file name. @cindex property, TIMEZONE The iCalendar export back-end includes SUMMARY, DESCRIPTION, LOCATION and TIMEZONE properties from the Org entries when exporting. To force the -back-end to inherit the LOCATION property, configure the +back-end to inherit the LOCATION and TIMEZONE properties, configure the @code{org-use-property-inheritance} variable. When Org entries do not have SUMMARY, DESCRIPTION and LOCATION properties, diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS index f53a70837..cf7502ace 100644 --- a/etc/ORG-NEWS +++ b/etc/ORG-NEWS @@ -99,6 +99,9 @@ Use "/!" markup when filtering TODO keywords to get only not-done TODO keywords. ** New features +*** iCalendar export uses inheritance for TIMEZONE and LOCATION properties +Both these properties can be inherited during iCalendar export, +depending on the value of ~org-use-property-inheritance~. *** iCalendar export respects a TIMEZONE property Set the TIMEZONE property on an entry to specify a time zone for that entry only during iCalendar export. The property value should be diff --git a/lisp/ox-icalendar.el b/lisp/ox-icalendar.el index d445c7b8d..b27c30c31 100644 --- a/lisp/ox-icalendar.el +++ b/lisp/ox-icalendar.el @@ -537,7 +537,9 @@ inlinetask within the section." (org-export-data (org-element-property :title entry) info)))) (loc (org-icalendar-cleanup-string - (org-element-property :LOCATION entry))) + (org-export-get-node-property + :LOCATION entry + (org-property-inherit-p "LOCATION")))) ;; Build description of the entry from associated section ;; (headline) or contents (inlinetask). (desc @@ -553,7 +555,9 @@ inlinetask within the section." org-icalendar-include-body)))) (org-icalendar-include-body (org-trim contents))))))) (cat (org-icalendar-get-categories entry info)) - (tz (org-element-property :TIMEZONE entry))) + (tz (org-export-get-node-property + :TIMEZONE entry + (org-property-inherit-p "TIMEZONE")))) (concat ;; Events: Delegate to `org-icalendar--vevent' to generate ;; "VEVENT" component from scheduled, deadline, or any -- 2.14.1