The recent move to 64 bit broke the (binary) protocol used between TextMate and the server for authenticated reads/writes (since size_t is now 64 bit).
This fixes issue #354.
Since we now use the (numeric) user ID as part of TextMate’s named socket (to allow multiple users on the same system to each run an instance of TextMate), mate needs to know this.
Running ‘mate’ via ‘sudo’ has getuid() return zero (root), hence why we need to specifically handle this.
The text encoding (or even field type) can be practically anything, so we need to either handle everything or coerce to UTF-8.
This is a quick fix for an issue with QuickCursor, a more thorough review of encoding used with AppleEvents is to follow.
Mainly this is because when we run tests, we do not want global or default settings from TextMate, so now TextMate.app explicitly sets the path to the default and global settings (unlike when running tests).
Despite Menlo having been the new system font for fixed width text in the past several OS versions, NSFont’s userFixedPitchFontOfSize: still return Monaco, unless we build with the 10.8 SDK (and no, setting the deployment target to 10.7 does not produce something that actually runs on 10.7, at least not last I checked).
The disadvantage with Monaco as default font is that we lack bold and italic styles (since CoreText doesn’t synthesize these, unlike the legacy text rendering API TextMate 1.x used).
We moved it to TMPDIR so that multiple instances of TextMate could run (for different users) but have since gotten a lot of reports about problems with this location. The short version is that ‘ls’ shows the socket exists (in TMPDIR), but stat’ing it or similar will fail.
To still allow different users to use mate side-by-side we add the user ID to the socket name.
Hopefully this closes issue #183.
For example if you have all your projects under ~/Projects then you can do:
mkdir -p ~/Library/Application\ Support/TextMate/Favorites
cd ~/Library/Application\ Support/TextMate/Favorites
ln -s ~/Projects "[DIR] My Projects"
This will then have all the folders inside ~/Projects show when you choose Open Favorites… (⇧⌘O).
Long-term it might be useful to store actual property lists in the favorites folder, akin to smart folders (i.e. describe a query for what to show) and/or allow descending into the folders shown in the ⇧⌘O window.