emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [babel] java headless support is missing for most graphing languages
@ 2012-05-18  0:55 Mikhail Titov
  2012-05-19  7:51 ` Bastien
  0 siblings, 1 reply; 7+ messages in thread
From: Mikhail Titov @ 2012-05-18  0:55 UTC (permalink / raw)
  To: emacs-orgmode

Hello!

I’ve noticed that at least ditaa and plantuml fail to evaluate with babel.

While for ditaa I can override :java list item with something like

(setq org-babel-default-header-args:ditaa
  '((:results . "file")
    (:exports . "results")
    (:java . "-Dfile.encoding=UTF-8 -Djava.awt.headless=true")))

However plantuml is handling differently. Curiously enough it runs just fine without stdin/stdout redirection from the command line. However if I tried to use input/output redirection like in ob-plantuml.el , it complains like the following:  Exception in thread "main" java.lang.InternalError: Can't connect to window server - not enough permissions.

I propose to add by default “-Djava.awt.headless=true” to all “language” handlers supported by org-babel. I think it won’t hurt and will make working from CLI more enjoyable out of box.

Mikhail

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

* Re: [babel] java headless support is missing for most graphing languages
  2012-05-18  0:55 [babel] java headless support is missing for most graphing languages Mikhail Titov
@ 2012-05-19  7:51 ` Bastien
  2012-05-20  0:17   ` Mikhail Titov
  0 siblings, 1 reply; 7+ messages in thread
From: Bastien @ 2012-05-19  7:51 UTC (permalink / raw)
  To: Mikhail Titov; +Cc: emacs-orgmode

Hi Mikhail,

"Mikhail Titov" <mlt@gmx.us> writes:

> I’ve noticed that at least ditaa and plantuml fail to evaluate with
> babel.

What version of Org are you using?

-- 
 Bastien

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

* Re: [babel] java headless support is missing for most graphing languages
  2012-05-20  0:17   ` Mikhail Titov
@ 2012-05-19 22:41     ` Eric Schulte
  2012-05-20  1:53       ` Mikhail Titov
  0 siblings, 1 reply; 7+ messages in thread
From: Eric Schulte @ 2012-05-19 22:41 UTC (permalink / raw)
  To: Mikhail Titov; +Cc: Bastien, emacs-orgmode

Mikhail Titov <mlt@gmx.us> writes:

> On 05/19/2012 02:51 AM, Bastien wrote:
>>> I’ve noticed that at least ditaa and plantuml fail to evaluate with
>>> babel.
>> What version of Org are you using?
> Hello, Bastien!
>
> It is 7.8.09 from default emacs 24.1.50.2 (revno: 108254). I have no X11
> server running.
>

If I understand correctly you were able to execute successfully after
adjusting your ditaa header arguments.  Is that correct?

If so then I believe ob-ditaa should be left as is, given that it works
for most cases out of the box, and that you were able to easily adjust
it to work without an X server.

Best,

-- 
Eric Schulte
http://cs.unm.edu/~eschulte

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

* Re: [babel] java headless support is missing for most graphing languages
  2012-05-19  7:51 ` Bastien
@ 2012-05-20  0:17   ` Mikhail Titov
  2012-05-19 22:41     ` Eric Schulte
  0 siblings, 1 reply; 7+ messages in thread
From: Mikhail Titov @ 2012-05-20  0:17 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode

On 05/19/2012 02:51 AM, Bastien wrote:
>> I’ve noticed that at least ditaa and plantuml fail to evaluate with
>> babel.
> What version of Org are you using?
Hello, Bastien!

It is 7.8.09 from default emacs 24.1.50.2 (revno: 108254). I have no X11
server running.

M.

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

* Re: [babel] java headless support is missing for most graphing languages
  2012-05-20  1:53       ` Mikhail Titov
@ 2012-05-20  0:39         ` Eric Schulte
  2012-05-20  2:55           ` Mikhail Titov
  0 siblings, 1 reply; 7+ messages in thread
From: Eric Schulte @ 2012-05-20  0:39 UTC (permalink / raw)
  To: Mikhail Titov; +Cc: Bastien, emacs-orgmode, Eric Schulte

>> If so then I believe ob-ditaa should be left as is, given that it works
>> for most cases out of the box, and that you were able to easily adjust
>> it to work without an X server.
> I am confident that for all folks working with orgmode remotely using,
> let's say, SSH connection without X11 tunneling, blocks calling such
> java tools will fail. So I'd call it a bug. Either there should be a way
> to supply :java to other similar "languages", or headless option should
> be set by default.
>

I just added a :java option to plantuml which may be used in the same
manner as the :java option for ditaa.  I'm not sure which other
languages would benefit from such an option, but I agree that each java
language should provide a way to pass command line options to the java
executable.

Thanks,

-- 
Eric Schulte
http://cs.unm.edu/~eschulte

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

* Re: [babel] java headless support is missing for most graphing languages
  2012-05-19 22:41     ` Eric Schulte
@ 2012-05-20  1:53       ` Mikhail Titov
  2012-05-20  0:39         ` Eric Schulte
  0 siblings, 1 reply; 7+ messages in thread
From: Mikhail Titov @ 2012-05-20  1:53 UTC (permalink / raw)
  To: Eric Schulte; +Cc: Bastien, emacs-orgmode

On 05/19/2012 05:41 PM, Eric Schulte wrote:
>>>> I’ve noticed that at least ditaa and plantuml fail to evaluate with
>>>> babel.
>>> What version of Org are you using?
>> Hello, Bastien!
>>
>> It is 7.8.09 from default emacs 24.1.50.2 (revno: 108254). I have no X11
>> server running.
>>
> If I understand correctly you were able to execute successfully after
> adjusting your ditaa header arguments.  Is that correct?
Hi Eric!

Yes, it works for ditaa. However I was unable to do that for plantuml as
it does not respect :java alist (?) element in a similar fashion. I had
to edit ob-plantuml.el for that as it has hardcoded "java -jar" so no
way to insert anything in-between.
> If so then I believe ob-ditaa should be left as is, given that it works
> for most cases out of the box, and that you were able to easily adjust
> it to work without an X server.
I am confident that for all folks working with orgmode remotely using,
let's say, SSH connection without X11 tunneling, blocks calling such
java tools will fail. So I'd call it a bug. Either there should be a way
to supply :java to other similar "languages", or headless option should
be set by default.

M.

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

* Re: [babel] java headless support is missing for most graphing languages
  2012-05-20  0:39         ` Eric Schulte
@ 2012-05-20  2:55           ` Mikhail Titov
  0 siblings, 0 replies; 7+ messages in thread
From: Mikhail Titov @ 2012-05-20  2:55 UTC (permalink / raw)
  To: Eric Schulte; +Cc: Bastien, emacs-orgmode

On 05/19/2012 07:39 PM, Eric Schulte wrote:
>> I am confident that for all folks working with orgmode remotely using,
>> let's say, SSH connection without X11 tunneling, blocks calling such
>> java tools will fail. So I'd call it a bug. Either there should be a way
>> to supply :java to other similar "languages", or headless option should
>> be set by default.
>>
> I just added a :java option to plantuml which may be used in the same
> manner as the :java option for ditaa.  I'm not sure which other
> languages would benefit from such an option, but I agree that each java
> language should provide a way to pass command line options to the java
> executable.
Thank you! I quickly checked, indeed it is only ob-java, ob-ditaa, and
ob-plantuml  that use java. plantuml was the only one that missed java
command line options.

Nevertheless I'd say it won't hurt to have headless option set by
default. I don't insist :-)

M.

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

end of thread, other threads:[~2012-05-20  2:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-18  0:55 [babel] java headless support is missing for most graphing languages Mikhail Titov
2012-05-19  7:51 ` Bastien
2012-05-20  0:17   ` Mikhail Titov
2012-05-19 22:41     ` Eric Schulte
2012-05-20  1:53       ` Mikhail Titov
2012-05-20  0:39         ` Eric Schulte
2012-05-20  2:55           ` Mikhail Titov

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