Skip to content

Commit 1d1922f

Browse files
authored
Merge pull request #7 from ndw/org-ml
Update references to dependent package om.el
2 parents a540501 + 897d61f commit 1d1922f

File tree

2 files changed

+20
-12
lines changed

2 files changed

+20
-12
lines changed

README.org

+6
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ The goal is a complete and accurate translation of the internal
99
especially pretty, but the assumption is that downstream XML
1010
processing tools can be used to transform it.
1111

12+
* What’s new?
13+
14+
** 04 August 2020
15+
+ Renamed default branch to ~main~.
16+
+ Updated dependency (the ~om.el~ package was renamed ~org-ml~)
17+
1218
* om-to-xml
1319

1420
This projects started began with [[*org-to-xml (obsolete)][org-to-xml]], but development stalled

om-to-xml.el

+14-12
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
;; Copyright © 2020 Norman Walsh
44

55
;; Author: Norman Walsh <ndw at nwalsh dot com>
6-
;; Keywords: org-mode, om, XML
6+
;; Keywords: org-mode, org-ml, XML
77

88
;; This file is not part of GNU Emacs.
99

@@ -22,16 +22,16 @@
2222

2323
;;; Prerequisites:
2424

25-
;; om: https://github.com/ndwarshuis/om.el
25+
;; org-ml: https://github.com/ndwarshuis/org-ml
2626

2727
;;; Commentary:
2828

2929
;; 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.
3535

3636
;; In addition to better parsing, `om-to-xml.el` provides a few
3737
;; extensibility options:
@@ -85,14 +85,16 @@
8585
;; standard about my binding.
8686
;;
8787
;; 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
8991

9092
;;; Code:
9193

9294
(require 'org)
93-
(require 'om)
95+
(require 'org-ml)
9496

95-
(defconst om-to-xml--om-to-xml-version "0.0.1")
97+
(defconst om-to-xml--om-to-xml-version "0.0.7")
9698
(defconst om-to-xml--om-to-xml-uri "https://github.com/ndw/org-to-xml")
9799
(defconst om-to-xml--namespace "https://nwalsh.com/ns/org-to-xml")
98100

@@ -197,7 +199,7 @@ If no FILENAME is given, the buffer filename will be used, with
197199
(om-list '())
198200
(elem nil))
199201
(while (< om-point (point-max))
200-
(setq elem (om-parse-element-at om-point))
202+
(setq elem (org-ml-parse-element-at om-point))
201203
(setq parent (plist-get (cadr elem) :parent))
202204
(setq om-point (plist-get (cadr elem) :end))
203205
;; 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
206208
;; :end doesn't advance the cursor position and this
207209
;; while loop never ends. To avoid that, we use last-point
208210
;; to force the cursor to advance.
209-
;; https://github.com/ndwarshuis/om.el/issues/8
211+
;; https://github.com/ndwarshuis/org-ml/issues/8
210212
(if (<= om-point last-point)
211213
(setq om-point (1+ last-point))
212214
(setq om-list (append om-list (list elem))))

0 commit comments

Comments
 (0)