Open reyman opened 4 years ago
It seems that it's the return value by some specific libraries. Could you pull a request if you need that?
I'm don't know emacs lisp very well, but i could try to modify part of your code.
We could imagine a behavior similar to non system REPL like Python :
The two classical header options of org-mode "output" or "value" are both supported by ob-python
, with behavior dependending on using "session" or "non-session" mode :
Also, in non-session mode, the python code block will be wrapped in a function, so to return a value (in :results value mode) you have to use a return statement. In session mode, the python code is evaluated directly by the interpreter, not in a function context, and the last statement's value will be automatically returned, so you must not use a return statement.
Perhaps i may be wrong on that, but we could imagine very close use case between ob-python and ob-ammonite
Thanks for your work on ob-ammonite :) Is there a way to tune ob-ammonite to only get the last result evaluated using the
:results value
header given by org ?For example this code :
need return like this