emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bill Harris <bill_harris@facilitatedsystems.com>
To: emacs-orgmode@gnu.org
Subject: Problem with J Source Code Blocks in Org Mode
Date: Sun, 10 Dec 2017 16:08:19 -0800	[thread overview]
Message-ID: <CAOBquGrxqjTqj9ULkMW6CNApZTHxj7wmNX6Yg3NfLZC+gJG_rg@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1397 bytes --]

I recently tried to set up J as described in http://orgmode.org/worg/
org-contrib/babel/languages/ob-doc-J.html, starting by loading j-mode from
stable melpa, but I get an org-babel error output when I try to execute a J
source code block: "/bin/bash: jconsole: command not found".

That makes it sound as if orgmode requires something besides setting
j-console-cmd, which I had done:

 -console-cmd is a variable defined in ‘j-console.el’.
Its value is "ijconsole"
Original value was "jconsole"

Documentation:
Name of the executable used for the J REPL session

You can customize this variable.

Looking at ob-J.el, I see

(defcustom org-babel-J-command "jconsole"
  "Command to call J."
  :group 'org-babel
  :version "26.1"
  :package-version '(Org . "9.0")
  :type 'string)

and

(defun org-babel-J-eval-string (str)
  "Sends STR to the `j-console-cmd' session and executes it."
  (let ((session (j-console-ensure-session)))
    (with-current-buffer (process-buffer session)
      (goto-char (point-max))
      (insert (format "\n%s\n" str))
      (let ((beg (point)))
(comint-send-input)
(sit-for .1)
(buffer-substring-no-properties
beg (point-max))))))

Tips?

Thanks,

Bill

PS: I'm running Emacs v25.1.1 and org mode 9.1.3.  There's a bit more info
at http://jsoftware.com/pipermail/general/2017-December/037363.html.
-- 
Bill Harris

[-- Attachment #2: Type: text/html, Size: 2510 bytes --]

             reply	other threads:[~2017-12-11  0:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-11  0:08 Bill Harris [this message]
2017-12-12  7:46 ` Problem with J Source Code Blocks in Org Mode Nicolas Goaziou
  -- strict thread matches above, loose matches on Subject: below --
2017-12-13  3:18 Bill Harris

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAOBquGrxqjTqj9ULkMW6CNApZTHxj7wmNX6Yg3NfLZC+gJG_rg@mail.gmail.com \
    --to=bill_harris@facilitatedsystems.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).