I'm using TM mostly to edit web sites so lots of html files. Prior to TM I used XCode3's Organizer which I liked a lot but is no longer available in XCode 4. So I've switched to TM lately.
I keep finding garbage at the end of my files.
Stuff like
</script> </body> </html> t('Got back auth_token: ' + json.auth_token); });
})
</script> </body> </html>
but TM doesn't show the stuff beyond the first </html> tag. Basically, it seems TM doesn't shrink file sizes correctly when writing them. Closing the file and re-opening it will reveal the mess at the end (as does my web browser :-( ) but I'm getting bitten by this bug a LOT. I'm using version Version 1.5.10 (1631) on Snow Leopard 10.6.8 (although it has been around for a few different versions of SL). No extra bundles or plugins beyond the standard install.
I'm kind of amazed that this kind of bug is hanging around in such a mature product. I can't be the first guy to find this?
-Todd Blanchard
On Jul 9, 2011, at 1:40 PM, Todd Blanchard wrote:
I'm using TM mostly to edit web sites so lots of html files. Prior to TM I used XCode3's Organizer which I liked a lot but is no longer available in XCode 4. So I've switched to TM lately.
I keep finding garbage at the end of my files.
I've never heard of this happening, it would helpful if you could help narrow down a trigger. Also try switching out of and back into TextMate to see if it then shows the error because this will cause it to check the file for changes. Also does this happen to any files other than HTML files?
Bringing new apps to the front and then going back does nothing. I do it constantly. I only use it with HTML files and have only observed the problem with HTML files.
I do leave it running for days at a time.
On Jul 9, 2011, at 12:10 PM, Michael Sheets wrote:
On Jul 9, 2011, at 1:40 PM, Todd Blanchard wrote:
I'm using TM mostly to edit web sites so lots of html files. Prior to TM I used XCode3's Organizer which I liked a lot but is no longer available in XCode 4. So I've switched to TM lately.
I keep finding garbage at the end of my files.
I've never heard of this happening, it would helpful if you could help narrow down a trigger. Also try switching out of and back into TextMate to see if it then shows the error because this will cause it to check the file for changes. Also does this happen to any files other than HTML files?
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
I've never seen this behavior either, and I use TextMate pretty much constantly. Forgive any dumb questions, I have my troubleshooting hat on...
* Are you saving files to the local disk, or a network share? * If local, is anything else accessing the file? (ie., is it open in another editor at the same time?) * If network, what's the filesystem and how is it mounted? * Do you have atomic saves enabled? * Does this happen when you add lines to a file, or only when you delete lines? * When you see the garbage, is it text from the same file or from a different file? * If you save the file (but not close it in TextMate) then immediately 'cat' it from the command line, is the garbage there? * What is the file's text encoding? Do you have any Unicode characters in there? * Do you have any TextMate plugins installed?
See below On Jul 9, 2011, at 4:15 PM, Steve King wrote:
I've never seen this behavior either, and I use TextMate pretty much constantly. Forgive any dumb questions, I have my troubleshooting hat on...
- Are you saving files to the local disk, or a network share?
Both local disk and iPhone mounted disk
- If local, is anything else accessing the file? (ie., is it open in another editor at the same time?)
It may be open in Safari or the iPhone web browser - doesn't seem to matter which.
- If network, what's the filesystem and how is it mounted?
N/A
- Do you have atomic saves enabled?
I didn't even know about these - seems the answer is 'no'. I'll bet when I turn it on the problem goes away.
- Does this happen when you add lines to a file, or only when you delete lines?
Delete lines - file has to shrink.
- When you see the garbage, is it text from the same file or from a different file?
Same file
- If you save the file (but not close it in TextMate) then immediately 'cat' it from the command line, is the garbage there?
Sometimes
- What is the file's text encoding? Do you have any Unicode characters in there?
US-HTML so while I always choose UTF8 it is the ASCII subset.
- Do you have any TextMate plugins installed?
None.
Since it's happening on local disks, and you don't seem to have any other apps writing to the files, I'm stumped. Just having them open in a browser shouldn't matter at all. If enabling atomic saves doesn't help, the only other advice I have is to remove and reinstall TM. Make sure to delete everything TM related, including bundles and preferences.
On Jul 12, 2011, at 4:54 PM, Steve King wrote:
Since it's happening on local disks, and you don't seem to have any other apps writing to the files, I'm stumped. Just having them open in a browser shouldn't matter at all. If enabling atomic saves doesn't help, the only other advice I have is to remove and reinstall TM. Make sure to delete everything TM related, including bundles and preferences.
Create a temporary user account, install TextMate there, and see if the problem is reproducible in that account. If not, it is some preference or locally installed bundle gone crazy.
Gerd