My personal patches-in-progress branch of Org. See https://git.tecosaur.net/mirrors/org-mode/compare/main..tec/org-mode:dev.
Find a file
Kovacsics Robert be8e68be0b ob-ocaml: Support for pretty-printed outputs
* lisp/ob-ocaml.el (org-babel-execute:ocaml): Support for
pretty-printed outputs.

E.g. the following snippet produces multiple lines of output, due to
pretty-printing

 #+BEGIN_SRC ocaml :exports code :eval no-export :results verbatim
(* Note, no need to have parentheses around sqrt, as
application binds the tightest *)
let rec gamma n = if n = 0
                  then (1.0 +. sqrt 5.0) /. 2.0
                  else 1.0 /. (gamma (n-1) -. 1.0)

let nums = List.map gamma (List.init 5 (fun x -> x))
 #+END_SRC

 #+NAME: gamma-tbl
 #+RESULTS[1fd6a3e846afdef51350eb6d7ba15c6844ccc14e]:
: val gamma : int -> float = <fun>
: val nums : float list =
:   [1.6180339887498949; 1.61803398874989468; 1.61803398874989535;
:    1.61803398874989357; 1.61803398874989823]

(In reality this would have 50 or so outputs, point being mathematically
it shouldn't change, but due to floating point errors it does.)

The regexp has the following problems:

- The "." in group 5 (as-was) doesn't match new-lines, so it only
  matches the first line, e.g. as a list
  : - [1.6180339887498949, 1.61803398874989468, 1.61803398874989535,

- When using "\\(.\\|\n\\)", it includes the starting indentation of the
  list, which makes org-babel-script-escape choke (called from
  org-babel-ocaml-read-list, from org-babel-ocaml-parse-output, from
  org-babel-execute:ocaml, the code being modified.

TINYCHANGE
2019-10-13 09:44:54 +02:00
contrib Merge branch 'maint' 2019-07-16 15:24:50 +02:00
doc org-manual: Document Help links 2019-10-13 09:41:30 +02:00
etc ox-icalendar: Allow ignoring done scheduled or deadlines tasks 2019-09-05 21:54:50 +02:00
lisp ob-ocaml: Support for pretty-printed outputs 2019-10-13 09:44:54 +02:00
mk Add org-guide.org to the build process 2019-03-19 02:25:18 +01:00
testing Fix problems with org-attach-git, failed tests 2019-09-08 14:43:46 +02:00
.dir-locals.el Remove non-existing variable in .dir-locals 2019-02-14 00:05:00 +01:00
.gitignore Ignore orgguide spawns 2019-03-19 02:25:18 +01:00
.gitmodules updated jump submodule for those behind http proxy 2013-06-06 14:36:24 -06:00
COPYING Add COPYING and fix other related issues. 2012-09-24 19:15:42 +02:00
Makefile Use https for links to orgmode.org 2018-01-19 18:14:58 +01:00
README Fix typos in README 2018-01-14 17:46:14 +01:00
README_contribute README_contribute: don't mention repo.or.cz mirror 2018-02-27 08:36:13 +01:00
README_ELPA Use https for links to orgmode.org 2018-01-19 18:14:58 +01:00
README_git Use https for links to orgmode.org 2018-01-19 18:14:58 +01:00
README_maintainer README_maintainer: minor tweaks 2018-02-26 09:18:19 +01:00
request-assign-future.txt request-assign-future.txt: Use "Emacs" instead of "Org-mode, which is part of Emacs" 2014-02-07 09:24:52 +01:00

This is a distribution of Org, a plain text notes and project planning
tool for Emacs.

The homepage of Org is at:
  https://orgmode.org

The installations instructions are at:
  https://orgmode.org/org.html#Installation

This distribution contains:

README
    This file.

COPYING
    The GNU General Public License.

Makefile
    The makefile to compile and install Org.  For installation
    instructions, see the manual or the more detailed procedure
    on Worg: https://orgmode.org/worg/dev/org-build-system.html

mk/
    Files needed for building Org.

lisp/
    Directory with all the Emacs Lisp files that make up Org.

doc/
    The documentation files.  org.texi is the source of the
    documentation, org.html and org.pdf are formatted versions of it.

contrib/
    A directory with third-party additions for Org.  Some really cool
    stuff is in there.

etc/
    Files needed for the ODT exporter.

testing/
    Testing suite for Org.

request-assign-future.txt
    The form that contributors have to sign and get processed with
    the FSF before contributed changes can be integrated into the Org
    core.  All files in this distribution except the contrib/ directory
    have copyright assigned to the FSF.