changelog shortlog graph tags branches changeset files revisions annotate raw help

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

changeset 663: cc89b337384b
parent: e6c6713c17ff
author: Richard Westhaver <ellis@rwest.io>
date: Sat, 21 Sep 2024 22:58:22 -0400
permissions: -rw-r--r--
description: skel upgrades, added skel/net
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)) (form pathname) &optional (path *default-pathname-defaults*))
19  (declare (ignore kind))
20  (let* ((name (namestring form))
21  (p (make-pathname :name name :type "org" :directory (namestring path)))
22  (comp (sk-convert (org-parse :document p))))
23  (setf (sk-name comp) name)
24  (setf (sk-path comp) p)
25  comp))
26 
27 ;; (describe (sk-load-component :org #p"readme"))