I have MacBook Pro 13" mid-2010 (MacBookPro7,1), and sometimes I need it to work with the lid closed (long compilations, etc. while I'm on the go). I have tried InsomniaX, but it has no effect. I enable it via the menu bar icon and it displays "enabled", but, if I close the lid, my notebook will go to sleep in a dozen seconds or so. Any way I can prevent this? I know about the heat issue; it doesn't bother me.
In order to work with Lion, InsomaniaX has been updated to version 2.0.
I assume by "long compilations while I'm on the go" you mean something like "start a compile, stick laptop in backpack, remove at destination". Otherwise, I'd suggest just turning the screen off or locking it and leaving the clamshell open.
When you close the clamshell, the laptop will always go to sleep - the command to do so is at a deeper level than applications run at. (The no-sleep app I like, Jiggler, wiggles the mouse periodically to prevent sleep, but closing the lid will send the laptop to sleep anyway.)
Your best bet is to probably put the computer to sleep then wake it up when the screen is closed with a mouse or keyboard so it can continue to compile. (I've also seen people use a thin sheet of metal to hit the power button to wake the computer, but I've no experience with that.)
Have you considered trying InsomniaX alternatives like Sleepless?
(It's well maintained and has Lion support)
I just connect a USB keyboard and display adapter when I need it to keep running in clamshell mode.