Add narf:org-export (and for markdown-mode too)

This commit is contained in:
Henrik Lissner 2015-11-17 02:10:49 -05:00
parent c1147e912b
commit 2a1809cf63
2 changed files with 33 additions and 17 deletions

View file

@ -226,6 +226,17 @@ COUNT-FOOTNOTES? is non-nil."
(t (copy-file link new-path)))
(insert (format "[[./%s]]" (abbreviate-file-name new-path))))))
;;;###autoload (autoload 'narf:org-export "defuns-org" nil t)
(evil-define-command narf:org-export (dest)
(interactive "<a>")
(let ((path (if (string-match-p "^[/~]" dest)
dest
(expand-file-name dest default-directory))))
(shell-command
(format "/usr/local/bin/pandoc '%s' -o '%s'"
(buffer-file-name) path))
(message "Done! Exported to: %s" path)))
;;;###autoload
(defun narf/org-remove-link ()
"Replace an org link by its description or if empty its address"