;;; ob-core.el --- working with code blocks in org-mode
-;; Copyright (C) 2009-2015 Free Software Foundation, Inc.
+;; Copyright (C) 2009-2016 Free Software Foundation, Inc.
;; Authors: Eric Schulte
;; Dan Davison
Do not query the user."
(org-babel-check-confirm-evaluate info
(not (when noeval
- (message (format "Evaluation of this%scode-block%sis disabled."
- code-block block-name))))))
+ (message "Evaluation of this%scode-block%sis disabled."
+ code-block block-name)))))
;; dynamically scoped for asynchronous export
(defvar org-babel-confirm-evaluate-answer-no)
(yes-or-no-p
(format "Evaluate this%scode block%son your system? "
code-block block-name)))
- (message (format "Evaluation of this%scode-block%sis aborted."
- code-block block-name)))))))
+ (message "Evaluation of this%scode-block%sis aborted."
+ code-block block-name))))))
;;;###autoload
(defun org-babel-execute-safely-maybe ()
(defvar org-babel-result-w-name-regexp
(concat org-babel-result-regexp
- "\\([^ ()\f\t\n\r\v]+\\)\\(\(\\(.*\\)\)\\|\\)"))
+ "\\([^ ()\f\t\n\r\v]+\\)\\((\\(.*\\))\\|\\)"))
(defvar org-babel-min-lines-for-block-output 10
"The minimum number of lines for block output.
ALTS is a cons of two character options where each option may be
either the numeric code of a single character or a list of
character alternatives. For example to split on balanced
-instances of \"[ \t]:\" set ALTS to '((32 9) . 58)."
+instances of \"[ \t]:\" set ALTS to ((32 9) . 58)."
(let* ((matches (lambda (ch spec) (if (listp spec) (member ch spec) (equal spec ch))))
(matched (lambda (ch last)
(if (consp alts)
;; row and column names
(defun org-babel-del-hlines (table)
- "Remove all 'hlines from TABLE."
+ "Remove all `hline's from TABLE."
(remove 'hline table))
(defun org-babel-get-colnames (table)
(if point
;; taken from `org-open-at-point'
(progn (org-mark-ring-push) (goto-char point) (org-show-context))
- (message "source-code block '%s' not found in this buffer" name))))
+ (message "source-code block `%s' not found in this buffer" name))))
(defun org-babel-find-named-block (name)
"Find a named source-code block.
(if point
;; taken from `org-open-at-point'
(progn (goto-char point) (org-show-context))
- (message "result '%s' not found in this buffer" name))))
+ (message "result `%s' not found in this buffer" name))))
(defun org-babel-find-named-result (name &optional point)
"Find a named result.
"Make true to capitalize begin/end example markers inserted by code blocks.")
(defun org-babel-examplize-region (beg end &optional results-switches)
- "Comment out region using the inline '==' or ': ' org example quote."
+ "Comment out region using the inline `==' or `: ' org example quote."
(interactive "*r")
(let ((chars-between (lambda (b e)
(not (string-match "^[\\s]*$" (buffer-substring b e)))))
"Expand Noweb references in the body of the current source code block.
For example the following reference would be replaced with the
-body of the source-code block named 'example-block'.
+body of the source-code block named `example-block'.
<<example-block>>
the source-code block which holds BODY.
In addition the following syntax can be used to insert the
-results of evaluating the source-code block named 'example-block'.
+results of evaluating the source-code block named `example-block'.
<<example-block()>>
(setq index (point))
(while (and (re-search-forward (org-babel-noweb-wrap) nil t))
(save-match-data (setf source-name (match-string 1)))
- (save-match-data (setq evaluate (string-match "\(.*\)" source-name)))
+ (save-match-data (setq evaluate (string-match "(.*)" source-name)))
(save-match-data
(setq prefix
(buffer-substring (match-beginning 0)
(defun org-babel-read (cell &optional inhibit-lisp-eval)
"Convert the string value of CELL to a number if appropriate.
Otherwise if cell looks like lisp (meaning it starts with a
-\"(\", \"'\", \"\\=`\" or a \"[\") then read it as lisp,
+\"(\", \"\\='\", \"\\=`\" or a \"[\") then read it as lisp,
otherwise return it unmodified as a string. Optional argument
NO-LISP-EVAL inhibits lisp evaluation for situations in which is
it not appropriate."