I often have Markdown text in my clipboard that I would like to insert into an org file. After pasting the text into my org-mode file, is there a quick way to convert it to org format? For example, invoke Pandoc on a selected region/subtree?
You can select the pasted-in region (if you do it right after you paste it in, it should already be marked) and then run
pandoc on the region with
C-u M-| pandoc -f markdown -t org RET. The prefix argument says: "replace the region with the output of the command". This is a bit fragile: if you mistype, you might end up with the region erased, but you can always paste it in and try again.
This function executes the same command of NickD's answer, without the risk of mistype.
(defun my-md-to-org-region (start end) "Convert region from markdown to org" (interactive "r") (shell-command-on-region start end "pandoc -f markdown -t org" t t))