Skip to content

Commit

Permalink
FIX don't make empty planning nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
ndwarshuis committed Aug 24, 2024
1 parent 4b0dc3f commit dda75ef
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions org-ml.el
Original file line number Diff line number Diff line change
Expand Up @@ -5494,20 +5494,23 @@ CONFIG is a list corresponding to `org-ml--scc-encode'."
CONFIG is a list corresponding to `org-ml--scc-encode'."
(-let* (((&plist :planning p :node-props n :logbook lb :blank b :contents c)
supercontents)
(anyp (or (plist-get p :closed)
(plist-get p :scheduled)
(plist-get p :deadline)))
(lb-nodes (org-ml--logbook-to-nodes config lb)))
(cond
(lb-nodes
(org-ml--supersection-init
0 `(,@(when p (list (apply #'org-ml-build-planning! p)))
0 `(,@(when anyp (list (apply #'org-ml-build-planning! p)))
,@(when n (list (apply #'org-ml-build-property-drawer! n)))
,@(org-ml--set-last-post-blank b lb-nodes)
,@c)))
(n
(org-ml--supersection-init
0 `(,@(when p (list (apply #'org-ml-build-planning! p)))
0 `(,@(when anyp (list (apply #'org-ml-build-planning! p)))
,(apply #'org-ml-build-property-drawer! :post-blank b n)
,@c)))
(p
(anyp
(org-ml--supersection-init
0 (cons (apply #'org-ml-build-planning! :post-blank b p) c)))
(t
Expand Down

0 comments on commit dda75ef

Please sign in to comment.