1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-11-28 07:44:49 +00:00

org-icalendar-entry: Fix when the value is a list of keywords

* lisp/ox-icalendar.el (org-icalendar-entry): Add condition when the
value of :icalendar-include-todo is a list of keywords.
(org-icalendar-include-todo): Document that the value can be a list of
keywords, as per :type spec.

Reported-by: Björn Bidar <bjorn.bidar@thaodan.de>
Link: https://list.orgmode.org/orgmode/87ttqjirrv.fsf@/
This commit is contained in:
Ihor Radchenko 2023-10-22 11:45:34 +03:00
parent 1494445116
commit 693a3c558f
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B

View File

@ -222,7 +222,8 @@ Valid values are:
nil don't include any task.
t include tasks that are not in DONE state.
`unblocked' include all TODO items that are not blocked.
`all' include both done and not done items."
`all' include both done and not done items.
\\(\"TODO\" ...) include specific TODO keywords."
:group 'org-export-icalendar
:type '(choice
(const :tag "None" nil)
@ -727,13 +728,16 @@ inlinetask within the section."
;; so, call `org-icalendar--vtodo' to transcode it into
;; a "VTODO" component.
(when (and todo-type
(cl-case (plist-get info :icalendar-include-todo)
(all t)
(unblocked
(pcase (plist-get info :icalendar-include-todo)
(`all t)
(`unblocked
(and (eq type 'headline)
(not (org-icalendar-blocked-headline-p
entry info))))
((t) (eq todo-type 'todo))))
entry info))))
;; unfinished
(`t (eq todo-type 'todo))
((and (pred listp) kwd-list)
(member (org-element-property :todo-keyword entry) kwd-list))))
(org-icalendar--vtodo entry uid summary loc desc cat tz class))
;; Diary-sexp: Collect every diary-sexp element within ENTRY
;; and its title, and transcode them. If ENTRY is