[OS X TeX] Sneep's TextWrangler script and CFURLGetFSRef

"Néstor E. Aguilera" nestoreaguilera at gmail.com
Tue Dec 15 22:36:34 CET 2015


> On 12 Dec 2015, at 22:41, Michael Sharpe <msharpe at ucsd.edu> wrote:
> 
> 
>> On Dec 12, 2015, at 1:40 PM, Néstor E. Aguilera <nestoreaguilera at gmail.com> wrote:
>> 
>> I have been using TextWrangler as editor with Skim as pdf viewer using Marteen Sneep's scripts for many yearse now.
>> 
>> I recently switched from Snow Leopard to El Capitan, and changed the original "/usr/texbin" to "/Library/TeX/texbin" in the script, as mentioned in this list (Richard Séguin and Herb Shulz on Sep 29).
>> 
>> The script works, but I get the message:
>> 
>>  CFURLGetFSRef was passed an URL which has no scheme (the URL will not work with other CFURL routines)
>> 
>> Does anyone know how to fix it?
> 
> The error message appears to be from osascript. The shell script CompileTeX-engine that Sneep's scripts call to do the real work make use of a number of osascript constructions, and it seems likely that one of those is the culprit. I can see how, in principle, how it might be happening (example below) but I can't see any errors in those osascript calls. (By the way, CFURLGetFSRef appears to be deprecated as of Mavericks.)
> 
> Example. I have an existing file named autoinst.log. I cd to its directory and type
> 
> osascript -e 'POSIX file "autoinst.log" as alias'
> 
> getting output
> 
> 2015-12-12 16:28:45.307 osascript[65080:1326705] CFURLGetFSRef was passed an URL which has no scheme (the URL will not work with other CFURL routines)
> alias Macintosh HD:Users:msharpe:fontstorage:MinionMyriad2015:Myriad:autoinst.log
> 
> The error message here is very similar to that from CompileTeX-engine, but an alias is indeed created.
> 
> On the other hand, if I use a full POSIX path and type
> 
> osascript -e 'POSIX file "/Users/msharpe/fontstorage/MinionMyriad2015/Myriad/autoinst.log" as alias'
> 
> no error message is produced and the output is simply
> 
> alias Macintosh HD:Users:msharpe:fontstorage:MinionMyriad2015:Myriad:autoinst.log
> 
> Michael

For future reference, I found that no "CFURLGetFSRef" message appears when using Maarten Sneep's scripts if

          previewUpdate "${masterdocname%%.tex}.pdf"

is changed to

          previewUpdate "${masterdoc%%.tex}.pdf"

As far as I can see, "masterdoc" is the full path name of "masterdocname", so Michael observation was to the point.

I guess the original script worked anyway since there is a "pushd" of "$masterdocdir" before compiling and viewing.

Nestor





More information about the macostex-archives mailing list