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

LanguageTool exited abnormally #28

Open
TeddyDD opened this issue Oct 5, 2017 · 3 comments
Open

LanguageTool exited abnormally #28

TeddyDD opened this issue Oct 5, 2017 · 3 comments

Comments

@TeddyDD
Copy link

TeddyDD commented Oct 5, 2017

OS: Linux Arch
languagetool: 3.8 from community repo
Emacs: 25.3
I installed langtool package on Spacemacs. My config looks like this:

  (use-package langtool
    :ensure t
    :init (
    (setq langtool-bin "/usr/bin/languagetool")
    (setq langtool-mother-tongue "pl")
    (setq langtool-language-tool-jar "/usr/share/java/languagetool/languagetool-commandline.jar")
    (setq langtool-default-language "en-US")
    (setq langtool-java-bin "/usr/bin/java")
    ))

I tried this and few combinations (only langtool-java-bin or langtool-bin). Every time I try to run
M-x langtool-check there is an error: LanguageTool exited abnormally with code 1 (Unrecognized option: -c)

@novakboskov
Copy link

Same here.

@nypdmax
Copy link

nypdmax commented Dec 19, 2017

Same here. I have tried both languagetool-3.5 and languagetool-3.9. It seems related to 'langtool--java-coding-system' or 'buffer-file-coding-system' as I found '-c' option in line 707-712 in langtool.el. However when I executed the languagetool-commandline.jar with '-c utf8', it appeared to be working.

@pksec
Copy link

pksec commented Mar 9, 2018

Problem:
Same error here. I am using langtool-4.0, if I disable -c option in langtool.el, then I get an error with option -l.
My tools:

GNU Emacs 24.5.1 (x86_64-pc-linux-gnu, GTK+ Version 3.18.9)
LanguageTool debug ON.
LanguageTool exited abnormally with code 1 (Unrecognized option: -c)
Org mode version 9.1.7 (9.1.7-12-g74f6ed-elpa @ /home/xxx/.emacs.d/elpa/org-20180305/)

I was getting an error in emacs saying cannot find or open tool called langtool. I disabled it, and everything starting working as normal.

FIX to the problem
Do not use (require 'langtool), just comment the line and restart emacs.

;(require 'langtool)
(setq langtool-language-tool-jar "/home/xxx/LanguageTool-4.0/languagetool-commandline.jar")
(setq langtool-default-language "en-US")

(global-set-key "\C-c4l" 'langtool-check)
(global-set-key "\C-c4d" 'langtool-check-done)
(global-set-key "\C-c4m" 'langtool-show-message-at-point)
(global-set-key "\C-c4c" 'langtool-correct-buffer)

--
Now everything works!

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