ob-clojure: Normalize :show-process syntax

* lisp/ob-clojure.el (org-babel-execute:clojure): :show-process
  requires a non-nil (and non "no") value.
This commit is contained in:
Nicolas Goaziou 2016-11-19 07:39:05 +01:00
parent cd4186c5c3
commit 2c466ebff2
2 changed files with 4 additions and 4 deletions

View File

@ -43,7 +43,7 @@ To show that output you only have to specify the =:show-process=
option in the code block's header like this: option in the code block's header like this:
#+begin_example #+begin_example
,#+BEGIN_SRC clojure :results output :show-process ,#+BEGIN_SRC clojure :results output :show-process t
(dotimes [n 10] (dotimes [n 10]
(println n ".") (println n ".")
(Thread/sleep 500)) (Thread/sleep 500))

View File

@ -103,14 +103,14 @@ If the value is nil, timeout is disabled."
The underlying process performed by the code block can be output The underlying process performed by the code block can be output
using the :show-process parameter." using the :show-process parameter."
(let ((expanded (org-babel-expand-body:clojure body params)) (let ((expanded (org-babel-expand-body:clojure body params))
(show (assq :show-process params))
(response (list 'dict)) (response (list 'dict))
result) result)
(cl-case org-babel-clojure-backend (cl-case org-babel-clojure-backend
(cider (cider
(require 'cider) (require 'cider)
(let ((result-params (cdr (assq :result-params params)))) (let ((result-params (cdr (assq :result-params params)))
(if (not show) (show (cdr (assq :show-process params))))
(if (member show '(nil "no"))
;; Run code without showing the process. ;; Run code without showing the process.
(progn (progn
(setq response (setq response