skuro / plantuml-mode

A major mode for editing PlantUML sources in Emacs
GNU General Public License v3.0
511 stars 96 forks source link

Is there a way of viewing the actual commands executed by plantuml? #120

Closed vonHabsi closed 4 years ago

vonHabsi commented 4 years ago

Is there a way of viewing the actual commands executed by plantuml?

I am having some problems with plantuml I have described https://forum.plantuml.net/10754/plantuml-generates-faulty-svg-from-a-script, and https://forum.plantuml.net/10795/there-command-option-suppress-the-generation-secondary-file.

I also installed the Debian 9 package, currently version 8039-1 and tested it from both the command line and in emacs, and this is what I discovered.

When I generate the svg file from the command line, both the OS packaged version and the downloaded version do not add the extra svg that cause the error. The following two lines generate the correct svg, with the latest download including some additional metadata

java -jar /opt/local/bin/plantuml.jar ~/testgen.plantuml -tsvg - latest downloadable

java -jar /usr/share/plantuml/plantuml.jar ~/testgen.plantuml -tsvg - Debian package

The version generated by the Debian 9 packaged version in emacs at https://pastebin.com/FnDneQ2J. The output is on a single long line

The version generated by the latest downloadable in emacs is at https://pastebin.com/sUnvEEGe. The additonal code causing the error can be seen after line 29

The version generated by the latest downloadable from the command line is at https://pastebin.com/54diDf7k. You can see that it is 29 lines long whereas the one generated in emacs is 39 lines long.

When org-babel is configured with the packaged version there are no errors.

It is the latest downloadable version in org-babel that adds the extra xml that causes the syntax error.

My conclusion is that the latest downloadable has been designed to spam the output and probably requires some options to be changed in order to generate the spam-free output.

Is there some way to see the command generated by org-babel to see what can be added or removed?

vonHabsi commented 4 years ago

I am closing this because I have noted the cause of the errors in #121.

FWIW the Messages buffer displays the commands executed by org-babel.

The README at https://github.com/skuro/plantuml-mode#debug-messages mentions plantuml-enable-debug and plantuml-disable-debug functions which are supposed to create a separate buffer to help debugging, but it didn't work on my attempts. I will have to make the time to test that properly before I can be sure about that.