* Bug ? : org-babel and calc : calc-command-flags
@ 2011-01-19 18:58 d.tchin
2011-01-20 16:36 ` Eric Schulte
0 siblings, 1 reply; 5+ messages in thread
From: d.tchin @ 2011-01-19 18:58 UTC (permalink / raw)
To: emacs-orgmode
Hello,
I tried to use calc with babel but it doesn't work as expected.
I use the following block with simple instruction :
#+begin_src calc
2*3
#+end_src
I didn't get back any results.
I launch calc and it seems to be called as I have following output
--- Emacs Calculator Mode ---
1: 6
.
So the instructions seems to be sent to calc.
I have the following message error message :
executing Calc code block...
calc-push-list: Symbol's value as variable is void: calc-command-flags
I use :
GNU Emacs 22.3.1 (i386-mingw-nt5.1.2600) of 2008-09-06 on SOFT-MJASON
Org-mode version 7.4
Regards
d.tchin
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Bug ? : org-babel and calc : calc-command-flags
2011-01-19 18:58 Bug ? : org-babel and calc : calc-command-flags d.tchin
@ 2011-01-20 16:36 ` Eric Schulte
2011-01-20 18:22 ` d.tchin
0 siblings, 1 reply; 5+ messages in thread
From: Eric Schulte @ 2011-01-20 16:36 UTC (permalink / raw)
To: d.tchin; +Cc: emacs-orgmode
Hi d.tchin,
This problem is caused because (as you point out) the calc-command-flags
variable is not defined. In my Emacs version calc-command-flags is
provided by (require 'calc) which is part of Babel's calc support, this
variable must be part of another package in your distribution.
As a work around you should find which calc package provides the
calc-command-flags variable and manually require that package, which
should resolve this problem. More generally it may be useful to upgrade
from Emacs 22 if that is an option.
Best -- Eric
d.tchin <d.tchin@voila.fr> writes:
> Hello,
>
> I tried to use calc with babel but it doesn't work as expected.
>
> I use the following block with simple instruction :
> #+begin_src calc
> 2*3
> #+end_src
>
> I didn't get back any results.
>
> I launch calc and it seems to be called as I have following output
> --- Emacs Calculator Mode ---
> 1: 6
> .
>
>
> So the instructions seems to be sent to calc.
>
> I have the following message error message :
>
> executing Calc code block...
> calc-push-list: Symbol's value as variable is void: calc-command-flags
>
>
> I use :
> GNU Emacs 22.3.1 (i386-mingw-nt5.1.2600) of 2008-09-06 on SOFT-MJASON
> Org-mode version 7.4
>
> Regards
>
> d.tchin
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Bug ? : org-babel and calc : calc-command-flags
2011-01-20 16:36 ` Eric Schulte
@ 2011-01-20 18:22 ` d.tchin
2011-01-20 18:49 ` Eric Schulte
0 siblings, 1 reply; 5+ messages in thread
From: d.tchin @ 2011-01-20 18:22 UTC (permalink / raw)
To: emacs-orgmode
Eric Schulte <schulte.eric <at> gmail.com> writes:
>
> Hi d.tchin,
>
Hi Eric
> This problem is caused because (as you point out) the calc-command-flags
> variable is not defined. In my Emacs version calc-command-flags is
> provided by (require 'calc) which is part of Babel's calc support, this
> variable must be part of another package in your distribution.
>
Strange as I can load calc package in emacs. Indeed when I try to
get information on this variable with C-h v, there is nothing.
I have a look on calc.el and I have the following lines (1428):
(defvar calc-aborted-prefix nil)
(defvar calc-start-time nil)
(defvar calc-command-flags)
(defvar calc-final-point-line)
(defvar calc-final-point-column)
Indeed, when I tried to use C-h v on the two first variable, it match.
But not for the following. The main difference is that the first two
variable have the nil value and not the following.
> As a work around you should find which calc package provides the
> calc-command-flags variable and manually require that package, which
> should resolve this problem. More generally it may be useful to upgrade
> from Emacs 22 if that is an option.
>
I put a (require 'calc) in my .emacs. It is still not working.
I decide to put the following instruction in my .emacs :
(require 'calc)
(defvar calc-command-flags nil)
Then it works !
It seems that there is problem of initialization of this variable.
Shouldn't this variable be initialized by default in calc ?
Thank you for your help.
d.tchin
> Best -- Eric
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Re: Bug ? : org-babel and calc : calc-command-flags
2011-01-20 18:22 ` d.tchin
@ 2011-01-20 18:49 ` Eric Schulte
2011-01-20 19:20 ` d.tchin
0 siblings, 1 reply; 5+ messages in thread
From: Eric Schulte @ 2011-01-20 18:49 UTC (permalink / raw)
To: d.tchin; +Cc: emacs-orgmode
d.tchin <d.tchin@voila.fr> writes:
> Eric Schulte <schulte.eric <at> gmail.com> writes:
>
>>
>> Hi d.tchin,
>>
>
> Hi Eric
>
>> This problem is caused because (as you point out) the calc-command-flags
>> variable is not defined. In my Emacs version calc-command-flags is
>> provided by (require 'calc) which is part of Babel's calc support, this
>> variable must be part of another package in your distribution.
>>
>
> Strange as I can load calc package in emacs. Indeed when I try to
> get information on this variable with C-h v, there is nothing.
> I have a look on calc.el and I have the following lines (1428):
>
> (defvar calc-aborted-prefix nil)
> (defvar calc-start-time nil)
> (defvar calc-command-flags)
> (defvar calc-final-point-line)
> (defvar calc-final-point-column)
>
> Indeed, when I tried to use C-h v on the two first variable, it match.
> But not for the following. The main difference is that the first two
> variable have the nil value and not the following.
>
the use of defvar without giving the variable a value is a trick to
appease the elisp compiler when a variable is used without being
required. I imagine that the `calc-command-flags' variable is defined
in some other calc file, which the calc authors assumed would already be
loaded by the time calc is required.
>
>
>> As a work around you should find which calc package provides the
>> calc-command-flags variable and manually require that package, which
>> should resolve this problem. More generally it may be useful to upgrade
>> from Emacs 22 if that is an option.
>>
>
> I put a (require 'calc) in my .emacs. It is still not working.
> I decide to put the following instruction in my .emacs :
>
> (require 'calc)
> (defvar calc-command-flags nil)
>
> Then it works !
That may be the simplest work-around for now, unless you can find the
calc file that actually does define that variable.
Best -- Eric
>
> It seems that there is problem of initialization of this variable.
> Shouldn't this variable be initialized by default in calc ?
>
> Thank you for your help.
>
> d.tchin
>
>
>
>> Best -- Eric
>>
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Bug ? : org-babel and calc : calc-command-flags
2011-01-20 18:49 ` Eric Schulte
@ 2011-01-20 19:20 ` d.tchin
0 siblings, 0 replies; 5+ messages in thread
From: d.tchin @ 2011-01-20 19:20 UTC (permalink / raw)
To: emacs-orgmode
Eventually I prefer to use the following instruction in the
buffer where I will use calc with babel.
#+begin_src emacs-lisp :results silent
(require 'ob-calc)
(defvar calc-command-flags nil)
#+end_src
Thank you for your help.
d.tchin
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-01-20 19:21 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-19 18:58 Bug ? : org-babel and calc : calc-command-flags d.tchin
2011-01-20 16:36 ` Eric Schulte
2011-01-20 18:22 ` d.tchin
2011-01-20 18:49 ` Eric Schulte
2011-01-20 19:20 ` d.tchin
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).