Re: [O] Babel evaluation of Calc block not working, bug in Calc?
Andrea Rossetti writes: >> PS: Are you using Calc regularly? > Compact answer: no :( > Detailed answer: I do like Calc and Org+Babel+Calc, > but my daily job doesn't involve any maths. Then it's understandable, the UI of Calc is very fast but also very, very abstract. My hope is that with the Babel interface Calc can get a push. There is some potential, although it remains a lot to improve to have a workable computer algebra system (CAS) in the line of Maxima, Maple, Mathematica et al. :-| > The Org functions I use most frequently are: > - org-clock-in, org-clock-out, agenda view > - org-columns > - simple exports of TODOs or clocktable in HTML > or PDF format That is the strength of Org-mode: The combination of code and beautiful documentation. :-D Dieter -- Best wishes H. Dieter Wilhelm Darmstadt, Germany
Re: [O] Babel evaluation of Calc block not working, bug in Calc?
Hi Dieter, die...@duenenhof-wilhelm.de (H. Dieter Wilhelm) writes: > PS: Are you using Calc regularly? Compact answer: no :( Detailed answer: I do like Calc and Org+Babel+Calc, but my daily job doesn't involve any maths. The Org functions I use most frequently are: - org-clock-in, org-clock-out, agenda view - org-columns - simple exports of TODOs or clocktable in HTML or PDF format Kindest regards, Andrea
Re: [O] Babel evaluation of Calc block not working, bug in Calc?
Hello Andrea 8-) Andrea Rossetti writes: > Andrea Rossetti writes: >> 3) temporary workaround: try to change ":var v=3" into ":var var-v=3", >> it works for me, does it work for you too? > The suggested workaround/test is: replace > > #+BEGIN_SRC calc :var v=3 > v + 4 > #+END_SRC > > with > > #+BEGIN_SRC calc :var var-v=3 > v + 4 > #+END_SRC This is working for me as well, I think this will help me to understand what is going on... Thank you for you help Dieter PS: Are you using Calc regularly? -- Best wishes H. Dieter Wilhelm Darmstadt, Germany
Re: [O] Babel evaluation of Calc block not working, bug in Calc?
Andrea Rossetti writes: > 3) temporary workaround: try to change ":var v=3" into ":var var-v=3", > it works for me, does it work for you too? I'm afraid I've been a bit cryptic here. The suggested workaround/test is: replace #+BEGIN_SRC calc :var v=3 v + 4 #+END_SRC with #+BEGIN_SRC calc :var var-v=3 v + 4 #+END_SRC Kindest regards, Andrea
Re: [O] Babel evaluation of Calc block not working, bug in Calc?
die...@duenenhof-wilhelm.de (H. Dieter Wilhelm) writes: > But now we are getting: byte-code: Symbol's function definition is void: > v! > > #+BEGIN_SRC calc :var v=3 > v + 4 > #+END_SRC > Hello Dieter, I think I got it! 1) I see the same error message as you see, for variables with name "v" or "var" 2) diagnosys: I see that Calc tries to avoid name collisions by adding a "var-" prefix to variable names, and by removing it when it needs to. (see code in functions "calc-read-var-name" and "calc-var-name") 3) temporary workaround: try to change ":var v=3" into ":var var-v=3", it works for me, does it work for you too? 4) proposed correction (untested, and makes sense only if workaround actually works): in ob-calc.el, function org-babel-execute:calc, the invocation of "calc-store-into" could prepend 'var- to its argument 5) warning: if one applies correction 4), then workaround 3) doesn't work anymore Hope it helps and makes sense for you too, kindest regards. Andrea
[O] Babel evaluation of Calc block not working, bug in Calc?
Hello Orgers, please consider: Emacs -Q and evaluate the following #+BEGIN_SRC emacs-lisp (org-babel-do-load-languages 'org-babel-load-languages '((calc . t) (emacs-lisp . t) )) #+END_SRC #+RESULTS: | (calc . t) | (emacs-lisp . t) | The following works as expected #+BEGIN_SRC calc :var V=3 V + 4 #+END_SRC But now we are getting: byte-code: Symbol's function definition is void: v! #+BEGIN_SRC calc :var v=3 v + 4 #+END_SRC Calc thinks that the variable v contains a function even though nothing should be undefined for v and when trying debug-on-entry for calc-var-value the expression (boundp v) returns t!? I'm stuck at this point, could you please have a look, I've no idea how to debug this further. GNU Emacs 24.3.93.3 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.24) of 2014-09-17 on vsl28t2g With the latest org-mode from git Thanks Dieter -- Best wishes H. Dieter Wilhelm Darmstadt, Germany