Since a recent update (maybe since [60180f7](https://link.nylas.com/link/33wd9n5m5l3cdcz4d1oikbwcz/local- 2f068e83-2834/0?redirect=https%3A%2F%2Fgithub.com%2Ftextmate%2Ftextmate%2Fcommit%2F60180f77ec16a4c058c8845ebb9eb41ab6ef227e&r=dGV4dG1hdGVAbGlzdHMubWFjcm9tYXRlcy5jb20=) ?) callback.document.will-save isn't working anymore when used as semantic class in a bundle.
Has this been changed?
Koen
Sent from [Nylas N1](https://link.nylas.com/link/33wd9n5m5l3cdcz4d1oikbwcz /local- 2f068e83-2834/1?redirect=https%3A%2F%2Fnylas.com%2Fn1%3Fref%3Dn1&r=dGV4dG1hdGVAbGlzdHMubWFjcm9tYXRlcy5jb20=), the extensible, open source mail client.
![](https://link.nylas.com/open/33wd9n5m5l3cdcz4d1oikbwcz/local- 2f068e83-2834?r=dGV4dG1hdGVAbGlzdHMubWFjcm9tYXRlcy5jb20=)
And I had the second crash within the hour just yet:
https://api.textmate.org/crashes/336421
Sent from [Nylas N1](https://link.nylas.com/link/33wd9n5m5l3cdcz4d1oikbwcz /local-5ca0a6ae- e68f/0?redirect=https%3A%2F%2Fnylas.com%2Fn1%3Fref%3Dn1&r=dGV4dG1hdGVAbGlzdHMubWFjcm9tYXRlcy5jb20=), the extensible, open source mail client.
![](https://link.nylas.com/open/33wd9n5m5l3cdcz4d1oikbwcz/local-5ca0a6ae- e68f?r=dGV4dG1hdGVAbGlzdHMubWFjcm9tYXRlcy5jb20=)
On Jul 12 2016, at 3:03 pm, Koen Punt <koen@koenpunt.nl> wrote:
Since a recent update (maybe since
[60180f7](https://github.com/textmate/textmate/commit/60180f77ec16a4c058c8845ebb9eb41a...) ?) callback.document.will-save isn't working anymore when used as semantic class in a bundle.
Has this been changed?
Koen
Sent from [Nylas
N1](https://nylas.com/n1?ref=n1&r=dGV4dG1hdGVAbGlzdHMubWFjcm9tYXRlcy5jb20=), the extensible, open source mail client.
And another one (https://api.textmate.org/crashes/336432), and it happens when I double click a search results when I searched through a project.
Koen
Sent from [Nylas N1](https://link.nylas.com/link/33wd9n5m5l3cdcz4d1oikbwcz /local-66b359cc- 010e/0?redirect=https%3A%2F%2Fnylas.com%2Fn1%3Fref%3Dn1&r=dGV4dG1hdGVAbGlzdHMubWFjcm9tYXRlcy5jb20=), the extensible, open source mail client.
![](https://link.nylas.com/open/33wd9n5m5l3cdcz4d1oikbwcz/local-66b359cc- 010e?r=dGV4dG1hdGVAbGlzdHMubWFjcm9tYXRlcy5jb20=)
On Jul 12 2016, at 3:44 pm, Koen Punt <koen@koenpunt.nl> wrote:
And I had the second crash within the hour just yet:
Sent from [Nylas
N1](https://nylas.com/n1?ref=n1&r=dGV4dG1hdGVAbGlzdHMubWFjcm9tYXRlcy5jb20=), the extensible, open source mail client.
On Jul 12 2016, at 3:03 pm, Koen Punt <koen@koenpunt.nl> wrote:
Since a recent update (maybe since
[60180f7](https://github.com/textmate/textmate/commit/60180f77ec16a4c058c8845ebb9eb41a...) ?) callback.document.will-save isn't working anymore when used as semantic class in a bundle.
Has this been changed?
Koen
Sent from [Nylas N1](n1&r=dGV4dG1hdGVAbGlzdHMubWFjcm9tYXRlcy5jb20=), the
extensible, open source mail client.
On 12 Jul 2016, at 15:43, Koen Punt wrote:
And I had the second crash within the hour just yet:
I just pushed a build that hopefully fixes that. I got a lot more crashes from beta 11.7 than I am used to, so sorry to everyone about that. It was a “last minute fix” that I pushed, which turned out to not really be a fix at all…
As for `callback.document.will-save`, is this failing for the active document (selected tab)? Or is it about non-active tabs?
On 12 Jul 2016, at 15:03, Koen Punt wrote:
[…] callback.document.will-save isn't working anymore when used as semantic class in a bundle.
2.0-beta.11.9 re-introduces this feature.
If you are on 2.0-beta.11.8 then go to Preferences → Software Update and hold option when clicking Check Now. For older builds, it will auto-update (when checking for nightly builds).
Thanks, it's working again.
Although another (small?) thing came up, which I assume is an issue with the "diff gutter" bundle.
I have an "insert newline at EOF" macro which is bound to callback.document .will-save. And I think this is best described using this mini screencast: http://g.recordit.co/9UH8QFo7Q0.gif
Subs:
I remove the trailing newline, document displays as modified (dot in tab)
I save, the dot in the tab disappears, in the gutter appears a dot for a git change.
I save again, the dot in the gutter disapppears.
Koen
Sent from [Nylas N1](https://link.nylas.com/link/33wd9n5m5l3cdcz4d1oikbwcz /local- c8fbdfd6-d206/0?redirect=https%3A%2F%2Fnylas.com%2Fn1%3Fref%3Dn1&r=dGV4dG1hdGVAbGlzdHMubWFjcm9tYXRlcy5jb20=), the extensible, open source mail client.
![](https://link.nylas.com/open/33wd9n5m5l3cdcz4d1oikbwcz/local- c8fbdfd6-d206?r=dGV4dG1hdGVAbGlzdHMubWFjcm9tYXRlcy5jb20=)
On Jul 13 2016, at 12:48 am, Allan Odgaard <mailinglist@textmate.org> wrote:
On 12 Jul 2016, at 15:03, Koen Punt wrote:
> […] callback.document.will-save isn't working anymore when used as > semantic > class in a bundle.
2.0-beta.11.9 re-introduces this feature.
If you are on 2.0-beta.11.8 then go to Preferences → Software Update and hold option when clicking Check Now. For older builds, it will auto-update (when checking for nightly builds).
textmate mailing list textmate@lists.macromates.com
[http://lists.macromates.com/listinfo/textmate%5D(http://lists.macromates.com...)
On 13 Jul 2016, at 10:15, Koen Punt wrote:
Subs:
I remove the trailing newline, document displays as modified (dot in tab)
I save, the dot in the tab disappears, in the gutter appears a dot for a git change.
I save again, the dot in the gutter disapppears.
What is expected/not expected?
Does the version in git have the newline or not?
How does the did-save callback add the newline?
It sounds to me like a race condition, i.e. the file is at some point different from what’s in Git, you have a callback that “fixes” this, but gutter gets updated before the fix runs, hence it is temporarily showing the change in the gutter.
The gutter only updates on did-save, thus it should show the git state at this time.
On 13 Jul 2016, at 10:15, Koen Punt wrote:
Although another (small?) thing came up, which I assume is an issue with the "diff gutter" bundle.
I found the issue and it will be fixed in next build (which I will release today).
TextMate was saving the buffer in the state prior to calling the “will save” callbacks.
Yeah turned out that git status was correct, but the document status was not. Good that it's fixed now :)
Verstuurd vanaf mijn iPhone
Op 16 jul. 2016 om 11:22 heeft Allan Odgaard mailinglist@textmate.org het volgende geschreven:
On 13 Jul 2016, at 10:15, Koen Punt wrote:
Although another (small?) thing came up, which I assume is an issue with the "diff gutter" bundle.
I found the issue and it will be fixed in next build (which I will release today).
TextMate was saving the buffer in the state prior to calling the “will save” callbacks.
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate