I started noticing recently that selecting an AppleScript in various places (Xcode, Quicksilver, Finder, Path Finder) will hang the foreground application in question.
Before the hang, I always see garbage (the raw text) in the Quick Look preview. I’m pretty sure TextMate is attempting to generate the previews in this case. (AppleScript claims to be `public.source-code`, and TextMate’s Quick Look generator claims to be able to handle that.)
Can anyone confirm? Is it possible for the Quick Look generator to ignore AppleScript?
On Sep 24, 2015, at 7:35 PM, Rob McBroom mailinglist0@skurfer.com wrote:
I started noticing recently that selecting an AppleScript in various places (Xcode, Quicksilver, Finder, Path Finder) will hang the foreground application in question.
Can you give actual instructions for reproducing this? I don't see what you mean. m.
-- matt neuburg, phd = http://www.apeth.net/matt/ pantes anthropoi tou eidenai oregontai phusei Programming iOS 9! http://shop.oreilly.com/product/0636920044352.do iOS 9 Fundamentals! http://shop.oreilly.com/product/0636920044345.do RubyFrontier! http://www.apeth.com/RubyFrontierDocs/default.html
On 25 Sep 2015, at 11:23, Matt Neuburg wrote:
Can you give actual instructions for reproducing this? I don't see what you mean. m.
1. Go to ~/Library/Scripts or some location that contains an AppleScript file. 2. Select an AppleScript. 3. Hit Space or ⌘Y to Quick Look it. (Or, if in Column view, you will already see the problem before you get the chance.)
Thanks for the instructions. I followed them. They worked fine. I have enclosed a screen shot (not sure what happens when you send an attachment to the list, so contact me offlist if you need a separate copy).
I have TextMate, same as you, so I would suggest that TextMate is not the cause of whatever problem you are having.
m.
On Sep 25, 2015, at 10:47 AM, Rob McBroom mailinglist0@skurfer.com wrote:
On 25 Sep 2015, at 11:23, Matt Neuburg wrote:
Can you give actual instructions for reproducing this? I don't see what you mean. m.
- Go to ~/Library/Scripts or some location that contains an AppleScript file.
- Select an AppleScript.
- Hit Space or ⌘Y to Quick Look it. (Or, if in Column view, you will already see the problem before you get the chance.)
-- Rob McBroom http://www.skurfer.com/
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
-- matt neuburg, phd = http://www.apeth.net/matt/ pantes anthropoi tou eidenai oregontai phusei Programming iOS 9! http://shop.oreilly.com/product/0636920044352.do iOS 9 Fundamentals! http://shop.oreilly.com/product/0636920044345.do RubyFrontier! http://www.apeth.com/RubyFrontierDocs/default.html
On 25 Sep 2015, at 14:20, Matt Neuburg wrote:
Thanks for the instructions. I followed them. They worked fine. I have enclosed a screen shot (not sure what happens when you send an attachment to the list, so contact me offlist if you need a separate copy).
That’s what I’d like to see. I’ve attached what I get instead.
I have TextMate, same as you, so I would suggest that TextMate is not the cause of whatever problem you are having.
Temporarily removing TextMate fixes the problem (showing a generic AppleScript icon instead of a “preview” and hanging), so I’m pretty sure it’s related.
I wonder if you have something else rendering AppleScript previews? `qlmanage -m` can tell you what handles what.
Thanks.
On Sep 25, 2015, at 11:52 AM, Rob McBroom mailinglist0@skurfer.com wrote:
I wonder if you have something else rendering AppleScript previews? `qlmanage -m` can tell you what handles what.
Wow, cool! I had no idea about that command.
Yes, I do: it's Script Debugger. So I'm no help to you after all. Sorry about that. :( m.
-- matt neuburg, phd = http://www.apeth.net/matt/ pantes anthropoi tou eidenai oregontai phusei Programming iOS 9! http://shop.oreilly.com/product/0636920044352.do iOS 9 Fundamentals! http://shop.oreilly.com/product/0636920044345.do RubyFrontier! http://www.apeth.com/RubyFrontierDocs/default.html
On Sep 25, 2015, at 12:06 PM, Matt Neuburg matt@tidbits.com wrote:
Yes, I do: it's Script Debugger. So I'm no help to you after all. Sorry about that. :( m.
Maybe I can help after all. I tried this on another computer and I do see the script bytecode directly in the QL preview, as you do. TextMate should certainly not pretend to be able to QL a `.scpt` file (bytecode, com.apple.applescript.script). It can QL a `.applescript` file, I suppose, because that is just text.
m.
-- matt neuburg, phd = http://www.apeth.net/matt/ pantes anthropoi tou eidenai oregontai phusei Programming iOS 9! http://shop.oreilly.com/product/0636920044352.do iOS 9 Fundamentals! http://shop.oreilly.com/product/0636920044345.do RubyFrontier! http://www.apeth.com/RubyFrontierDocs/default.html
On 25 Sep 2015, at 15:35, Matt Neuburg wrote:
Maybe I can help after all.
You have helped by pointing me to another Quick Look generator I could install to make AppleScripts look nice. But that doesn’t address the underlying problem.
TextMate should certainly not pretend to be able to QL a `.scpt` file (bytecode, com.apple.applescript.script).
No, but like I said in the original message, it’s because AppleScripts have `public.source-code` in their UTI tree. I think it’s perfectly reasonable for TextMate to claim support for that.
Whether or not AppleScript should list that UTI is irrelevant, because we’re unlikely to change it. But I wonder if, knowing that Apple has done this, TextMate could ignore AppleScript in its QL generator.
On 26 Sep 2015, at 2:57, Rob McBroom wrote:
Whether or not AppleScript should list that UTI is irrelevant, because we’re unlikely to change it. But I wonder if, knowing that Apple has done this, TextMate could ignore AppleScript in its QL generator.
I’ll add code to next build so that TextMate detects these binary files and uses OSAKit to decompile them before generating the preview.
I think this is the best we can do, i.e. no way to declare an exception for AppleScript in the UTI list and no way to have the code abort the preview and rely on the system trying “next generator”.
On 30 Sep 2015, at 11:53, Allan Odgaard wrote:
I’ll add code to next build so that TextMate detects these binary files and uses OSAKit to decompile them before generating the preview.
Sounds great. Thanks!
I think this is the best we can do, i.e. no way to declare an exception for AppleScript in the UTI list and no way to have the code abort the preview and rely on the system trying “next generator”.
You could always list each specific UTI for every type of text-based script on the planet. So there’s a way, just not a sane one. 😐
Can you tell us which generator is chosen by QuickLook ? (qlmanage -pd1 should get you that info)
I see the same thing that Matt sees here, mine being specifically a thumbnail generated from Script Debugger QL generator.
Fiddling a little more by forcing TM to generate the preview, here's what I get :
But I can't get any hiccup here...
Regards, Etienne Samson -- samson.etienne@gmail.com
Le 25 sept. 2015 à 20:20, Matt Neuburg matt@tidbits.com a écrit :
Thanks for the instructions. I followed them. They worked fine. I have enclosed a screen shot (not sure what happens when you send an attachment to the list, so contact me offlist if you need a separate copy).
I have TextMate, same as you, so I would suggest that TextMate is not the cause of whatever problem you are having.
m.
<Screen Shot 2015-09-25 at 11.19.14 AM.png>
On Sep 25, 2015, at 10:47 AM, Rob McBroom mailinglist0@skurfer.com wrote:
On 25 Sep 2015, at 11:23, Matt Neuburg wrote:
Can you give actual instructions for reproducing this? I don't see what you mean. m.
- Go to ~/Library/Scripts or some location that contains an AppleScript file.
- Select an AppleScript.
- Hit Space or ⌘Y to Quick Look it. (Or, if in Column view, you will already see the problem before you get the chance.)
-- Rob McBroom http://www.skurfer.com/
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
-- matt neuburg, phd = http://www.apeth.net/matt/ pantes anthropoi tou eidenai oregontai phusei Programming iOS 9! http://shop.oreilly.com/product/0636920044352.do iOS 9 Fundamentals! http://shop.oreilly.com/product/0636920044345.do RubyFrontier! http://www.apeth.com/RubyFrontierDocs/default.html
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate