summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfpi2018-04-12 03:37:14 +0200
committerfpi2018-04-12 12:46:24 +0200
commitc7d7dcf7b4943bc38dab8c0a4c0d081f615af959 (patch)
tree0ddb767bdf00dae112d4dd5e30fcc974926fd549
parentAdded support for output and value :results flags (diff)
Comma separated results returned as list if :results value
Bug: last command executed twice (due to !!) if not an echo
-rw-r--r--ob-spice.org11
1 files changed, 6 insertions, 5 deletions
diff --git a/ob-spice.org b/ob-spice.org
index 5a96fb2..b95620a 100644
--- a/ob-spice.org
+++ b/ob-spice.org
@@ -294,12 +294,13 @@ Access with ~$x[0]~ or ~$x[2-len]~.
(format "echo \"%s\"" org-babel-spice-eoe-indicator)
)))
(comint-send-input nil t))
- (org-babel-eval-read-file tmp-file))
- )
+ ;; split result to output multiple comma separated vars as table
+ (split-string (org-babel-eval-read-file tmp-file) ",")
+ ))
;;todo: add "smart" result type to display measurements (or echos?) & plot filenames
)))
- (provide 'ob-spice-exp)
+ (provide 'ob-spice-exp)
;;; ob-spice.el ends here
#+END_SRC
@@ -330,12 +331,12 @@ echo "Hello World"
meas tran value_at_five_tau find V(1) at=5e-8
echo value_at_tau = "$&value_at_tau" > $file.txt
,* Any better way to write one value of vector to a file??
- echo value_at_five_tau = "$&value_at_five_tau"
+ echo $&value_at_tau ,$&value_at_five_tau
.endc
#+END_SRC
#+RESULTS:
-: value_at_five_tau = 0.00671732
+| 0.36798 | 0.00671732 |
#+BEGIN_SRC spice-exp :var file="/tmp/spice_test2" :session spicetest :results output
,*Virtual Ground Test: opamp gain = 1000