[TxMt] Re: tying external action to actions in Textmate

Cliff Pruitt lists.cpruitt at cliffpruitt.com
Thu May 24 13:35:23 UTC 2007


Yeah I'm playing around with some other stuff for my own time  
tracking needs so if there's a way to add in the ability to watch  
TextMate as well that would be good for me too.  If I work anything  
out I'll post it to the list but I wouldn't be looking for it anytime  
really soon.  Right now I have to pay the bills before I scratch my  
own itches. ;-)

- Cliff

On May 24, 2007, at 8:37 AM, Zvi Biener wrote:

> Thanks everybody.
> It looks like for the time being I'll just make a bundle command to  
> start the timer, and have to launch it myself. If you develop  
> something for this, Cliff, do let me know!
>
> Best,
> Zvi
>
>> On May 23, 2007, at 1:57 PM, Brooks Seymore wrote:
>>
>>> Could this also be done through a Bundle Command, with the new  
>>> document created and the timer launched by running the command?
>>>
>>> B.
>>
>> Yeah, you can trigger a Applescript when you run a bundle command  
>> or even include run it from the script used when creating a file  
>> from a template so creating a new file would start the timer, but  
>> then you wouldn't be able to log time if you were just editing  
>> existing files.
>>
>> I haven't had time to look into it for myself, but does anyone  
>> else know if you can just use launchd to watch a TextMate related  
>> file for changes, say, the TextMates preferences for example?  If  
>> the file is modified you can assume you're working with TM & then  
>> start your timer?   I know launchd can monitor paths, but I don't  
>> know if TM alters its prefs file on disk when its running or just  
>> when it shuts down or what.  If so it'd maybe work to use launchd  
>> to watch the prefs file and run a script.  The script could even  
>> maybe use
>>
>> 	defaults read com.macromates.textmate NSRecentDocumentRecords
>>
>> to examine what documents were last opened / saved and mess with  
>> your timer accordingly, though you'd have to translate them from  
>> alias references (or whatever the heck the prefs file stores) to  
>> paths somehow.  Thats beyond me at the moment.
>>
>> I'm just tossing out ideas...
>>
>> - Cliff
>
>
> ______________________________________________________________________
> For new threads USE THIS: textmate at lists.macromates.com
> (threading gets destroyed and the universe will collapse if you don't)
> http://lists.macromates.com/mailman/listinfo/textmate





More information about the textmate mailing list