changelog shortlog graph tags branches changeset files revisions annotate raw help

Mercurial > core / lisp/lib/skel/comp/org.lisp

changeset 490: 7a7e6c273f52
child: e2d577f31866
author: Richard Westhaver <ellis@rwest.io>
date: Sun, 30 Jun 2024 17:54:33 -0400
permissions: -rw-r--r--
description: skel component updates
1 ;;; org.lisp --- Skel Org File Components
2 
3 ;;
4 
5 ;;; Code:
6 (in-package :skel/comp/org)
7 
8 (defclass sk-org-file (sk-component org-document sk-meta) ())
9 
10 (defmethod sk-new ((self (eql :org)) &rest args)
11  (apply #'make-instance 'sk-org-file args))
12 
13 (defmethod sk-convert ((self org-document))
14  (let ((self (change-class self 'sk-org-file)))
15  (update-id self)
16  self))
17 
18 (defmethod sk-load-component ((kind (eql :org)) (name pathname))
19  (declare (ignore kind))
20  (let* ((name (namestring name))
21  (path (make-pathname :name name :type "org"))
22  (comp (sk-convert (org-parse :document path))))
23  (setf (sk-name comp) name)
24  (setf (sk-path comp) path)
25  comp))
26 
27 ;; (describe (sk-load-component :org #p"readme"))
28 
29 
30