Преглед изворни кода

ob-clojure: Normalize :show-process syntax

* lisp/ob-clojure.el (org-babel-execute:clojure): :show-process
  requires a non-nil (and non "no") value.
Nicolas Goaziou пре 8 година
родитељ
комит
2c466ebff2
2 измењених фајлова са 4 додато и 4 уклоњено
  1. 1 1
      etc/ORG-NEWS
  2. 3 3
      lisp/ob-clojure.el

+ 1 - 1
etc/ORG-NEWS

@@ -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:
 
 #+begin_example
-,#+BEGIN_SRC clojure :results output :show-process
+,#+BEGIN_SRC clojure :results output :show-process t
   (dotimes [n 10]
     (println n ".")
     (Thread/sleep 500))

+ 3 - 3
lisp/ob-clojure.el

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