emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Problem with J Source Code Blocks in Org Mode
@ 2017-12-11  0:08 Bill Harris
  2017-12-12  7:46 ` Nicolas Goaziou
  0 siblings, 1 reply; 3+ messages in thread
From: Bill Harris @ 2017-12-11  0:08 UTC (permalink / raw)
  To: emacs-orgmode

[-- 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 --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Problem with J Source Code Blocks in Org Mode
  2017-12-11  0:08 Problem with J Source Code Blocks in Org Mode Bill Harris
@ 2017-12-12  7:46 ` Nicolas Goaziou
  0 siblings, 0 replies; 3+ messages in thread
From: Nicolas Goaziou @ 2017-12-12  7:46 UTC (permalink / raw)
  To: Bill Harris; +Cc: emacs-orgmode

Hello,

Bill Harris <bill_harris@facilitatedsystems.com> 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Problem with J Source Code Blocks in Org Mode
@ 2017-12-13  3:18 Bill Harris
  0 siblings, 0 replies; 3+ messages in thread
From: Bill Harris @ 2017-12-13  3:18 UTC (permalink / raw)
  To: emacs-orgmode

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

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

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-12-13  3:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-11  0:08 Problem with J Source Code Blocks in Org Mode Bill Harris
2017-12-12  7:46 ` Nicolas Goaziou
  -- strict thread matches above, loose matches on Subject: below --
2017-12-13  3:18 Bill Harris

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