Re: [O] Problem with J Source Code Blocks in Org Mode

2017-12-12 Thread Bill Harris
Nicolas,

Thanks for the idea.  It turns out I also got a suggestion on the J General
list, and that one worked.  See
http://jsoftware.com/pipermail/general/2017-December/037375.html.

Bill


Re: [O] Problem with J Source Code Blocks in Org Mode

2017-12-11 Thread Nicolas Goaziou
Hello,

Bill Harris  writes:

> 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".

I am not usuing ob-J but maybe a full backtrace would help. Make sure to
run Org uncompiled before.

Regards,

-- 
Nicolas Goaziou



[O] Problem with J Source Code Blocks in Org Mode

2017-12-10 Thread Bill Harris
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