[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Calc: `*' binds more strongly than `/'
From: |
Christian Schlauer |
Subject: |
Re: Calc: `*' binds more strongly than `/' |
Date: |
Sun, 22 Apr 2007 12:23:51 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.98 (gnu/linux) |
Jay Belanger <address@hidden> writes:
> Stefan Monnier <address@hidden> writes:
> ...
>> If there are too many existing calc-scripts that would be
>> broken by such a change, fine, but if this only mostly affects interactive
>> use, then changing it would make a lot of sense.
>
> While several people have said the current behavior is convenient for
> interactive use, I would hope (and expect) that there aren't any
> calc-scripts depending on this behavior. But it'd be nice to know for
> sure.
You are the maintainer of Calc -- do you have any contact to package
authors or users of packages that make use of Calc? I only know about
Org-mode, see below. What about table.el?
The tables in Org-mode use Calc. That is a non-interactive use of
Calc, isn't it:
| Value | Percentage |
|-------+------------|
| 17 | |
| 56 | |
| 42 | |
#+TBLFM: $2=$1/65*100
The `#+TBLFM:' line is a Calc-script, and some of them would break, if
they rely on the precedence of multiplication, like this example. But
nevertheless I think Calc's behaviour could (and should) be changed,
because:
- Existing tables aren't automatically recalculated when you open the
file, you have to do `C-u C-c C-c' in the table. So there is no
`immediate' damage. But even better:
- Org-mode could keep the existing Calc behaviour for existing tables
but use the `new' more standards-conforming Calc behaviour when the
script line `#+TBLFM:' starts with `#+TBLFMv2:' or something
similar, which could be Org-mode's new default as soon as Calc has
been modified.
So regarding Org-mode, nothing will break, I think.
> Perhaps after the release I could add a customizable variable,
> `calc-multiplication-has-precedence' (default t), and then anyone that
> wants to can set it to nil and try out the different behavior.
Rather make the default nil so that new users can use Calc and Org
like *any* pocket calculator or *any* spreadsheet...
WDYT?
Regards,
Christian
- Re: Calc: `*' binds more strongly than `/', (continued)
- Re: Calc: `*' binds more strongly than `/', Stefan Monnier, 2007/04/19
- Re: Calc: `*' binds more strongly than `/', Randal L. Schwartz, 2007/04/20
- Re: Calc: `*' binds more strongly than `/', Stefan Monnier, 2007/04/20
- Re: Calc: `*' binds more strongly than `/', Jay Belanger, 2007/04/20
- Re: Calc: `*' binds more strongly than `/', Miles Bader, 2007/04/21
- Re: Calc: `*' binds more strongly than `/', Christian Schlauer, 2007/04/22
- Re: Calc: `*' binds more strongly than `/',
Christian Schlauer <=
- Re: Calc: `*' binds more strongly than `/', Jay Belanger, 2007/04/22
- Re: Calc: `*' binds more strongly than `/', Jason Rumney, 2007/04/23
- Re: Calc: `*' binds more strongly than `/', Kim F. Storm, 2007/04/23
- Re: Calc: `*' binds more strongly than `/', Jay Belanger, 2007/04/23
- Re: Calc: `*' binds more strongly than `/', Christian Schlauer, 2007/04/25
- Re: Calc: `*' binds more strongly than `/', Jay Belanger, 2007/04/25
- Re: Calc: `*' binds more strongly than `/', Stefan Monnier, 2007/04/25
- Re: Calc: `*' binds more strongly than `/', Jay Belanger, 2007/04/26
- Re: Calc: `*' binds more strongly than `/', Stefan Monnier, 2007/04/26
- Re: Calc: `*' binds more strongly than `/', Christian Schlauer, 2007/04/26