org-exp-blocks: deprecating begin_dot and begin_ditaa blocks, will be removed soon
* lisp/org-exp-blocks.el (org-export-blocks-format-ditaa): This function is begin deprecated in favor of begin_src blocks. (org-export-blocks-format-dot): This function is begin deprecated in favor of begin_src blocks.
This commit is contained in:
parent
840052b910
commit
f9c833dad0
|
@ -48,13 +48,15 @@
|
||||||
;;
|
;;
|
||||||
;;; Currently Implemented Block Types
|
;;; Currently Implemented Block Types
|
||||||
;;
|
;;
|
||||||
;; ditaa :: Convert ascii pictures to actual images using ditaa
|
;; ditaa :: (DEPRECATED--use "#+begin_src ditaa" code blocks) Convert
|
||||||
|
;; ascii pictures to actual images using ditaa
|
||||||
;; http://ditaa.sourceforge.net/. To use this set
|
;; http://ditaa.sourceforge.net/. To use this set
|
||||||
;; `org-ditaa-jar-path' to the path to ditaa.jar on your
|
;; `org-ditaa-jar-path' to the path to ditaa.jar on your
|
||||||
;; system (should be set automatically in most cases) .
|
;; system (should be set automatically in most cases) .
|
||||||
;;
|
;;
|
||||||
;; dot :: Convert graphs defined using the dot graphing language to
|
;; dot :: (DEPRECATED--use "#+begin_src dot" code blocks) Convert
|
||||||
;; images using the dot utility. For information on dot see
|
;; graphs defined using the dot graphing language to images
|
||||||
|
;; using the dot utility. For information on dot see
|
||||||
;; http://www.graphviz.org/
|
;; http://www.graphviz.org/
|
||||||
;;
|
;;
|
||||||
;; comment :: Wrap comments with titles and author information, in
|
;; comment :: Wrap comments with titles and author information, in
|
||||||
|
@ -218,11 +220,13 @@ which defaults to the value of `org-export-blocks-witheld'."
|
||||||
"Path to the ditaa jar executable.")
|
"Path to the ditaa jar executable.")
|
||||||
|
|
||||||
(defun org-export-blocks-format-ditaa (body &rest headers)
|
(defun org-export-blocks-format-ditaa (body &rest headers)
|
||||||
"Pass block BODY to the ditaa utility creating an image.
|
"DEPRECATED: use begin_src ditaa code blocks
|
||||||
|
|
||||||
|
Pass block BODY to the ditaa utility creating an image.
|
||||||
Specify the path at which the image should be saved as the first
|
Specify the path at which the image should be saved as the first
|
||||||
element of headers, any additional elements of headers will be
|
element of headers, any additional elements of headers will be
|
||||||
passed to the ditaa utility as command line arguments."
|
passed to the ditaa utility as command line arguments."
|
||||||
(message "ditaa-formatting...")
|
(message "begin_ditaa blocks are DEPRECATED, use begin_src blocks")
|
||||||
(let* ((args (if (cdr headers) (mapconcat 'identity (cdr headers) " ")))
|
(let* ((args (if (cdr headers) (mapconcat 'identity (cdr headers) " ")))
|
||||||
(data-file (make-temp-file "org-ditaa"))
|
(data-file (make-temp-file "org-ditaa"))
|
||||||
(hash (progn
|
(hash (progn
|
||||||
|
@ -241,6 +245,7 @@ passed to the ditaa utility as command line arguments."
|
||||||
(mapconcat (lambda (x) (substring x (if (> (length x) 1) 2 1)))
|
(mapconcat (lambda (x) (substring x (if (> (length x) 1) 2 1)))
|
||||||
(org-split-string body "\n")
|
(org-split-string body "\n")
|
||||||
"\n")))
|
"\n")))
|
||||||
|
(prog1
|
||||||
(cond
|
(cond
|
||||||
((or htmlp latexp docbookp)
|
((or htmlp latexp docbookp)
|
||||||
(unless (file-exists-p out-file)
|
(unless (file-exists-p out-file)
|
||||||
|
@ -262,13 +267,16 @@ passed to the ditaa utility as command line arguments."
|
||||||
(t (concat
|
(t (concat
|
||||||
"\n#+BEGIN_EXAMPLE\n"
|
"\n#+BEGIN_EXAMPLE\n"
|
||||||
body (if (string-match "\n$" body) "" "\n")
|
body (if (string-match "\n$" body) "" "\n")
|
||||||
"#+END_EXAMPLE\n")))))
|
"#+END_EXAMPLE\n")))
|
||||||
|
(message "begin_ditaa blocks are DEPRECATED, use begin_src blocks"))))
|
||||||
|
|
||||||
;;--------------------------------------------------------------------------------
|
;;--------------------------------------------------------------------------------
|
||||||
;; dot: create graphs using the dot graphing language
|
;; dot: create graphs using the dot graphing language
|
||||||
;; (require the dot executable to be in your path)
|
;; (require the dot executable to be in your path)
|
||||||
(defun org-export-blocks-format-dot (body &rest headers)
|
(defun org-export-blocks-format-dot (body &rest headers)
|
||||||
"Pass block BODY to the dot graphing utility creating an image.
|
"DEPRECATED: use \"#+begin_src dot\" code blocks
|
||||||
|
|
||||||
|
Pass block BODY to the dot graphing utility creating an image.
|
||||||
Specify the path at which the image should be saved as the first
|
Specify the path at which the image should be saved as the first
|
||||||
element of headers, any additional elements of headers will be
|
element of headers, any additional elements of headers will be
|
||||||
passed to the dot utility as command line arguments. Don't
|
passed to the dot utility as command line arguments. Don't
|
||||||
|
@ -284,7 +292,7 @@ digraph data_relationships {
|
||||||
\"data_requirement\" -> \"data_product\"
|
\"data_requirement\" -> \"data_product\"
|
||||||
}
|
}
|
||||||
#+end_dot"
|
#+end_dot"
|
||||||
(message "dot-formatting...")
|
(message "begin_dot blocks are DEPRECATED, use begin_src blocks")
|
||||||
(let* ((args (if (cdr headers) (mapconcat 'identity (cdr headers) " ")))
|
(let* ((args (if (cdr headers) (mapconcat 'identity (cdr headers) " ")))
|
||||||
(data-file (make-temp-file "org-ditaa"))
|
(data-file (make-temp-file "org-ditaa"))
|
||||||
(hash (progn
|
(hash (progn
|
||||||
|
@ -296,6 +304,7 @@ digraph data_relationships {
|
||||||
(match-string 2 raw-out-file))
|
(match-string 2 raw-out-file))
|
||||||
(cons raw-out-file "png")))
|
(cons raw-out-file "png")))
|
||||||
(out-file (concat (car out-file-parts) "_" hash "." (cdr out-file-parts))))
|
(out-file (concat (car out-file-parts) "_" hash "." (cdr out-file-parts))))
|
||||||
|
(prog1
|
||||||
(cond
|
(cond
|
||||||
((or htmlp latexp docbookp)
|
((or htmlp latexp docbookp)
|
||||||
(unless (file-exists-p out-file)
|
(unless (file-exists-p out-file)
|
||||||
|
@ -317,7 +326,8 @@ digraph data_relationships {
|
||||||
(t (concat
|
(t (concat
|
||||||
"\n#+BEGIN_EXAMPLE\n"
|
"\n#+BEGIN_EXAMPLE\n"
|
||||||
body (if (string-match "\n$" body) "" "\n")
|
body (if (string-match "\n$" body) "" "\n")
|
||||||
"#+END_EXAMPLE\n")))))
|
"#+END_EXAMPLE\n")))
|
||||||
|
(message "begin_dot blocks are DEPRECATED, use begin_src blocks"))))
|
||||||
|
|
||||||
;;--------------------------------------------------------------------------------
|
;;--------------------------------------------------------------------------------
|
||||||
;; comment: export comments in author-specific css-stylable divs
|
;; comment: export comments in author-specific css-stylable divs
|
||||||
|
|
Loading…
Reference in New Issue