Emacs-langtool
Emacs-langtool copied to clipboard
Archlinux and languagetool-server
Hi,
I can't start the languagetool-server with your package and this setup:
(setq langtool-java-classpath
"/usr/share/languagetool:/usr/share/java/languagetool/*")
(setq langtool-language-tool-server-jar "/usr/share/java/languagetool/languagetool-server.jar")
(setq langtool-java-bin "/usr/bin/java")
If I use the languagetool-commandline from your package like this:
(setq langtool-java-classpath
"/usr/share/languagetool:/usr/share/java/languagetool/*")
(setq langtool-language-tool-jar "/usr/share/java/languagetool/languagetool-commandline.jar")
(setq langtool-java-bin "/usr/bin/java")
then there is no problem.
my system:
- Archlinux
- emacs 26.1 with spacemacs
- languagetool 4.4
The issue is this bit here: https://github.com/mhayashi1120/Emacs-langtool/blob/8276eccc5587bc12fd205ee58a7a982f0a136e41/langtool.el#L1133-L1135
It only adds the langtool-language-tool-server-jar
to the classpath and ignores langtool-java-classpath
even if it is configured.
Small fix to make emacs-langtool
work on ArchLinux is as follows:
(setq args (append args (list "-cp"
(format "%s:%s"
langtool-java-classpath
(langtool--process-file-name
langtool-language-tool-server-jar)))))
Above snippet assumes that langtool-java-classpath
is always defined. Might need more work to not add it if it is not specified.
@satyanash Thank you for this workaround! I too have had issues with this.