summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2017-08-26 10:32:26 +0200
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2017-08-26 10:32:26 +0200
commit64bfa2d931c6370eb114cddf4b2815813f65de70 (patch)
treea62c72c021a14fb11db35b14bbefebd3408534ee
parente0682619dd59bec1ed145f66f0ae03f5fbeaca5c (diff)
downloadorg-mode-64bfa2d931c6370eb114cddf4b2815813f65de70.tar.gz
Remove `inline-only' option for `org-export-use-babel'
* lisp/ob-exp.el (org-export-use-babel): Remove `inline-only' option. (org-babel-exp-process-buffer): Ignore `inline-only' value. * doc/org.texi (Exporting code blocks): Remove documentation. * testing/lisp/test-ob-exp.el (ob-export/babel-evaluate): Remove tests.
-rw-r--r--doc/org.texi6
-rw-r--r--etc/ORG-NEWS4
-rw-r--r--lisp/ob-exp.el12
-rw-r--r--testing/lisp/test-ob-exp.el17
4 files changed, 8 insertions, 31 deletions
diff --git a/doc/org.texi b/doc/org.texi
index c391c8a..1871462 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -15346,12 +15346,6 @@ during export, to allow evaluation of just the header arguments but not any
code evaluation in the source block, set @code{:eval never-export}
(@pxref{eval}).
-To evaluate just the inline code blocks, set @code{org-export-babel-evaluate}
-to @code{inline-only}. Isolating the option to allow inline evaluations
-separate from @samp{src} code block evaluations during exports is not for
-security but for avoiding any delays due to recalculations, such as calls to
-a remote database.
-
Org never evaluates code blocks in commented sub-trees when exporting
(@pxref{Comment lines}). On the other hand, Org does evaluate code blocks in
sub-trees excluded from export (@pxref{Export settings}).
diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index 1901c29..9f3e624 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -405,6 +405,10 @@ equivalent to the removed format string.
Setting it to a ~nil~ value broke some other features (e.g., speed
keys).
+*** ~org-export-use-babel~ cannot be set to ~inline-only~
+
+The variable is now a boolean.
+
*** ~org-texinfo-def-table-markup~ is obsolete
Use ~org-texinfo-table-default-markup~ instead.
diff --git a/lisp/ob-exp.el b/lisp/ob-exp.el
index d966cd9..8da4d5c 100644
--- a/lisp/ob-exp.el
+++ b/lisp/ob-exp.el
@@ -41,14 +41,12 @@
(defcustom org-export-use-babel t
"Switch controlling code evaluation and header processing during export.
When set to nil no code will be evaluated as part of the export
-process and no header arguments will be obeyed. When set to
-`inline-only', only inline code blocks will be executed. Users
-who wish to avoid evaluating code on export should use the header
-argument `:eval never-export'."
+process and no header arguments will be obeyed. Users who wish
+to avoid evaluating code on export should use the header argument
+`:eval never-export'."
:group 'org-babel
:version "24.1"
:type '(choice (const :tag "Never" nil)
- (const :tag "Only inline code" inline-only)
(const :tag "Always" t))
:safe #'null)
@@ -132,9 +130,7 @@ this template."
(when org-export-use-babel
(save-window-excursion
(let ((case-fold-search t)
- (regexp (if (eq org-export-use-babel 'inline-only)
- "\\(call\\|src\\)_"
- "\\(call\\|src\\)_\\|^[ \t]*#\\+\\(BEGIN_SRC\\|CALL:\\)"))
+ (regexp "\\(call\\|src\\)_\\|^[ \t]*#\\+\\(BEGIN_SRC\\|CALL:\\)")
;; Get a pristine copy of current buffer so Babel
;; references are properly resolved and source block
;; context is preserved.
diff --git a/testing/lisp/test-ob-exp.el b/testing/lisp/test-ob-exp.el
index 7f375ef..fc67c4f 100644
--- a/testing/lisp/test-ob-exp.el
+++ b/testing/lisp/test-ob-exp.el
@@ -546,23 +546,6 @@ src_emacs-lisp{(+ 1 1)}"
(org-test-with-temp-text
"src_emacs-lisp{(+ 1 1)}"
(let ((org-export-use-babel t)) (org-babel-exp-process-buffer))
- (buffer-string))))
- ;; When set to `inline-only' limit evaluation to inline code.
- (should-not
- (string-match-p
- "2"
- (org-test-with-temp-text
- "#+BEGIN_SRC emacs-lisp :exports results\n(+ 1 1)\n#+END_SRC"
- (let ((org-export-use-babel 'inline-only))
- (org-babel-exp-process-buffer))
- (buffer-string))))
- (should
- (string-match-p
- "2"
- (org-test-with-temp-text
- "src_emacs-lisp{(+ 1 1)}"
- (let ((org-export-use-babel 'inline-only))
- (org-babel-exp-process-buffer))
(buffer-string)))))
(ert-deftest ob-export/body-with-coderef ()