mhayashi1120/Emacs-langtool

Running Under Cygwin

Xaldew opened this issue · 0 comments

Hello!

I recently started using Cygwin for some of my development on Windows and I noted that there are a number of issues with running ´langtool` under that platform:

  • Java requires the .jar path's to be specified in Windows syntax (C:\User\...). However, there is a file existance test for it as well where the path must be given in Cygwin syntax (/cygdrive/c/...)
    • This can However be circumvented by using the class-path and setting it to the proper Cygwin syntax.
  • When writing to the temporary process buffer, newlines are written as "\r\n" rather than just "\n". This causes the langtool-output-regexp to fail to match anything when creating the overlays.
    • The simplest fix for this is to simply clear all trailing whitespace when filtering the process output with the (delete-trailing-whitespace) function.
    • You could also change the langtool-output-regexp to match carriage returns ("\r?\n" rather than "\n"). This might be more effective in practice.

I may be able to generate a pull request that solves this soon.