3
3
; ; Copyright © 2020 Norman Walsh
4
4
5
5
; ; Author: Norman Walsh <ndw at nwalsh dot com>
6
- ; ; Keywords: org-mode, om , XML
6
+ ; ; Keywords: org-mode, org-ml , XML
7
7
8
8
; ; This file is not part of GNU Emacs.
9
9
22
22
23
23
; ;; Prerequisites:
24
24
25
- ; ; om : https://github.com/ndwarshuis/om.el
25
+ ; ; org-ml : https://github.com/ndwarshuis/org-ml
26
26
27
27
; ;; Commentary:
28
28
29
29
; ; This file converts an org-mode file to XML. It is a significant
30
- ; ; improvement over `org-to-xml.el`, also part of this package, in
31
- ; ; that it uses the excellent `om ` library by Nate Dwarshuis to parse
32
- ; ; the Org data structures. I more-or-less abandoned attempting to
33
- ; ; improve `org-to-xml.el` at the point where I realized I needed a
34
- ; ; better parsing library for Org.
30
+ ; ; improvement over `org-to-xml.el`, previously package, in that it
31
+ ; ; uses the excellent `org-ml ` library by Nate Dwarshuis to parse the
32
+ ; ; Org data structures. I more-or-less abandoned attempting to improve
33
+ ; ; `org-to-xml.el` at the point where I realized I needed a better
34
+ ; ; parsing library for Org.
35
35
36
36
; ; In addition to better parsing, `om-to-xml.el` provides a few
37
37
; ; extensibility options:
85
85
; ; standard about my binding.
86
86
; ;
87
87
; ; Change log:
88
- ; ; v0.0.1: initial release
88
+ ; ; v0.0.7: Updated to use org-ml (the om.el refactored)
89
+ ; ; ...
90
+ ; ; v0.0.1: Initial release
89
91
90
92
; ;; Code:
91
93
92
94
(require 'org )
93
- (require 'om )
95
+ (require 'org-ml )
94
96
95
- (defconst om-to-xml--om-to-xml-version " 0.0.1 " )
97
+ (defconst om-to-xml--om-to-xml-version " 0.0.7 " )
96
98
(defconst om-to-xml--om-to-xml-uri " https://github.com/ndw/org-to-xml" )
97
99
(defconst om-to-xml--namespace " https://nwalsh.com/ns/org-to-xml" )
98
100
@@ -197,7 +199,7 @@ If no FILENAME is given, the buffer filename will be used, with
197
199
(om-list '())
198
200
(elem nil ))
199
201
(while (< om-point (point-max ))
200
- (setq elem (om -parse-element-at om-point))
202
+ (setq elem (org-ml -parse-element-at om-point))
201
203
(setq parent (plist-get (cadr elem) :parent ))
202
204
(setq om-point (plist-get (cadr elem) :end ))
203
205
; ; There are places where parsing seems to get stuck.
@@ -206,7 +208,7 @@ If no FILENAME is given, the buffer filename will be used, with
206
208
; ; :end doesn't advance the cursor position and this
207
209
; ; while loop never ends. To avoid that, we use last-point
208
210
; ; to force the cursor to advance.
209
- ; ; https://github.com/ndwarshuis/om.el /issues/8
211
+ ; ; https://github.com/ndwarshuis/org-ml /issues/8
210
212
(if (<= om-point last-point)
211
213
(setq om-point (1+ last-point))
212
214
(setq om-list (append om-list (list elem))))
0 commit comments