Browse Source

org-babel: added "table" results header argument as more readable alias for "vector"

Eric Schulte 15 years ago
parent
commit
4abe8f7ea0
1 changed files with 5 additions and 3 deletions
  1. 5 3
      contrib/babel/lisp/org-babel.el

+ 5 - 3
contrib/babel/lisp/org-babel.el

@@ -260,7 +260,7 @@ results already exist."
   "Process returned value for insertion in buffer.
   "Process returned value for insertion in buffer.
 
 
 Currently, this function forces to table output if :results
 Currently, this function forces to table output if :results
-vector has been supplied.
+table or :results vector has been supplied.
 
 
   You can see below the various fragments of results-processing
   You can see below the various fragments of results-processing
 code that were present in the language-specific files. Out of
 code that were present in the language-specific files. Out of
@@ -270,7 +270,9 @@ org-babel-*-evaluate functions. I think those should only be used
 in the :results value case, as in the 'output case we are not
 in the :results value case, as in the 'output case we are not
 concerned with creating elisp versions of results. "
 concerned with creating elisp versions of results. "
 
 
-  (if (and (member "vector" result-params) (not (listp result)))
+  (if (and (or (member "vector" result-params)
+               (member "table" result-params))
+           (not (listp result)))
       (list (list result))
       (list (list result))
     result))
     result))
 
 
@@ -667,7 +669,7 @@ elements of PLISTS override the values of previous element.  This
 takes into account some special considerations for certain
 takes into account some special considerations for certain
 parameters when merging lists."
 parameters when merging lists."
   (let ((results-exclusive-groups
   (let ((results-exclusive-groups
-	 '(("file" "vector" "scalar" "raw" "org" "html" "latex" "code")
+	 '(("file" "vector" "table" "scalar" "raw" "org" "html" "latex" "code")
 	   ("replace" "silent")
 	   ("replace" "silent")
 	   ("output" "value")))
 	   ("output" "value")))
 	params results exports tangle vars var ref)
 	params results exports tangle vars var ref)