If TM_PID is set then app_path will return the path of the executable which started that process (rather than grep the process list for TextMate and use the first match). Changed: U trunk/Support/lib/textmate.rb