Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Knitting to Word causes both Word and Preview.app to open on OSX with latest Office 365 update #5148
Steps to reproduce the problem
(Tested with fresh OS X installation)
Describe the problem in detail
Essentially, what we are seeing is that on Mac computers which have been updated to include the latest build of Microsoft Word are having issues opening knitted documents. (I suspect people that have freshly setup their computer for the start of the NZ semester, I don't think this build of Word has gone out via the Autoupdate Utility - I couldn't reproduce this issue until I redownloaded Word)
In particular, while RStudio is triggering the launch of Microsoft Word, the document does not open, instead the OSX Preview app launches with the document, this is quite confusing for students (especially as
For an indication of prevalence, we've just noticed this after running a series of labs, of around 50-70 students with Macs there were at least 3-5 installations already with this issue.
I've also performed a screen recording (Google Drive link) of this issue, where you can see Word launch to the new document screen (behind RStudio) and
Describe the behavior you expected
The past behaviour, RStudio to open Microsoft Word and load the knitted document.
I was going to try to get RStudio to compile from source and debug & see if there was a quick fix for this but had a lot of trouble getting a compiled copy to work, however I did look at the following:
I have noticed that the method for launching Word on Mac's is via AppleScript as in
Replicating the very basic form of this in the AppleScript Editor:
Loads the knitted document successfully, (The above path is the path to the knitted document). Therefore my suspicion is that Word is no longer handling the path format RStudio is substituting
@nigeljonez Are you using a
@ronblum No, I can trigger this using the standard RMarkdown file created with New->R Markdown (the document in the screen capture was created this way). I've just tried again and reproduced it this way too. In my cases I've saved to a place other than my current working directory. Although I have also reproduced the issue with opening RStudio by opening the Rmd file via Finder as well.