(I signed up to get emails in a digest, so I don't know how to reply to an individual email)
Message: 1 Date: Thu, 16 Jan 2014 21:15:59 +0700 From: "Allan Odgaard"mailinglist@textmate.org To: "TextMate users"textmate@lists.macromates.com Subject: [TxMt] Re: when sending code to R.app textmate 1 and 2 both open Message-ID:4E4D9C0E-7389-4E8E-AFF5-4FC9DFA68AF7@textmate.org Content-Type: text/plain; charset=utf-8; format=flowed
On 15 Jan 2014, at 12:44, Kevin Owens wrote:
I'd like to have both versions of textmate on my computer, but when I send code to the R.app in either, it shifts focus to the other one. For example, if I am running textmate 1 it runs the R code, then shifts focus to textmate 2, and then I have to alt tab to get back to my original window.
Exactly what bundle command are you using?
I looked at the commands in the R Console (R.app) bundle (like ?Send Document / Selection to R.app?) and while I see code that activates R.app I see no code to bring back focus to TextMate.
I'm using the command "Send Selection/Line To" and the sub-menu is "R.app and step" and the key binding is alt shift enter.
I've restarted my computer, and now it seems that Textmate 1 works fine, but it's when I send code to R.app that it switches focus.
I think it may be related to the lines in that command like
"open "txmt://open?line="
On 17 Jan 2014, at 11:13, Kevin Owens wrote:
[…] I think it may be related to the lines in that command like
"open "txmt://open?line="
Yes, that would go to whatever version of TextMate is responsible for handling the txmt URL scheme.
The bundle should call “mate” instead.
For 2.0 you can use:
"${TM_MATE}" -l «line»:«column»
For a version that should work with both, use:
"${TM_MATE:-$TM_SUPPORT_PATH/bin/mate}" -l «line»
If you can confirm this works, we can update the bundle accordingly.