Macdown as external editor on CLI?

Hi All - Very much enjoying my first week with Joplin, lokoing forward to digging into the code and potentially contributing.

I’m writing to ask about using MacDown as an external editor from the CLI version. I have configured MacDown to open without issue, but the tmp file created in the process is always empty. Using subl or vim works fine, and using MacDown as an external editor from the Desktop app work fine, as well.

Any guidance appreciated - I’ll use subl in the meantime. b

Ok - found an answer to my own question: :config editor “open -a MacDown” works in the CLI, but config editor “/usr/local/bin/macdown” does not. So - mark this resolved, and maybe someone else will have the same question down the road.

1 Like

Ok - scratch that. It doesn’t work reliably - there seems to be some state set when I run it from the mac desktop app. I can get repro steps together if it’s helpful, but I’m unsure what the success case should be - which of the following paths should I set in :config editor:

  1. /usr/local/bin/macdown
  2. ‘open -a /Applications/’
  3. /Applications/

re: #3 - I read in another forum post on Typora (External editor opened in background) that “Normally Joplin supports .app packages directly.”

Also: I ran the CLI in debug mode but didn’t see anything in log.txt related to opening macdown - just track UI interaction.

Thanks in advance - b

Did you try setting just /Applications/ (without the open -a) The comment about Typora applied to the desktop version but the CLI works a bit differently.

Thanks for the reply. Yes this works, and has the same behavior I saw described in that Typora thread - editor is behind the other windows, easy to work around though. Thanks again!