Re: [O] mlorg : yet another parser for org-mode (Written in OCaml contained in org-mode files)
Simon Castellan writes: > For now I am rebasing my parser on your categories (I must say I was > lacking a lot). Please let me know when you change your syntaxic > categories (by change you mean additions only or removals as well ?). I have a couple additions in mind: I'd like to refine table parsing. I'll probably add "table-row" and "table-cell" elements. I'd like to introduce a new type of drawers too, but that's another story. There's no removal in sight, though. I'll keep you informed on changes in that area. > I will try in my sources to document meanings and (very) informal > syntax of handled constructions. This could be a starter for the complete document to come. > Besides, what are "export snippets" ? I can't find a reference to it > in the manual. They're an experimental syntax I introduced to replace and generalize HTML tags (@). They are, more or less, the inline counterpart of export blocks. For example, one should be able to use @html{}, but also @latex{\hfill{}}, etc. and back-ends filter out all but one category. Regards, -- Nicolas Goaziou
Re: [O] mlorg : yet another parser for org-mode (Written in OCaml contained in org-mode files)
Hello, Thanks for your answer. I think indeed that a description of org's syntax would be better in a separate document. For now I am rebasing my parser on your categories (I must say I was lacking a lot). Please let me know when you change your syntaxic categories (by change you mean additions only or removals as well ?). I will try in my sources to document meanings and (very) informal syntax of handled constructions. Besides, what are "export snippets" ? I can't find a reference to it in the manual. Simon
Re: [O] mlorg : yet another parser for org-mode (Written in OCaml contained in org-mode files)
Hello, Simon Castellan writes: > Thank you very much for this pointer, This is what I was looking for : > a list of syntaxic construction in org-mode. I'd say though that it > lacks a more-or-less formal syntaxic definition of constructions. It lacks that, indeed, among many other things. On the other hand, it's a work in progress, so I guess that explains why. I had postponed such a definition of constructions, since the model used to describe the Org format wasn't (and still isn't) complete. Actually, the list that you can observe in org-element.el will change a little during the next few weeks. Anyway, I agree that a document formally describing each element/object in Org has to be written at some point. Even if I think it's one or two months too early for that task, I'll gladly offer my help if you decide to undertake it nonetheless. Do not hesitate to ask if you need more information. Regards, -- Nicolas Goaziou
Re: [O] mlorg : yet another parser for org-mode (Written in OCaml contained in org-mode files)
On lun. 27/févr. (09:52), Eric Schulte wrote: > Simon Castellan writes: > > > On lun. 27/févr. (15:27), Alan Schmitt wrote: > >> On 26 févr. 2012, at 17:41, Simon Castellan wrote: > >> > >> > I have been writing a parser for mlorg files in OCaml. This started as an > >> > experiment to see if the literate programming mode of org-mode could > >> > scale to a > >> > full application (among other things). > >> > >> This looks very interesting, and would very much help in the > >> dissemination of org-mode. Have you thought of announcing it on the > >> caml mailing list? > >> > >> Alan > > > > I have but prefer to wait mlorg to be more complete. This post was meant > > mainly > > to gather info/document about org's syntax. (But as I said feedbacks > > welcome.) > > > > Hi Simon, > > Nicolas Goaziou has been working recently on a new emacs-lisp parser of > Org-mode files, with the goals of > 1. standardizing the formal syntax of Org-mode files > 2. parsing Org-mode files to a canonical emacs-lisp list-based >representation in memory (like an Org-mode AST) > 3. re-basing the existing Org-mode exporters off of this canonical >representation > > This work is contained in contrib/lisp/org-element.el, which includes a > large amount of useful commentary at the top of the file. This should > serve as a starting point for learning more about the formal syntax of > Org-mode files (as it is defined). I think that developing parsers for > this syntax in multiple language should be very useful to ensure that a > usable syntax is developed separate from any particular implementation. > > Cheers, > Thank you very much for this pointer, This is what I was looking for : a list of syntaxic construction in org-mode. I'd say though that it lacks a more-or-less formal syntaxic definition of constructions. Simon.
Re: [O] mlorg : yet another parser for org-mode (Written in OCaml contained in org-mode files)
Simon Castellan writes: > On lun. 27/févr. (15:27), Alan Schmitt wrote: >> On 26 févr. 2012, at 17:41, Simon Castellan wrote: >> >> > I have been writing a parser for mlorg files in OCaml. This started as an >> > experiment to see if the literate programming mode of org-mode could scale >> > to a >> > full application (among other things). >> >> This looks very interesting, and would very much help in the >> dissemination of org-mode. Have you thought of announcing it on the >> caml mailing list? >> >> Alan > > I have but prefer to wait mlorg to be more complete. This post was meant > mainly > to gather info/document about org's syntax. (But as I said feedbacks welcome.) > Hi Simon, Nicolas Goaziou has been working recently on a new emacs-lisp parser of Org-mode files, with the goals of 1. standardizing the formal syntax of Org-mode files 2. parsing Org-mode files to a canonical emacs-lisp list-based representation in memory (like an Org-mode AST) 3. re-basing the existing Org-mode exporters off of this canonical representation This work is contained in contrib/lisp/org-element.el, which includes a large amount of useful commentary at the top of the file. This should serve as a starting point for learning more about the formal syntax of Org-mode files (as it is defined). I think that developing parsers for this syntax in multiple language should be very useful to ensure that a usable syntax is developed separate from any particular implementation. Cheers, > > Simon. > -- Eric Schulte http://cs.unm.edu/~eschulte/
Re: [O] mlorg : yet another parser for org-mode (Written in OCaml contained in org-mode files)
On lun. 27/févr. (15:27), Alan Schmitt wrote: > On 26 févr. 2012, at 17:41, Simon Castellan wrote: > > > I have been writing a parser for mlorg files in OCaml. This started as an > > experiment to see if the literate programming mode of org-mode could scale > > to a > > full application (among other things). > > This looks very interesting, and would very much help in the dissemination of > org-mode. Have you thought of announcing it on the caml mailing list? > > Alan I have but prefer to wait mlorg to be more complete. This post was meant mainly to gather info/document about org's syntax. (But as I said feedbacks welcome.) Simon.
Re: [O] mlorg : yet another parser for org-mode (Written in OCaml contained in org-mode files)
On 26 févr. 2012, at 17:41, Simon Castellan wrote: > I have been writing a parser for mlorg files in OCaml. This started as an > experiment to see if the literate programming mode of org-mode could scale to > a > full application (among other things). This looks very interesting, and would very much help in the dissemination of org-mode. Have you thought of announcing it on the caml mailing list? Alan
[O] mlorg : yet another parser for org-mode (Written in OCaml contained in org-mode files)
Hello, I have been writing a parser for mlorg files in OCaml. This started as an experiment to see if the literate programming mode of org-mode could scale to a full application (among other things). The project is at its beginning but can « bootstrap » itself (that is parses its own source and extract the source code), yet the support for the syntax is very far from being complete. The goal is also to be able to convert org-mode files to latex/html/... without having the dependancy on emacs. Indeed although org-mode files are just plain text, there is still a feeling of being locked because this is such a complicated format and that there doesn't seem to be a reference library to deal with this. I hope that more libraries to do so will appear for one main reason : to have a standard syntax we can build upon : I think that to know precisely the syntax understood by org-mode is very difficult : no document about this exists (Or I have found none). When I'm done with the main syntaxic part I will try to document them. Besides, I think org-mode is wonderful editor but does a terrible job at exporting : slow, emacs-specific, strange errors on some document, ... The code can be found on gitorious: http://gitorious.org/mlorg/mlorg For those who would like to compile, you will need the batteries library from git (hope it will be released before mlorg has reached a releasable state). An example of cool feature that I have added in mlorg and that should be the org-mode exporter : org-mode doesn't put location annotations (à la cpp) so that compilers know how to report correct line numbers. This is very helpful when compiling quite long files. The point of this message is mainly to attract people interested in testing or even contributing. (I will be very glad : there is so much to do). But I hope to make the org-mode community think about a standardization process of the syntax used in org-mode to ease the work of parsers mainteners. There is no README yet, but the mlorg binary doesn't do much yet and the code should be self-documented (I hope so). Simon.