Hi Eric,
Eric Schulte writes:
> This should work in a recent Emacs.
>
> (require 'json)
> (defun org-as-json-to-file (&optional path)
> "Export the current Org-mode buffer as JSON to the supplied PATH."
> (interactive "Fwrite to file: ")
> (let ((tree (org-element-parse
This should work in a recent Emacs.
(require 'json)
(defun org-as-json-to-file (&optional path)
"Export the current Org-mode buffer as JSON to the supplied PATH."
(interactive "Fwrite to file: ")
(let ((tree (org-element-parse-buffer)))
(org-element-map tree
Hello,
Brett Viren writes:
> However this method only works for a very simple org document. I'm
> successfully filtering out the :parent properties of (most of) the
> elements but as soon as my document produces a plain text element like:
>
> #("Text" 0 4 (:parent #1))
>
> then two problems o
Matt Price writes:
> I am pretty ignorant and may have missed a referene o this in the
> thread, but this (very outdated) code is on the emacswiki:
>
> http://www.emacswiki.org/emacs/org-json.el
Thanks. My searches didn't find this. It looks like this is parsing
the org buffer directly and onl
Hi,
Nicolas Goaziou writes:
> You can walk the tree, e.g. with `org-element-map', and remove
> all :parent references if you don't need them.
I figured out how to follow this advice. I can even make valid JSON
From the filtered parse tree by handing it to Edward O'Conner's
json.el (link in exa
I tried this code but I get a JSON readtable error even with the examples
in the code.
John
---
John Kitchin
Associate Professor
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
http://kitchingroup.c
On Thu, Dec 12, 2013 at 2:50 PM, Aaron Ecay wrote:
> 2013ko abenudak 12an, John Kitchin-ek idatzi zuen:
>>
>> I wouldn't hold your breath waiting for my solution, it's currently a
>> constructive procrastination project to see if it is possible ;)
>>
>> I made this:
>>
>> https://github.com/jkitch
2013ko abenudak 12an, John Kitchin-ek idatzi zuen:
>
> I wouldn't hold your breath waiting for my solution, it's currently a
> constructive procrastination project to see if it is possible ;)
>
> I made this:
>
> https://github.com/jkitchin/jmax/blob/prelude/ox-json.el
>
> which does give some outp
Here's a quick shot at using Common Lisp's cl-json package as a bridge
between Emacs-lisp and JSON. The Org-mode file with necessary the code
is attached (it requires a running lisp process w/cl-json loaded), as
well as it's json conversion.
#+Title: Org to JSON
Use Common Lisp as a bridge betwe
I wouldn't hold your breath waiting for my solution, it's currently a
constructive procrastination project to see if it is possible ;)
I made this:
https://github.com/jkitchin/jmax/blob/prelude/ox-json.el
which does give some output that vaguely resembles json for a very simple
org-file (no quot
Hi John,
John Kitchin writes:
> that sounds like an interesting approach. xml seems like what you
> really want, since looking at the parsetree there is a lot of
> information (e.g. attributes, properties, etc...) that would be tricky
> to generate a fully representative json scheme.
I see fro
Hello,
Brett Viren writes:
> Eric Schulte writes:
>
>> You can use `org-element-parse-buffer' to convert an Emacs Buffer to a
>> structured Emacs Lisp object. At that point you can use existing tools
>> for converting lisp to JSON or YAML. I've used cl-json for Common Lisp,
>> I would imagine
Eric Schulte writes:
> You can use `org-element-parse-buffer' to convert an Emacs Buffer to a
> structured Emacs Lisp object. At that point you can use existing tools
> for converting lisp to JSON or YAML. I've used cl-json for Common Lisp,
> I would imagine something similar exists for Emacs L
that sounds like an interesting approach. xml seems like what you really
want, since looking at the parsetree there is a lot of information (e.g.
attributes, properties, etc...) that would be tricky to generate a fully
representative json scheme.
This page suggests at the bottom you could export t
Brett Viren writes:
> Has anyone written any new-style exporter which will produce a common
> markup/data language format like JSON or YAML? I'm looking for
> something that fully preserves the original org document structure and
> does no semantic interpretation along the way.
>
> What I really
Has anyone written any new-style exporter which will produce a common
markup/data language format like JSON or YAML? I'm looking for
something that fully preserves the original org document structure and
does no semantic interpretation along the way.
What I really want is to parse arbitrary org f
16 matches
Mail list logo