summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Schulte <schulte.eric@gmail.com>2013-04-03 07:41:05 -0600
committerEric Schulte <schulte.eric@gmail.com>2013-04-03 09:17:00 -0600
commit2f39a704cfc56083ad1568fae9f3a5352145629e (patch)
treebfa0694c63feda830b754fe7d0b87e3ed1192b22
parent04b13a0e0ea00295d140463db34f2875e835e2f4 (diff)
downloadorg-mode-2f39a704cfc56083ad1568fae9f3a5352145629e.tar.gz
removing alternate code block variable syntax
* doc/org.texi (var): Remove the "Alternate argument syntax" section from the documentation. * lisp/ob-core.el (org-babel-src-name-w-name-regexp): Update the regexp used to match code block names. (org-babel-get-src-block-info): Remove the code used to parse this alternate variable specification syntax.
-rw-r--r--doc/org.texi13
-rw-r--r--lisp/ob-core.el18
2 files changed, 2 insertions, 29 deletions
diff --git a/doc/org.texi b/doc/org.texi
index 6791570..3d8afe7 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -13327,19 +13327,6 @@ on two lines
@end table
-@subsubheading Alternate argument syntax
-It is also possible to specify arguments in a potentially more natural way
-using the @code{#+NAME:} line of a code block. As in the following
-example, arguments can be packed inside of parentheses, separated by commas,
-following the source name.
-
-@example
-#+NAME: double(input=0, x=2)
-#+BEGIN_SRC emacs-lisp
-(* 2 (+ input x))
-#+END_SRC
-@end example
-
@subsubheading Indexable variable values
It is possible to reference portions of variable values by ``indexing'' into
the variables. Indexes are 0 based with negative values counting back from
diff --git a/lisp/ob-core.el b/lisp/ob-core.el
index 723aa9d..433ce9b 100644
--- a/lisp/ob-core.el
+++ b/lisp/ob-core.el
@@ -170,7 +170,7 @@ See also `org-babel-noweb-wrap-start'."
"\\("
org-babel-multi-line-header-regexp
"\\)*"
- "\\([^ ()\f\t\n\r\v]+\\)\\(\(\\(.*\\)\)\\|\\)")
+ "\\([^ ()\f\t\n\r\v]+\\)")
"Regular expression matching source name lines with a name.")
(defvar org-babel-src-block-regexp
@@ -261,21 +261,7 @@ Returns a list
(nth 2 info)
(org-babel-parse-header-arguments (match-string 1)))))
(when (looking-at org-babel-src-name-w-name-regexp)
- (setq name (org-no-properties (match-string 3)))
- (when (and (match-string 5) (> (length (match-string 5)) 0))
- (setf (nth 2 info) ;; merge functional-syntax vars and header-args
- (org-babel-merge-params
- (mapcar
- (lambda (ref) (cons :var ref))
- (mapcar
- (lambda (var) ;; check that each variable is initialized
- (if (string-match ".+=.+" var)
- var
- (error
- "variable \"%s\"%s must be assigned a default value"
- var (if name (format " in block \"%s\"" name) ""))))
- (org-babel-ref-split-args (match-string 5))))
- (nth 2 info))))))
+ (setq name (org-no-properties (match-string 3)))))
;; inline source block
(when (org-babel-get-inline-src-block-matches)
(setq info (org-babel-parse-inline-src-block-match))))