changelog shortlog graph tags branches changeset files revisions annotate raw help

Mercurial > core / lisp/lib/organ/pkg.lisp

changeset 698: 96958d3eb5b0
parent: f6a340b92274
author: Richard Westhaver <ellis@rwest.io>
date: Fri, 04 Oct 2024 22:04:59 -0400
permissions: -rw-r--r--
description: fixes
1 ;;; lib/organ/pkg.lisp --- Organ.
2 
3 ;; This package contains a parsing framework for Org Syntax. It
4 ;; loosely follows the org-element.el conventions.
5 
6 ;; Similar to the OG, we divide Org Syntax into two classes: 'objects'
7 ;; and 'elements'. The paragraph is a useful unit of measurement.
8 
9 ;; Elements are syntactic components that exist at the same or greater
10 ;; scope than a paragraph.
11 
12 ;; Objects are syntactic components that exist with a smaller scope
13 ;; than a paragraph. All objects can be contained within a paragraph.
14 
15 ;; Expanding further, 'Lesser' elements are those which cannot contain
16 ;; any other elements. Paragraphs are a lesser element -- they can
17 ;; contain any number of objects, but cannot contain other elements
18 ;; themselves. 'Greater' elements can contain other elements - lesser
19 ;; or greater.
20 
21 ;; Finally we have two high-level classes -- Headings and
22 ;; Sections. Sections contain both lesser and greater elements, and
23 ;; headings contain an optional section and any number of child
24 ;; headings.
25 
26 ;;; Code:
27 (defpackage :organ
28  (:use :cl :cl-ppcre :std :parse/lex :sb-gray)
29  (:import-from :uiop :read-file-string)
30  (:export
31  ;; vars
32  :*org-todo-keyword-types*
33  :*org-todo-keywords*
34  :org-emphasis-alist
35  :org-todo-keyword-map
36  :org-headline-rx
37  :org-file-property-rx
38  :org-todo-keyword-rx
39  :org-property-rx
40  :org-priority-rx
41  :org-property-start-rx
42  :org-logbook-start-rx
43  :org-end-rx
44  :org-scheduled-rx
45  :org-deadline-rx
46  :org-src-block-rx
47  :org-tag-rx
48  :org-object-rx
49  :org-timestamp-rx
50  :org-ts-rx
51  :org-table-any-line-rx
52  :org-table-any-border-rx
53  :org-tblfm-rx
54  :org-footnote-definition-rx
55  :*org-duration-hmm-rx*
56  :*org-duration-hmmss-rx*
57  :*org-duration-full-rx*
58  :*org-duration-mixed-rx*
59  :org-duration-units
60  :org-list-full-item-rx
61  :org-item-rx
62  :org-element-types
63  :org-element-objects
64  ;; proto
65  :org-parse
66  :org-parse-lines
67  :org-create
68  :org-push
69  :org-write
70  :org-contents
71  :org-property
72  :org-get-element
73  :org-insert-before
74  ;; classes
75  :org-element
76  :text
77  :org-document
78  :doc-meta
79  :doc-tree
80  :org-zeroth-section
81  :org-lines
82  :o-lines
83  :org-stream
84  :org-headline
85  :level
86  :props
87  :tags
88  :title
89  :state
90  :org-todo-keyword
91  :todo-type
92  :org-list
93  :org-tag
94  :org-paragraph
95  :org-block
96  :org-node-property
97  :org-file-property
98  :org-todo-keyword-p
99  :org-tag-split
100  ;; obj
101  :org-heading
102  :org-file-properties
103  :org-node-properties
104  :org-block
105  :org-collection
106  ;; util
107  :read-org-string
108  :read-org-file
109  :read-org-lines
110  :read-org-lines-from-string
111 
112  ;; TODO 2024-06-05:
113  :ORG-DIARY-SEXP :ORG-FOOTNOTE-REFERENCE :ORG-CLOCK
114  :ORG-BOLD :ORG-DRAWER :ORG-TABLE-CELL :ORG-CITATION
115  :ORG-ACTIVE-TIMESTAMP :ORG-DESCRIPTIVE-LIST
116  :ORG-EXPORT-SNIPPET :ORG-CITATION-REFERENCE :ORG-TARGET
117  :ORG-STANDARD-TABLE-ROW :ORG-LESSER-BLOCK :ORG-STRIKE-THROUGH
118  :ORG-AFFILIATED-KEYWORD :ORG-PLANNING-LINE
119  :ORG-INLINE-SOURCE-BLOCK :ORG-FOOTNOTE-DEFINITION
120  :ORG-UNORDERED-LIST :ORG-ORDERED-LIST :ORG-CODE
121  :ORG-INACTIVE-TIMESTAMP :ORG-KEYWORD
122  :ORG-INACTIVE-TIMESTAMP-RANGE :ORG-STAT-COOKIE :ORG-MACRO
123  :ORG-RADIO-TARGET :ORG-TABLE :ORG-TABLE-EL :ORG-ITALIC
124  :ORG-LINK :ORG-UNDERLINE :ORG-ENTITY :ORG-RULE-TABLE-ROW
125  :ORG-VERBATIM :ORG-INLINE-BABEL-CALL :ORG-LATEX-ENVIRONMENT
126  :ORG-PRIORITY :ORG-PROPERTY-DRAWER :ORG-PLAIN-TEXT
127  :ORG-LINE-BREAK :ORG-COMMENT :ORG-GREATER-BLOCK
128  :ORG-HORIZONTAL-RULE :ORG-PLANNING
129  :ORG-ACTIVE-TIMESTAMP-RANGE))
130 
131