emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Timothy <tecosaur@gmail.com>
To: emacs-orgmode@gnu.org
Subject: [ANN] An Org parser for Julia
Date: Thu, 02 Dec 2021 17:06:27 +0800	[thread overview]
Message-ID: <87o85zpdi8.fsf@gmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 1774 bytes --]

Hi Everyone,

I’ve gone heavily into Julia over the past year, and I recently
thought it would be nice if an Org parser existed for it — so I made one!

<file:~/.julia/dev/OrgMode/org-mode-wordart-small.png>
<https://github.com/tecosaur/OrgMode.jl>

It’s just over a week since I started, so it’s fairly young, but I’m pretty
happy with the way it’s shaping up 🙂. To give you an idea, here’s some example
usage from the readme:

┌────
│ text1 = org"Some *Org* markup, written with easy using the ~org\"\"~ macro."
│ parsetree(text1)  # show the generated parse tree
│ 
│ text2 = parse(Org, "Some *Org* markup, written with easy using the ~parse~ function.")
│ diff(text1, text2)  # show the components of the parse trees that differ
│ 
│ dochead = @doc OrgMode.Heading  # the documentation for the Heading component (::Org)
│ org(dochead)  # generate Org text that produces the OrgMode.Heading object
│ string(dochead)  # as above, but produces a String
│ 
│ parse(Org, string(dochead)) == dochead  # round-trip equality
│ 
│ filtermap(dochead, [OrgMode.SourceBlock], s -> s.lang)  # get the lang of each source block
└────

There’s also a bit of an ulterior motive here, I’ve been rather interested in
the Org syntax and how easy it is to write tools for it outside of Emacs, and
I’ve been thinking that writing a parser would be a great way to find out and
allow me to make some more informed comments on
<https://orgmode.org/worg/dev/org-syntax.html>, hopefully pushing it just a bit
closer to having “(draft)” lopped off the title 😛.

You can expect to see another email from me with some comments the Org Syntax
document shortly.

All the best,
Timothy

[-- Attachment #1.2.1: Type: text/html, Size: 6668 bytes --]

[-- Attachment #1.2.2: org-mode-wordart-small.png --]
[-- Type: image/png, Size: 11644 bytes --]

             reply	other threads:[~2021-12-02  9:23 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-02  9:06 Timothy [this message]
2021-12-02 10:11 ` [ANN] An Org parser for Julia Ihor Radchenko
2021-12-02 10:30   ` Timothy
2021-12-02 11:13     ` Ihor Radchenko
2021-12-02 11:20       ` Timothy
2021-12-02 12:07         ` Ihor Radchenko
2021-12-02 12:11           ` Timothy
2021-12-02 12:18 ` Eric S Fraga
2021-12-02 14:04   ` Timothy
2021-12-02 15:56     ` Eric S Fraga
2022-09-25  8:02 ` Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o85zpdi8.fsf@gmail.com \
    --to=tecosaur@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).