From b0c1758c2ad4a614227f4eccf59807d53218084d Mon Sep 17 00:00:00 2001 From: Eric Schulte Date: Wed, 14 Oct 2009 16:03:13 -0600 Subject: [PATCH] org-babel: dot improvements for more information on the dot family of tools see http://www.graphviz.org/ --- contrib/babel/lisp/langs/org-babel-dot.el | 5 +++-- lisp/org-src.el | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/contrib/babel/lisp/langs/org-babel-dot.el b/contrib/babel/lisp/langs/org-babel-dot.el index ac6ec6a96..5f6c34896 100644 --- a/contrib/babel/lisp/langs/org-babel-dot.el +++ b/contrib/babel/lisp/langs/org-babel-dot.el @@ -57,10 +57,11 @@ called by `org-babel-execute-src-block'." (let ((result-params (split-string (or (cdr (assoc :results params)) ""))) (out-file (cdr (assoc :file params))) (cmdline (cdr (assoc :cmdline params))) + (cmd (or (cdr (assoc :cmd params)) "dot")) (in-file (make-temp-file "org-babel-dot"))) (with-temp-file in-file (insert body)) - (message (concat "dot " in-file " " cmdline " -o " out-file)) - (shell-command (concat "dot " in-file " " cmdline " -o " out-file)) + (message (concat cmd " " in-file " " cmdline " -o " out-file)) + (shell-command (concat cmd " " in-file " " cmdline " -o " out-file)) out-file)) (defun org-babel-prep-session:dot (session params) diff --git a/lisp/org-src.el b/lisp/org-src.el index 796e914ec..864697d1b 100644 --- a/lisp/org-src.el +++ b/lisp/org-src.el @@ -122,7 +122,7 @@ but which mess up the display of a snippet in Org exported files.") (defcustom org-src-lang-modes '(("ocaml" . tuareg) ("elisp" . emacs-lisp) ("ditaa" . artist) - ("asymptote" . asy)) + ("asymptote" . asy) ("dot" . fundamental)) "Alist mapping languages to their major mode. The key is the language name, the value is the string that should be inserted as the name of the major mode. For many languages this is