On TextMate 2 Being A Free Lunch

Marco Arment on the promise that TextMate 2 would be a free update for TextMate 1 customers:

If the free-update offer still stands when TextMate 2 ships, I will not take you up on it. Iā€™m buying TextMate 2 as a new customer at full price. And I bet many other developers will gladly do the same.

Just as Marco, I use TextMate for about everything that has to do with text input other than coding Java and Obj-C. It is great for editing research papers in Latex. I use it for the occasional blogpost to this site. I have used it a long time to take notes ā€” although right now I am experimenting with alternate ways. It was the first program I bought when I switched to the Mac in 2006 ā€” the first program I had bought in years, as I came from a Linux environment.

I really like TextMate despite its small inconveniences.

Put TextMate 2 up for sale through the Mac App Store and I am buying it as a new customer at full price too.

MacBook Pro fails to sleep when closing the lid

One night I put my MacBook Pro to sleep by closing the screen lid, only to notice the next morning that it had not actually gone into sleep mode. I could tell it had been idling because it did not feel cold to the touch. I verified my suspicion by checking the system log and my TimeMachine backups. The log showed the occasional activity, including the hourly TM backups.

I looked online and found a number of people with a similar problem. Most posts attributing it to OSX Lion, going back to a few weeks after Lion’s release. The first suggestions I found were the typical Mac troubleshooting steps: reboot, reset PRAM and SMC. But none of these worked, my Mac still would not sleep. It would even wake up when I closed the lid, after putting it to sleep manually.

I dug deeper into the support posts, until I came across a post that mentions the pmset command line tool. I was familiar with this tool because I had used it before to tweak some power management settings. The post suggests to use the -g assertions option to list the assertions that may prevent display or system sleep.

steveno@navi~ % pmset -g assertions
23/09/11 11:22:11 GMT+0 
Assertion status system-wide:
   ChargeInhibit                           0
   PreventUserIdleDisplaySleep             0
   PreventUserIdleSystemSleep              0
   NoRealPowerSources_debug                0
   CPUBoundAssertion                       0
   EnableIdleSleep                         1
   PreventSystemSleep                      1
   DisableInflow                           0
   DisableLowPowerBatteryWarnings          0
   ExternalMedia                           0

Listed by owning process:
  pid 25: [0x0000012c00000019] PreventSystemSleep 
  named: "org.cups.cupsd"

The output of this command shows that the org.cups.cupsd process is preventing my system from going to sleep. cupsd is the printer system of OSX. I only have one printer installed that is really easy to re-add. So I decided to reset the printing system and see if it resolved my problem. To to this you navigate to the Print & Scan System Preferences dialog and option-click (or right-click) on the empty space in the Printers pane at the left hand side, and select Reset printer system. I re-added my printer at this time.

Invoking the pmset -g assertions command indicated that the cupsd assertions was gone.

Closing the lid put my MacBook to sleep, as before.