Hi all,
I've noticed this issue too. I'm using TextMate 2.0-beta6 on OS X 10.9.5 with Skim as my preferred viewer as well, and I have the same behavior. I've tried to uninstall and reinstall the Latex bundle but that doesn't help. The first time I compile using TextMate and Skim with "Typeset & View (PDF)", TexShop won't launch. It will start only after the second Latex compile with "Typeset & View (PDF)". I haven't tried to fiddle around with refresh_viewer.scpt or latex_watch.pl.

Cheers,
Angelo

René Schwaiger wrote:
Hi Jim,

On 11 Dec 2014, at 21:39 , Starx <jstarx@gmail.com> wrote:

I'm running TextMate version 2.0-beta.6 on OSX 10.9.5.  Skim is my preferred viewer but every time I render a latex file I get not only the normal operation of Skim either opening or refreshing but also TeXShop opens and displays a blank new file.  I'm not sure why this happens, Skim is the default in my preferences and I tried editing the default viewer in latex_watch.pl but the behavior continues.  

do you use “Typeset & View (PDF)” or “Watch document” to generate your files? `latex_watch.pl` is only used in the second command.

One workaround that does stop this from happening is to just delete the TeXShop commands from refresh_viewer.scpt.  

My first thought was that my horrible AppleScript skills are responsible for your problem :(. The command seems to work fine for me, although I see a small change in the Dock, it grows and shrinks a few pixels, when I run the command. It could be that this growing and shrinking is caused by TeXShop.

Unfortunately this is only a temporary fix, that script keeps reverting to it's original version and then the behavior resumes.  Maybe textmate keeps updating the latex bundle after I change it?  I'm not sure.

If you only change the content of the bundle inside the folder `~/Library/Application Support/TextMate/Managed/Bundles/` then indeed the changes get overwritten every time the bundle is updated.

Does anyone know what the issue is here?

Unfortunately in the moment I can only speculate. Can you please try to reset to defaults (https://github.com/textmate/textmate/wiki/Reverting-To-Defaults) and check if the issue remains? If yes: It would be really helpful if you could post steps to reproduce your problem.

 Or can anyone suggest a more permanent workaround?

A permanent workaround would be to uninstall the bundle inside the preferences and then clone the Bundle from [Github](https://github.com/textmate/latex.tmbundle) into the folder `~/Library/Application Support/TextMate/Managed/Bundles/`. You can do that by issuing the following commands inside Terminal:

    cd ~/Library/Application\ Support/TextMate/Managed/Bundles/
    git clone https://github.com/textmate/latex.tmbundle.git

After that you can change the content of `refresh_viewer.scpt` and they changes should be permanent unless you install the bundle inside `TextMate` again. However, I really would like to fix the issue. Has anybody else the same problems?

-Jim

Kind regards,
  René

_______________________________________________
textmate mailing list
textmate@lists.macromates.com
http://lists.macromates.com/listinfo/textmate