Thanks a lot Allan, I'll try that approach.
On Mon, Aug 12, 2013 at 12:00 PM, Allan Odgaard mailinglist@textmate.orgwrote:
On 11 Aug 2013, at 19:02, Michele Pasin wrote:
[…] each time I send a command, the socket is obviously re-created; I
wondered if I TextMate provides a mechanism to save the 'sock' binding in the current environment - so that I can reuse it later within other commands.
Not per se, but TextMate does give you a TM_DOCUMENT_UUID and TM_PROJECT_UUID variable.
The former is unique per document and the latter is unique per project (window).
You can use these as keys into shared storage (such as files in TMPDIR) to store things that you wish to associate with a single document or project.
Presently though there is no cleanup callback, so if you spawn a server process for a document or project, you should have it shutdown automatically if it hasn’t seen any activity for some amount of time.
______________________________**_________________ textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/**listinfo/textmatehttp://lists.macromates.com/listinfo/textmate