lisp/my-markdown.el
author Fabien Ninoles <fabien@tzone.org>
Fri, 02 Jan 2015 21:50:10 -0500
changeset 8 0eae48be1d62
parent 1 a234a7579958
permissions -rw-r--r--
Add my.sloppy Deactivate shifty.sloppy and add my own sloppy (with timer). Also add some minor fixes and improvements.

(add-to-list 'auto-mode-alist '("\\.md$" . markdown-mode))

(setq ditaa-cmd "ditaa")
(defun ditaa-generate (start end)
  (interactive "r")
  (let ((tmpfile (make-temp-file "ditaa")))
    (write-region start end tmpfile)
    (shell-command
     (concat ditaa-cmd " " tmpfile " " (concat buffer-file-name ".png")))))

(provide 'my-markdown)