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

"Néstor E. Aguilera" nestoreaguilera at gmail.com
Sun Dec 13 12:36:25 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

Thanks Michael!

I saw similar explanations googling, but I am not savvy enough to fix Maarten's script.

Interestingly, if the .tex file has an error the script points to the error line/s, but no "CFURLGetFSRef" message appears.

My guess is that when no tex error appears the pdf file is opened bringing up the "CFURLGetFSRef" message. However, once it has been tex compiled with no errors,  opening the pdf file from the tex source with the script does not produce the messaage.

Finally, I cannot see why being deprecated it is used by (the presumably recent version of) osascript anyway.

Oh well... as long as it works...

Thanks again.

Nestor







More information about the macostex-archives mailing list