Change: (org-ql-agenda--format-element) Return empty string if nil
This allows mapping the function across elements which may be nil, helping to separate items in agenda views by inserting nil between them.
This commit is contained in:
parent
7829238988
commit
4970d441cc
1 changed files with 69 additions and 65 deletions
|
|
@ -326,7 +326,11 @@ dates in the past, and negative for dates in the future."
|
|||
;; This essentially needs to do what `org-agenda-format-item' does,
|
||||
;; which is a lot. We are a long way from that, but it's a start.
|
||||
"Return ELEMENT as a string with text-properties set by its property list.
|
||||
Its property list should be the second item in the list, as returned by `org-element-parse-buffer'."
|
||||
Its property list should be the second item in the list, as
|
||||
returned by `org-element-parse-buffer'. If ELEMENT is nil,
|
||||
return an empty string."
|
||||
(if (not element)
|
||||
""
|
||||
(let* ((properties (cadr element))
|
||||
;; Remove the :parent property, which so bloats the size of
|
||||
;; the properties list that it makes it essentially
|
||||
|
|
@ -391,7 +395,7 @@ Its property list should be the second item in the list, as returned by `org-ele
|
|||
(org-add-props it properties
|
||||
'todo-state todo-keyword
|
||||
'tags tag-list
|
||||
'org-habit-p habit-property))))
|
||||
'org-habit-p habit-property)))))
|
||||
|
||||
(defun org-ql-agenda--add-faces (element)
|
||||
"Return ELEMENT with deadline and scheduled faces added."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue