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
run_on_modifications no longer firing for Kate on Linux. #180
Comments
That's weird because Could you try to play/debug a little bit that class with your setup? Thanks! |
I played around with it a bit and it seems like its never getting the event. The only event for the file in |
Ok that's weird, |
Still an issue? |
Yes, it's still an issue. And it's not trivial... Kate likely does the same thing Sublime Text 3 does on Linux, which is:
It seems like this would trigger the sequence:
which is more than sufficient for But what's happening is there's an Because both the That's because the That's why the And That's why only |
What about simplify the whole api and merging added/removed/modified to a simple and unique modified event and leave Listen users to handle it the way they want... Like you propose before right? |
Yes - though this technically means forking listen into listen2 and guard into guard2, so I've created these:
|
👍 |
This issue should be fixed in: #215 |
Kate is still broken (see: #217 or guard/guard-rspec#262) gem 'listen', github: 'guard/listen', branch: 'kate_editing_tmp_ignores' (Bundle install, restart guard, etc.) This branch should fix things for Kate: https://github.com/guard/listen/tree/kate_editing_tmp_ignores ... because the new ignore patterns would allow the patch from #215 to kick in. |
Yes, branch kate_editing_tmp_ignores works for me at least |
My consideration: is not it easier to analyze listen: final changes event? |
In the upcoming version of |
@thibaudgg - I drafted a release: https://github.com/guard/listen/releases It's worth releasing, because Kate users will have an exceptionally tough time debugging why their editor doesn't work. Could you check/release v2.7.4 ? Thanks! |
Done, thanks for the draft (and the fix)! |
👍 Awesome, thanks! |
Great, thank you. :-) |
My pleasure :) |
After some experience I'v'e met a problem. Sometimes it is needed to save the file several times before the guard is triggered. Shall I open a new issue? |
Here is the output when guard is not triggered: |
Two in the sequence: |
Nah, same issue. |
My bad - I screwed up the regexp for Kate. I think it should work now, no matter what process id or random string is generated by Kate for temp file. Could you switch to the |
One question - do you have any idea where the .kate-swp files come from? A Kate plugin or something? Because as far as I've seen, Kate creates backup files according to configured prefix+suffix (default is ending files with '~' AFAIK) and creating temp files with the XXXXXX.new mask (e.g. X's = char + 5 x digits from process PID). |
yes, kate swap keeps the changes until they are saved to the file |
With master I could not repeat the issue: every save triggers guard. |
kate-swp is created at the making any change in the file and is deleted after the file is saved: |
Now on master kate-swp files are ignored, so this should avoid useless guard triggering. |
Btw, I did not experience false triggering of guard from kate. |
Thanks for letting me know - I appreciate that. |
@thibaudgg - I think we can close this and a few other issues already fixed on master. I've prepared a draft for v2.7.5, could you release it if you find a moment? |
2.7.5 released, thanks! |
Thank you |
Our pleasure :) |
With Kate 3.12 run_on_modifications is no longer being fired in guard. Output from inotifywatch is:
run_on_changes fires fine.
The text was updated successfully, but these errors were encountered: