From 535120ec7f5d5f5433f0d2464b1c84727a52467d Mon Sep 17 00:00:00 2001 From: Joar Esteban Buitrago Carrillo Date: Thu, 22 Jul 2021 01:56:42 -0500 Subject: [PATCH 1/2] Expand path to prevent error when using ~ Fix #7 --- languagetool.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/languagetool.el b/languagetool.el index 89ac8bc..06f8f50 100644 --- a/languagetool.el +++ b/languagetool.el @@ -265,7 +265,7 @@ Its not recommended to run this function more than once." (error "LanguageTool Server jar path is not set")) (unless (or languagetool-language-tool-class - (file-readable-p languagetool-server-language-tool-jar)) + (file-readable-p (file-truename languagetool-server-language-tool-jar))) (error "LanguageTool Server jar is not readable or could not be found")) (let ((buffer (get-buffer-create languagetool-server-output-buffer-name))) @@ -300,7 +300,7 @@ Its not recommended to run this function more than once." ;; Appends the LanguageTool Server jar path (unless languagetool-language-tool-class (setq arguments (append arguments (list "-cp")))) - (setq arguments (append arguments (list languagetool-server-language-tool-jar))) + (setq arguments (append arguments (list (file-truename languagetool-server-language-tool-jar)))) (unless languagetool-language-tool-class (setq arguments (append arguments (list "org.languagetool.server.HTTPServer")))) @@ -501,7 +501,7 @@ the call of LanguageTool when correcting the text." ;; Appends the LanguageTool jar path (unless languagetool-language-tool-class (setq arguments (append arguments (list "-jar")))) - (setq arguments (append arguments (list languagetool-language-tool-jar))) + (setq arguments (append arguments (list (file-truename languagetool-language-tool-jar)))) ;; Appends the LanguageTool arguments (dolist (arg languagetool-language-tool-arguments) @@ -606,7 +606,7 @@ The region is delimited by BEGIN and END." (error "LanguageTool jar path is not set")) (unless (or languagetool-language-tool-class - (file-readable-p languagetool-language-tool-jar)) + (file-readable-p (file-truename languagetool-language-tool-jar))) (error "LanguageTool jar is not readable or could not be found")) (save-excursion From ad37a7938ec97ddc32c30caf63d66bd4acd5b4fc Mon Sep 17 00:00:00 2001 From: Joar Esteban Buitrago Carrillo Date: Thu, 22 Jul 2021 02:01:30 -0500 Subject: [PATCH 2/2] Update docs version --- ChangeLog.adoc | 6 +++++- ReadMe.adoc | 2 +- languagetool-issue-faces.el | 2 +- languagetool.el | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ChangeLog.adoc b/ChangeLog.adoc index 983d5f1..130ce54 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -1,6 +1,6 @@ = Change Log Joar Buitago -v0.4.1, 2020-01-21 +v0.4.3, 2020-01-21 All notable changes to this project will be documented in this file. @@ -13,6 +13,10 @@ link:https://semver.org/spec/v2.0.0.html[Semantic Versioning]. == [Unreleased] +== [0.4.3] +=== Fixed +* Error when putting `~` on LanguageTool jar path. (Fix #7) + == [0.4.2] === Fixed * Error when checking with classes on. (Fix #3) diff --git a/ReadMe.adoc b/ReadMe.adoc index edba191..741208e 100644 --- a/ReadMe.adoc +++ b/ReadMe.adoc @@ -1,6 +1,6 @@ = languagetool.el Joar Buitago -v0.4.2, 2020-01-21 +v0.4.3, 2020-01-21 [.text-center] -- diff --git a/languagetool-issue-faces.el b/languagetool-issue-faces.el index ce0f726..6af23a6 100644 --- a/languagetool-issue-faces.el +++ b/languagetool-issue-faces.el @@ -5,7 +5,7 @@ ;; Author: Joar Buitrago ;; Keywords: grammar text docs tools convenience checker ;; URL: https://github.com/PillFall/Emacs-LanguageTool.el -;; Version: 0.4.2 +;; Version: 0.4.3 ;; Package-Requires: ((emacs "25.1") (request "0.3.2")) ;; This program is free software; you can redistribute it and/or modify diff --git a/languagetool.el b/languagetool.el index 06f8f50..179d5fb 100644 --- a/languagetool.el +++ b/languagetool.el @@ -5,7 +5,7 @@ ;; Author: Joar Buitrago ;; Keywords: grammar text docs tools convenience checker ;; URL: https://github.com/PillFall/Emacs-LanguageTool.el -;; Version: 0.4.2 +;; Version: 0.4.3 ;; Package-Requires: ((emacs "25.1") (request "0.3.2")) ;; This program is free software; you can redistribute it and/or modify