toland / qlmarkdown

QuickLook generator for Markdown files.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OS X 10.7.4 broken

ngemily opened this issue · comments

Hi, I'd love to have this plugin. I've tried

  • compiling from source
  • extracting precompiled
  • into ~/Library/QuickLook
  • and /Library/QuickLook
  • rebooting machine, relaunching Finder

but QuickLook still shows the plaintext *.md

I'm on 1.7.4 and it's working fine.
Just making sure you ran the qlmanage -r command after putting it in the 'QuickLook' directory?
Also if you have QLStephen (a plaintext quick look plugin) that it is not overriding QLMarkdown and making it display as plaintext.

Yep, ran that from zsh
And I do not have QLSteven

If you run the following, it will show you what Quicklook generators are registered, and what one is being used:

$ echo "* test" > test.md
$ qlmanage -p -d 1 test.md

You should see something like:

[DEBUG] Previewing file://localhost/Users/dbr/test.md. Content type UTI: net.daringfireball.markdown. Generator used: <QLGenerator /Users/dbr/Library/Quicklook/QLMarkdown.qlgenerator>

You can also change -d 1 to -d 4 and it lists all available QLGenerators, an what UTI they are registered for

okay, it's trying to use the qlgenerator packaged with iA Writer

Sweet
Had to compile it myself from xcode for 64bit version but cool. I've replaced the iA Writer version with that.
I didn't realize how to use debug mode earlier. Thanks for all the speedy help!

Hi,
It seems I'm having the same trouble with iA Writter qlgenerator.
Just wondering how to choose the generator to use when multiple avaliable?
@ngemily did you simply override iA Writer one with toland 's one?

yup, I just replaced iA's files with toland's

If you want to keep iA's generator for other stuff, you could try editing it's Info.plist

Assuming it's an non-binary plist, opening it in a text-editor and remove the lines that look like these, leaving the extensions you still want iA to handle.

If it's a binary plist, you need to edit it with the Plist-editor application from Xcode

If the app bundle is signed, it might cause problems

Hm, I wonder if the location of the generators dictates priority? E.g if you put qlmarkdown in ~/Library/QuickLook and move iA's to /Library/QuickLook, will qlmarkdown override? Might be worth testing first (remembering to run qlmanage -r first)

Thanks for the quick answer @ngemily

@dbr thanks for the tips, I did edit the Info.plist and removed the lines you mentioned, then qlmanage -r and killall Finder. Still iA Writer's QL generator used. Then I tried to move this generator to /Library/QuickLook having qlmarkdown in ~/Library/QuickLook/ and guess what, it works!

I'll go with this solution even if I think there should exist a way to "rank" qlgenerators when multiple available for a file type.

Thanks again!

Editing should have worked, but it's possible that qlmanage -r doesn't fully refresh it..

..but moving them around is a "better" (if not ideal) solution, as this StackOverflow answer confirms (the qlgenerators are ranked based on their location, and if there is multiple in the same location, the chosen one is kind of random)

Thanks for this information!