add "-o -" to asciidoc.py processor and now marked crashes

max.andersen's Avatar

max.andersen

05 Feb, 2013 11:29 AM

Hi,

I installed asciidoctor (gem install asciidoctor) and tried setting it up as a custom processor with the following settings:

program:
/opt/local/bin/asciidoc.py

arguments:
-o -

the -o - is so it dumps on standard out.

As soon as I pressed Save marked.app crashes and now when I started marked.app it crashes instantly.

Any ideas how I can get that fixed?

  1. Support Staff 1 Posted by Brett on 05 Feb, 2013 02:15 PM

    Brett's Avatar

    I'm not sure why this is happening, but the easiest answer may be to wrap
    asciidoc in a script with the necessary arguments and call that from Marked.

    Do you have a crash report for this in Console.app?

  2. 2 Posted by max.andersen on 05 Feb, 2013 02:26 PM

    max.andersen's Avatar

    I see this when starting marked.app:

    Feb 5 09:25:31 slowbeard.local Marked[40548]: Custom processor is available
    Feb 5 09:25:31 slowbeard.local Marked[40548]: Initial load from baseURL
    Feb 5 09:25:31 slowbeard.local Marked[40548]: Loading
    Feb 5 09:25:31 slowbeard.local Marked[40548]: contributing_to_jbosstools.md opened with encoding 4
    Feb 5 09:25:31 slowbeard.local Marked[40548]: Monitoring CSS
    Feb 5 09:25:31 slowbeard.local Marked[40548]: Using custom processor
    Feb 5 09:25:31 slowbeard.local Marked[40548]: Launching render task
    Feb 5 09:25:32 slowbeard com.apple.launchd.peruser.501273: Exited abnormally: Broken pipe: 13

    Can I somehow reset the settings by deleting/manipulating some settings file somewhere ?

  3. Support Staff 3 Posted by Brett on 05 Feb, 2013 02:32 PM

    Brett's Avatar

    You can delete the preference file at
    ~/Library/Preferences/com.brettterpstra.marky.plist and it should allow you
    to start Marked again. There should also be a series of ".crash" files in
    your Console.app left bar for Marked, if you could send me the most recent
    one of those it might help track the issue down.

  4. 4 Posted by max.andersen on 05 Feb, 2013 02:39 PM

    max.andersen's Avatar

    I'm not seeing any .crash files in console.app - sorry :(

    Do you know where on the filesystem they would be stored ?

    I did remove the .plist file and created a marked.sh with

    asciidoctor.py -o -

    and it failed in same way when trying to save :(

  5. 5 Posted by max.andersen on 05 Feb, 2013 02:42 PM

    max.andersen's Avatar

    I found system log mention a marked app crash file, i've attached it here.

  6. Support Staff 6 Posted by Brett on 05 Feb, 2013 02:43 PM

    Brett's Avatar

    Make sure your script has a hash bang line:

    #!/bin/bash

    And is set to executable.

    I'll do some testing on my end as well.

  7. 7 Posted by max.andersen on 05 Feb, 2013 02:45 PM

    max.andersen's Avatar

    hash bang doesn't make a difference and .sh was set to executable.

  8. Support Staff 8 Posted by Brett on 05 Feb, 2013 02:49 PM

    Brett's Avatar

    I'll get asciidoc installed and test, and will get back to you as soon as
    I'm able. Thanks for your patience.

  9. Support Staff 9 Posted by Brett on 05 Feb, 2013 02:53 PM

    Brett's Avatar

    Try it without the "-o". Just `asciidoc.py -`. Let me know if that helps at
    all. I note that asciidoc outputs a full HTML structure with scripts, which
    is problematic for Marked (it needs just a snippet so it can wrap the
    output in its own structure). You should at least be able to tell if it's
    working, though.

  10. 10 Posted by max.andersen on 05 Feb, 2013 02:57 PM

    max.andersen's Avatar

    At the moment marked.app just crashes no matter if I add -o - or not :(

  11. 11 Posted by max.andersen on 05 Feb, 2013 03:10 PM

    max.andersen's Avatar

    setting "asciidoc.py -" marked.app freezes.

  12. Support Staff 12 Posted by Brett on 05 Feb, 2013 03:14 PM

    Brett's Avatar

    Freezes as opposed to crashing? I think that's because of the output that
    asciidoc is creating, which just might not work with Marked. Is there a way
    to prevent asciidoc from generating all of the extra markup and just
    returning the HTML snippet for the passed text?

  13. 13 Posted by max.andersen on 05 Feb, 2013 04:07 PM

    max.andersen's Avatar

    yes freezing.

    and unfortunately no, asciidoc seem to just dump out full docs ;(

  14. 14 Posted by jorge.cangas on 23 Dec, 2015 12:23 AM

    jorge.cangas's Avatar

    I get asccidoctor works with marked 2. In Args, I write

    -b html5 --out-file - -

    note the extra -

  15. 15 Posted by Max on 24 Jan, 2016 09:27 AM

    Max's Avatar

    I tried now again but I keep being told my asciidoctor process is not executable even though it is ;/

  16. Support Staff 16 Posted by Brett on 24 Jan, 2016 02:20 PM

    Brett's Avatar

    what if you add `-o - -` with the extra dash?

    If you're on the MAS version, you'll also have better luck setting the
    processor path to `/usr/bin/python` and the args to the actual path to
    asciidoc.py With my brew installation, this path is a symlink that leads
    to `/usr/local/Cellar/asciidoc/8.6.9/bin/asciidoc.py`. Adding '-o - -'
    works for me.

  17. 17 Posted by Max on 03 Feb, 2016 07:56 AM

    Max's Avatar

    I'm using asciidoctor (not the old asciidoc ;), but your tip got me further.

    It seem I *have* to use the systems ruby at (/usr/bin/ruby) and can't use my user installed ruby at /Users/me/.rvm/rubies/ruby-1.9.3-p547/bin/ruby

    MAS apps don't have access to execute files from user dir ? If that is the case it might be good to check for that because the UI feels like "blocking" when it pops up the suggestion to mark it executable but does never go away.

  18. Support Staff 18 Posted by Brett on 03 Feb, 2016 03:40 PM

    Brett's Avatar

    This is a new issue in the MAS version on 10.11 (SIP). I'm working on
    either a workaround or a better notification/documentation system for
    it.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac