From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ken Mankoff Subject: Re: JShell support in Babel? Date: Tue, 15 Oct 2019 13:28:34 +0200 Message-ID: <87sgnub63h.fsf@gmail.com> References: <87imoqz2um.fsf@iki.fi> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:56950) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iKL0K-0004H3-Dm for emacs-orgmode@gnu.org; Tue, 15 Oct 2019 07:28:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iKL0J-0005oO-Cb for emacs-orgmode@gnu.org; Tue, 15 Oct 2019 07:28:40 -0400 Received: from mail-lj1-x230.google.com ([2a00:1450:4864:20::230]:42603) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iKL0J-0005me-5G for emacs-orgmode@gnu.org; Tue, 15 Oct 2019 07:28:39 -0400 Received: by mail-lj1-x230.google.com with SMTP id y23so19814083lje.9 for ; Tue, 15 Oct 2019 04:28:37 -0700 (PDT) In-reply-to: <87imoqz2um.fsf@iki.fi> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Jarmo Hurri Cc: emacs-orgmode@gnu.org On 2019-10-15 at 13:04 +02, Jarmo Hurri wrote... > JShell is a pretty nifty tool for exploring and demonstrating basic Java > features. Has anyone happened to write support for it in Babel? You can start working with it even without official Babel support: #+BEGIN_SRC bash :results verbatim jshell int a[] = {0,1,3,5,8} a a[3] = 42 a "" #+END_SRC #+RESULTS: #+begin_example | Welcome to JShell -- Version 11.0.4 | For an introduction type: /help intro jshell> int a[] = {0,1,3,5,8} a ==> int[5] { 0, 1, 3, 5, 8 } jshell> a a ==> int[5] { 0, 1, 3, 5, 8 } jshell> a[3] = 42 $3 ==> 42 jshell> a a ==> int[5] { 0, 1, 3, 42, 8 } jshell> jshell> "" #+end_example The last line doesn't P (from REPL) until I added the "". You can probably find a more elegant solution using :post. -k.