1

I have tried to install and use plantuml-mode in emacs, with no success. My emacs version: 25.2.2 Operating system: Ubuntu 18.04 x86_64 I have followed the official instructions on https://github.com/skuro/plantuml-mode

When I load a file it says

"Contacting host: www.plantuml.com:443".

After a few seconds I get the error message

"plantuml-init: Wrong type argument: stringp, nil"

I've looked at Can't turn on plantuml-mode in Emacs

It didn't help. In a previous attempt I found some other similar help pages, on github and stackoverflow, but I can't find them right now. One was to fix a broken url, and the other was to provide the correct path to the jar file. I fixed both, but none of them fixed my problem.

The above mentioned problem reports are related to the mode's attempts to contact a web server, or to run plantuml. I am not interested in any of them, I prefer to run plantuml myself from the command line. All I want from the mode is syntax highlighing and indentation. It is possible to turn off the other features, to get rid of the errors? Or is there another, simpler mode out there, that doesn't try to contact the web or run executables?

Best regards

dawa
  • 11
  • 3
  • 1
    What happens when you try it without specifying the port? – albert Nov 27 '20 at 13:56
  • Unfortunately I don't know how to tell the mode not to use any port. I tried to grep for 443 in all the .el files in my homedir, with no relevant matches. I also found the el file that contains the url to plantuml's server: plantuml-mode.el: Sorry, I don't manage to put code here... inserting some separators: "_______________________________________________________________" (defcustom plantuml-server-url "https://www.plantuml.com/plantuml" "The base URL of the PlantUML server." :type 'string :group 'plantuml) – dawa Nov 27 '20 at 16:12

1 Answers1

1

The plantuml-mode sends your data to be evaluated at www.plantuml.com by default.

To run it locally, you need to set both the plantuml jar path and the execution mode as described in https://github.com/skuro/plantuml-mode#quick-guide:

(setq plantuml-jar-path "/path/to/your/copy/of/plantuml.jar")
(setq plantuml-default-exec-mode 'jar)
Pedro Penna
  • 1,127
  • 1
  • 15
  • 24
  • Thanks a lot: it works!!! I thought I already did exactly this previously, but without success. This time it works, and I don't see the difference. Probably I did something more that as wrong. – dawa Jan 05 '21 at 11:09
  • Cool! I'm glad to hear that – Pedro Penna Jan 08 '21 at 14:05