Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Archlinux and languagetool-server #40

Open
gitlyap opened this issue Jan 14, 2019 · 2 comments
Open

Archlinux and languagetool-server #40

gitlyap opened this issue Jan 14, 2019 · 2 comments
Assignees

Comments

@gitlyap
Copy link

gitlyap commented Jan 14, 2019

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
@mhayashi1120 mhayashi1120 self-assigned this Jan 2, 2020
@satyanash
Copy link

satyanash commented Jan 6, 2021

The issue is this bit here:

Emacs-langtool/langtool.el

Lines 1133 to 1135 in 8276ecc

(setq args (append args (list
"-cp" (langtool--process-file-name
langtool-language-tool-server-jar))))

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.

@ejuarezg
Copy link

ejuarezg commented Apr 16, 2021

@satyanash Thank you for this workaround! I too have had issues with this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants