Can't turn on plantuml-mode in Emacs

旧巷老猫 提交于 2021-02-05 20:34:17

问题


I am on Emacs 24.3.1. I installed the MELPA version of plantuml-mode via

M-x package-install RET plantuml-mode RET.

When I try to turn on plantuml-mode for a buffer, I get the following error:

Wrong type argument: stringp, nil

Trying to find additional installation instructions I looked at the "Commentary" section in the plantuml-mode.el source, but there it only says to require the package, and I am doing that.

How can I fix this problem?


回答1:


After a bit more digging I found the solution to this problem: plantuml-mode won't run unless the variable plantuml-jar-path is set to a non-nil value. Fairly obvious in hindsight, but still easy to get bit by since it isn't mentioned explicitly (at least not anywhere that I could find). For best results, the variable should point to the location of the plantuml.jar file in your file system. In my case:

(setq plantuml-jar-path "/opt/plantuml/plantuml.jar")

Hope this helps someone else at some point.



来源:https://stackoverflow.com/questions/22575080/cant-turn-on-plantuml-mode-in-emacs

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!