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.
This commit is contained in:
parent
e0682619dd
commit
64bfa2d931
|
@ -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}).
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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 ()
|
||||
|
|
Loading…
Reference in New Issue