My personal patches-in-progress branch of Org. See https://git.tecosaur.net/mirrors/org-mode/compare/main..tec/org-mode:dev.
Go to file
Ian Martins 6edfc2b57c ob-java.el: Add support for variables, return values, tramp
* lisp/ob-java.el: Add support for variables and return values.  Write
tempfiles to the `org-babel-temporary-directory'.  Make package,
class, and main method definitions optional.

* testing/lisp/test-ob-java.el: Add tests.

ob-java was missing features common to many other org-babel
implementations, such as the ability to accept variables and return a
value. This brings those features to ob-java, making the experience
more consistent across org-babel languages, and expanding the ways
java source blocks interact with org mode buffers.

A simple java program requires boilerplate code to declare a class and
main method.  This boilerplate code makes java source blocks more
tedious to write and more effort to read.  This is more evident in an
org buffer where there may be many small source blocks.  This change
makes that code optional.  If it is not provided, the source block
will be wrapped in the boilerplate code just before compilation.

Most org babel implementation write temporary files to the
`org-babel-temporary-directory'.  That avoids polluting the current
directory and provides built-in support for tramp.  ob-java would
write source files and binaries to the directory containing the org
file by default.  This may be unexpected and unwanted, and didn't work
with tramp.  This change writes all tempfiles to the
`org-babel-temporary-directory'.

Executing an ob-java source block would always try to compile and run
the code in the source block, so a source block that wasn't
runnable (didn't contain a main method) would error during run.  This
change adds a generic main method just before compilation if one isn't
included in the source block so that the run will succeed.

There were no tests for ob-java.  This adds tests.
2020-10-25 15:24:08 -04:00
contrib Address org-eldoc-recursion issue 2020-09-20 21:24:55 -04:00
doc lisp/ob-core.el: Allow passing empty vector to :file-desc to omit description 2020-10-06 23:13:12 -04:00
etc lisp/ob-core.el: Allow passing empty vector to :file-desc to omit description 2020-10-06 23:13:12 -04:00
lisp ob-java.el: Add support for variables, return values, tramp 2020-10-25 15:24:08 -04:00
mk Fix typos 2020-05-13 23:27:49 -04:00
testing ob-java.el: Add support for variables, return values, tramp 2020-10-25 15:24:08 -04: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
CONTRIBUTE CONTRIBUTE: Fix "maintenance" typos 2020-05-13 23:35:40 -04: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 README: Add a link to the license 2020-01-27 17:03:33 +01:00
README_ELPA Use https for links to orgmode.org 2018-01-19 18:14:58 +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

README

-*- mode: org; fill-column:70 -*-

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

Check the [[https://orgmode.org][homepage of Org]] and the [[https://orgmode.org/org.html#Installation][installations instructions]].

* Contents of this distribution

- README :: This file.

- COPYING :: The GNU General Public License.

- Makefile :: The makefile to compile and install Org.  For installation
  instructions, see the manual or [[https://orgmode.org/worg/dev/org-build-system.html][the more detailed procedure on Worg]].
  
- 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.

* License

Org-mode is published under [[https://www.gnu.org/licenses/gpl-3.0.html][the GNU GPLv3 license]] or any later
version, the same as GNU Emacs.  See the COPYING file in this
directory.