Closed krisbalintona closed 1 year ago
Yeah, we haven't handle the narrowed buffer for this package. @tpeacock19 Do you have time for this? 😕
Some references:
Yes will do so this evening.
I'm not able to replicate this issue. It seems to work already with narrowed buffers for me, probably due to this:
However, I have committed a change (https://github.com/emacs-languagetool/flymake-languagetool/commit/718b71ad1beabd7318df7b325f7316a24a821ef9) that I think should fix your issue. @krisbalintona, Can you please check if this fixes your issue or provide a sample file you get this error with, so I can continue troubleshooting?
I looked at the code and also expected narrowing to work after I noticed those lines. Nevertheless, it did error for me.
I'd try replicating the issue with emacs -Q
, but I just upgraded the package after the latest commit you've pushed, and so the issue has been resolved. I'll report back if it comes up again.
Thank you for your work!
I am on Emacs 30.0.50 (built from master) and the current behavior when calling
flymake-start
in a narrowed buffer (whileflymake-languagetool--checker
is a backend) results in an error. The following is a sample backtrace:The error seems to come from
flymake-languagetool--ignore-at-pos-p
trying to get the face of a character whose position lies outside of the narrowed buffer.Wrapping the contents of that function in a when clause that checks that
pos
is within the narrowed buffer (e.g.(and (<= (point-min) pos) (<= pos (point-max)
) seems to at least remove the errors on my end: