From 95b8586a4886051eb09e7ef34e1b9f60a040bfb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Cadilhac?= Date: Thu, 7 Feb 2019 12:20:24 +0000 Subject: [PATCH 2/6] Include tags in SUMMARY if so desired. --- lisp/ox-icalendar.el | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lisp/ox-icalendar.el b/lisp/ox-icalendar.el index 2bf2cd89a..5e7f2804a 100644 --- a/lisp/ox-icalendar.el +++ b/lisp/ox-icalendar.el @@ -119,6 +119,12 @@ This is a list with possibly several symbols in it. Valid symbols are: (const :tag "SCHEDULED in TODO entries become start date" todo-start))) +(defcustom org-icalendar-summary-uses-tags nil + "Non-nil means that TITLE+TAGS is used when SUMMARY is not provided. +If nil, then TITLE is used alone." + :group 'org-export-icalendar + :type 'boolean) + (defcustom org-icalendar-bump-todos nil "Non-nil means that pending TODO VEVENTs are bumped to today. In addition, if non-nil, the number of late days is indicated in the summary." @@ -598,6 +604,13 @@ inlinetask within the section." (tz (org-export-get-node-property :TIMEZONE entry (org-property-inherit-p "TIMEZONE")))) + (when (and org-icalendar-summary-uses-tags + (not (org-element-property :SUMMARY entry))) + (let ((tags (apply 'concat + (mapcar (lambda (x) (concat ":" x)) + (org-export-get-tags entry info nil t))))) + (when tags + (setq summary (concat summary " " tags ":"))))) (concat ;; Events: Delegate to `org-icalendar--vevent' to generate ;; "VEVENT" component from scheduled, deadline, or any -- 2.19.2