ox-icalendar: Add support for multi-line SUMMARY, LOCATION, and DESCRIPTION
* lisp/ox-icalendar.el (org-icalendar-entry): Use `org-entry-get' to account for both PROP and PROP+ in SUMMARY, LOCATION, and DESCRIPTION properties. Use newline as accumulated value separator. * etc/ORG-NEWS (iCalendar export now supports multiline =SUMMARY=, =LOCATION=, and =DESCRIPTION= properties): Announce the breaking change. * doc/org-manual.org (iCalendar Export): Add an example in the manual. Reported-by: Hanno Perrey <hanno@hoowl.se> Link: https://orgmode.org/list/87o821dv7o.fsf@localhost
This commit is contained in:
parent
46b9769a02
commit
8ec89c53ca
|
@ -16333,6 +16333,18 @@ when exporting. To force the backend to inherit the =LOCATION=,
|
||||||
=TIMEZONE= and =CLASS= properties, configure the
|
=TIMEZONE= and =CLASS= properties, configure the
|
||||||
~org-use-property-inheritance~ variable.
|
~org-use-property-inheritance~ variable.
|
||||||
|
|
||||||
|
=SUMMARY=, =LOCATION=, and =DESCRIPTION= properties can define
|
||||||
|
multi-line summary, location, or description using =<PROPERTY>+=
|
||||||
|
syntax (see [[*Property Syntax]]):
|
||||||
|
|
||||||
|
: * Meeting at location with multi-line address
|
||||||
|
: <2024-01-08 Mon 14:20-15:00>
|
||||||
|
: :PROPERTIES:
|
||||||
|
: :LOCATION: Someplace
|
||||||
|
: :LOCATION+: Some Street 5
|
||||||
|
: :LOCATION+: 12345 Small Town
|
||||||
|
: :END:
|
||||||
|
|
||||||
#+vindex: org-icalendar-include-body
|
#+vindex: org-icalendar-include-body
|
||||||
When Org entries do not have =SUMMARY=, =DESCRIPTION=, =LOCATION= and
|
When Org entries do not have =SUMMARY=, =DESCRIPTION=, =LOCATION= and
|
||||||
=CLASS= properties, the iCalendar export backend derives the summary
|
=CLASS= properties, the iCalendar export backend derives the summary
|
||||||
|
|
26
etc/ORG-NEWS
26
etc/ORG-NEWS
|
@ -13,6 +13,32 @@ Please send Org bug reports to mailto:emacs-orgmode@gnu.org.
|
||||||
|
|
||||||
* Version 9.7 (not released yet)
|
* Version 9.7 (not released yet)
|
||||||
** Important announcements and breaking changes
|
** Important announcements and breaking changes
|
||||||
|
*** iCalendar export now supports multiline =SUMMARY=, =LOCATION=, and =DESCRIPTION= properties
|
||||||
|
|
||||||
|
Previously, it was not possible to specify multi-line location,
|
||||||
|
summary, or description when exporting to iCalendar.
|
||||||
|
|
||||||
|
In the following example, =LOCATION= was exported as "Someplace",
|
||||||
|
ignoring the other lines.
|
||||||
|
|
||||||
|
#+begin_src org
|
||||||
|
,* heading with multi-line property
|
||||||
|
:PROPERTIES:
|
||||||
|
:LOCATION: Someplace
|
||||||
|
:LOCATION+: Some Street 5
|
||||||
|
:LOCATION+: 12345 Small Town
|
||||||
|
:END:
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
Now, =SUMMARY+=, =LOCATION+=, and =DESCRIPTION+= properties can be
|
||||||
|
used to create multi-line values.
|
||||||
|
|
||||||
|
In the above example, =LOCATION= is now exported as
|
||||||
|
|
||||||
|
: Someplace
|
||||||
|
: Some Street 5
|
||||||
|
: 12345 Small Town
|
||||||
|
|
||||||
*** Org mode no longer disallows configuring ~display-buffer-alist~ to open Org popups in other frame
|
*** Org mode no longer disallows configuring ~display-buffer-alist~ to open Org popups in other frame
|
||||||
|
|
||||||
Previously, Org mode disallowed pop-up frames when displaying dispatch buffers.
|
Previously, Org mode disallowed pop-up frames when displaying dispatch buffers.
|
||||||
|
|
|
@ -643,13 +643,15 @@ inlinetask within the section."
|
||||||
(let ((todo-type (org-element-property :todo-type entry))
|
(let ((todo-type (org-element-property :todo-type entry))
|
||||||
(uid (or (org-element-property :ID entry) (org-id-new)))
|
(uid (or (org-element-property :ID entry) (org-id-new)))
|
||||||
(summary (org-icalendar-cleanup-string
|
(summary (org-icalendar-cleanup-string
|
||||||
(or (org-element-property :SUMMARY entry)
|
(or
|
||||||
(org-export-data
|
(let ((org-property-separators '(("SUMMARY" . "\n"))))
|
||||||
(org-element-property :title entry) info))))
|
(org-entry-get entry "SUMMARY" 'selective))
|
||||||
(loc (org-icalendar-cleanup-string
|
(org-export-data
|
||||||
(org-export-get-node-property
|
(org-element-property :title entry) info))))
|
||||||
:LOCATION entry
|
(loc
|
||||||
(org-property-inherit-p "LOCATION"))))
|
(let ((org-property-separators '(("LOCATION" . "\n"))))
|
||||||
|
(org-icalendar-cleanup-string
|
||||||
|
(org-entry-get entry "LOCATION" 'selective))))
|
||||||
(class (org-icalendar-cleanup-string
|
(class (org-icalendar-cleanup-string
|
||||||
(org-export-get-node-property
|
(org-export-get-node-property
|
||||||
:CLASS entry
|
:CLASS entry
|
||||||
|
@ -658,7 +660,8 @@ inlinetask within the section."
|
||||||
;; (headline) or contents (inlinetask).
|
;; (headline) or contents (inlinetask).
|
||||||
(desc
|
(desc
|
||||||
(org-icalendar-cleanup-string
|
(org-icalendar-cleanup-string
|
||||||
(or (org-element-property :DESCRIPTION entry)
|
(or (let ((org-property-separators '(("DESCRIPTION" . "\n"))))
|
||||||
|
(org-entry-get entry "DESCRIPTION" 'selective))
|
||||||
(let ((contents (org-export-data inside info)))
|
(let ((contents (org-export-data inside info)))
|
||||||
(cond
|
(cond
|
||||||
((not (org-string-nw-p contents)) nil)
|
((not (org-string-nw-p contents)) nil)
|
||||||
|
|
Loading…
Reference in New Issue