1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-11-26 07:33:39 +00:00

now using org-babel-tangle-langs to track file extensions and shebang lines

This commit is contained in:
Eric Schulte 2009-06-15 15:25:46 -07:00
parent fdfe40d3c6
commit 1c1b40636a
6 changed files with 17 additions and 0 deletions

View File

@ -33,6 +33,8 @@
(org-babel-add-interpreter "R")
(add-to-list 'org-babel-tangle-langs '("R" "r"))
(defun org-babel-execute:R (body params)
"Execute a block of R code with org-babel. This function is
called by `org-babel-execute-src-block'."

View File

@ -33,6 +33,8 @@
(org-babel-add-interpreter "emacs-lisp")
(add-to-list 'org-babel-tangle-langs '("emacs-lisp" "el"))
(defun org-babel-execute:emacs-lisp (body params)
"Execute a block of emacs-lisp code with org-babel. This
function is called by `org-babel-execute-src-block'."

View File

@ -34,6 +34,8 @@
(org-babel-add-interpreter "python")
(add-to-list 'org-babel-tangle-langs '("python" "py" "#!/usr/bin/env python"))
(defun org-babel-execute:python (body params)
"Execute a block of Python code with org-babel. This function is
called by `org-babel-execute-src-block'."

View File

@ -34,6 +34,8 @@
(org-babel-add-interpreter "ruby")
(add-to-list 'org-babel-tangle-langs '("ruby" "rb" "#!/usr/bin/env ruby"))
(defun org-babel-execute:ruby (body params)
"Execute a block of Ruby code with org-babel. This function is
called by `org-babel-execute-src-block'."

View File

@ -34,6 +34,8 @@
(org-babel-add-interpreter "sh")
(add-to-list 'org-babel-tangle-langs '("sh" "sh" "#!/usr/bin/env sh"))
(defun org-babel-execute:sh (body params)
"Execute a block of Shell commands with org-babel. This
function is called by `org-babel-execute-src-block'."

View File

@ -31,5 +31,12 @@
;;; Code:
(require 'org-babel)
(defvar org-babel-tangle-langs nil
"Association list matching source-block languages. The car of
each element should be a string indicating the source block
language, and the cdr should be a list containing the extension
and shebang(#!) line to use when writing out the language to
file.")
(provide 'org-babel-tangle)
;;; org-babel-tangle.el ends here