Coverage report: /home/ellis/comp/core/lib/organ/heading.lisp
Kind | Covered | All | % |
expression | 23 | 30 | 76.7 |
branch | 0 | 0 | nil |
Key
Not instrumented
Conditionalized out
Executed
Not executed
Both branches taken
One branch taken
Neither branch taken
1
;;; lib/organ/obj.lisp --- Org Heading
8
(defclass org-heading ()
9
((headline :initarg :headline :initform (org-create :headline) :type org-headline :accessor org-headline)
10
(planning :initarg :planning :initform nil :type (or null org-planning) :accessor org-planning)
11
(properties :initarg :properties :initform nil :type (or null org-property-drawer) :accessor org-properties)
12
(contents :initarg :contents :initform nil :type (or null (vector (or org-section org-heading)))
13
:accessor org-contents)))
15
(defmethod org-create ((type (eql :header)) &rest initargs &key &allow-other-keys)
16
(apply #'make-instance (sym-to-org-class-name type) initargs))
18
;; TODO 2024-03-17: fix org-parse-planning-properties -- hangs
19
(define-org-parser (heading :from stream)
20
(when-let* ((l (read-line input))
21
(headline (org-parse :headline l)))
22
(let ((planning (org-parse :planning input)))
23
(make-instance 'org-heading
26
:properties (org-parse :property-drawer input)
27
:contents (org-parse :section input)))))
29
(define-org-parser (heading :from string)
30
(with-input-from-string (s input)
31
(org-parse :heading s)))