Closed Inc0n closed 1 year ago
Ok, all suggestiones are now applied.
During my usage so far, I run into this problem which prompts:
Buffer " http localhost:8081-186939" has a running process; kill it? (y or n) n
I think this is caused by my usage of with-current-buffer
inside the check-all function.
It may be best moved this filtering elsewhere, e.g. flymake-languagetool--handle-finished
, which is how it is done in langtool-ignore-fonts
.
can you move that inside your check function flymake-languagetool-ignore-at-pos-p
?
can you move that inside your check function
flymake-languagetool-ignore-at-pos-p
?
I applied this change, so now faces are fetched this way (get-text-property pos 'face src-buf)
, however, the issue still persist.
This makes me think that if filtering must be done outside of flymake-languagetool--check-all
, this feature could alternativelly just live outside of this package, as an addon, similar to langtool-ignore-fonts
(done using advices).
Can you push the latest commits you have so I can check as well?
Sure I will get that done.
Ok comitted, here is a more complete summary of the issue (the last one miss some details)
During my usage so far, I run into this problem which prompts:
Buffer " http localhost:8081-186939" has a running process; kill it? (y or n) n
This happens, when I am saving the edited the source buffer where flymake-languagetool
is enabled.
The step that sometimes trigger this issue, (I had not found a consistent reproduceable steps)
I think this is because we are accessing the buffer for face text property information inside flymake-languagetool-check-all
. Last report suggested with-current-buffer
may be the cause, this is inaccurate now, as the issue persist in the latest commit, which uses an alternative way to access buffer information by passing source buffer into get-text-property
.
Ahh, after inspecting the backtrace with debug-on-error
as t
. It seems this was not caused by the changes in my commits.
I was using the flymake-languagetool-20220922
, which is why there was the unintentional deleted in my first commit.
Okay, you'll need to rebase this on the latest commit.
Also, the lookup of associated faces for the major mode can all be moved into the ignore-at-pos function. something like this:
(with-current-buffer src-buf
(when-let ((faces-to-ignore (alist-get major-mode flymake-languagetool-ignore-faces-alist))
(x (get-text-property pos 'face)))
(cl-intersection faces-to-ignore (ensure-list x))))
Have you done an FSF copyright assignment?
Would that not mean, the look up will be done as many times as there is in the errors list?
Yes, I have done the assignment :)
On Sun, 27 Nov 2022, 23:57 tpeacock19, @.***> wrote:
Okay, you'll need to rebase this on the latest commit.
Also, the lookup of associated faces for the major mode can all be moved into the ignore-at-pos function. something like this:
(with-current-buffer src-buf (when-let ((faces-to-ignore (alist-get major-mode flymake-languagetool-ignore-faces-alist)) (x (get-text-property pos 'face))) (cl-intersection faces-to-ignore (ensure-list x))))
Have you done a copyright assignment https://www.gnu.org/software/emacs/manual/html_node/emacs/Copyright-Assignment.html ?
— Reply to this email directly, view it on GitHub https://github.com/emacs-languagetool/flymake-languagetool/pull/13#issuecomment-1328373679, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIDID377XPX44VKKNYBZAE3WKPYOFANCNFSM6AAAAAASMQ4MKA . You are receiving this because you authored the thread.Message ID: @.***>
I tried rebasing, it tells me
Current branch master is up to date.
You're right, it would. I'll have a look after the merge, otherwise this looks good. Thanks for the work!
Address this issue: https://github.com/emacs-languagetool/flymake-languagetool/issues/12
Inspired by https://github.com/cjl8zf/langtool-ignore-fonts.
It filters out error at positions (
.offset
) if theface
text-property at point is part of the specified faces to ignore. It is customized per major mode.