Re: [Orgmode] $0 replaced with ampersand (&) when invoking `org-edit-special'

2011-02-27 Thread David Maus
At Fri, 11 Feb 2011 10:52:29 +0100,
Bastien wrote:
>
> Hi Niels,
>
> niels giesen  writes:
>
> > According to [ (info "(org) Formula syntax for Calc") ], $0
> > references the current cell. Pressing C-c C-c on the #+TBLFM line
> > below does indeed work, but C-c ' (`org-edit-special') changes the
> > $0 reference into a single ampersand (&). Is this a bug?
>
> I can confirm this and I think it's a bug.
>
> Carsten, do you know what happens here?

`org-number-to-letters' does expect the number to be greater than
zero.  If it is zero (like in the $0 case) it will return the empty
string.

This can be simply fixed by not calling `org-number-to-letters' if the
is a single zero.  Or, what seems a cleaner solution, to make up a
representation of $0 in letter-notation.

Hope to have some more time to fix this one, if someone else steps in
I'm fine.

Best,
 -- David
--
OpenPGP... 0x99ADB83B5A4478E6
Jabber dmj...@jabber.org
Email. dm...@ictsoc.de


pgp2nlfStdeeq.pgp
Description: PGP signature
___
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


Re: [Orgmode] $0 replaced with ampersand (&) when invoking `org-edit-special'

2011-02-11 Thread Bastien
Hi Niels,

niels giesen  writes:

> According to [ (info "(org) Formula syntax for Calc") ], $0
> references the current cell. Pressing C-c C-c on the #+TBLFM line
> below does indeed work, but C-c ' (`org-edit-special') changes the
> $0 reference into a single ampersand (&). Is this a bug?

I can confirm this and I think it's a bug.

Carsten, do you know what happens here?

-- 
 Bastien

___
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


Re: [Orgmode] $0 replaced with ampersand (&) when invoking `org-edit-special'

2011-01-31 Thread Niels Giesen
On 30-1-2011 17:32, David Maus wrote:
> At Sun, 09 Jan 2011 14:36:45 +0100,
> David Maus wrote:
>> I can reproduce this with
>>
>> Org-mode version 7.4 (release_7.4.135.g84087)
>>
>> GNU Emacs 23.2.1 (i486-pc-linux-gnu, GTK+ Version 2.20.0)
>>  of 2010-12-11 on raven, modified by Debian
>>
>> And it sure looks like a bug to me.
> I did a first shot on a fix but are currently stuck with the question
> how to represent a reference to the current cell ($0) in the
> alphabetical notation.  Any suggestions?
>

Great to hear you are working on this. Perhaps simply keep $0, that
would mean no changes to the documentation are needed. Or maybe the
single ampersand (&) that is currently substituted for $0...

Thing is, of course, that whatever is the substitution should work in
calculations.

Anyone else wanting to chime in?

Regards,
Niels.

> Best,
>   -- David
> --
> OpenPGP... 0x99ADB83B5A4478E6
> Jabber dmj...@jabber.org
> Email. dm...@ictsoc.de
>
>
> ___
> 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

___
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


Re: [Orgmode] $0 replaced with ampersand (&) when invoking `org-edit-special'

2011-01-30 Thread David Maus
At Sun, 09 Jan 2011 14:36:45 +0100,
David Maus wrote:
>
> I can reproduce this with
>
> Org-mode version 7.4 (release_7.4.135.g84087)
>
> GNU Emacs 23.2.1 (i486-pc-linux-gnu, GTK+ Version 2.20.0)
>  of 2010-12-11 on raven, modified by Debian
>
> And it sure looks like a bug to me.

I did a first shot on a fix but are currently stuck with the question
how to represent a reference to the current cell ($0) in the
alphabetical notation.  Any suggestions?

Best,
  -- David
--
OpenPGP... 0x99ADB83B5A4478E6
Jabber dmj...@jabber.org
Email. dm...@ictsoc.de


pgpAFm7ZLmKgR.pgp
Description: PGP signature
___
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


Re: [Orgmode] $0 replaced with ampersand (&) when invoking `org-edit-special'

2011-01-09 Thread David Maus
At Sun, 19 Dec 2010 12:34:39 +0100,
niels giesen wrote:
>
> According to [ (info "(org) Formula syntax for Calc") ], $0
> references the current cell. Pressing C-c C-c on the #+TBLFM line
> below does indeed work, but C-c ' (`org-edit-special') changes the
> $0 reference into a single ampersand (&). Is this a bug?
>
> | Thing  | Amount |
> |+|
> | Apples |  2 |
> | Pears  |1.3 |
> #+TBLFM: $2=$0;%.2f

I can reproduce this with

Org-mode version 7.4 (release_7.4.135.g84087)

GNU Emacs 23.2.1 (i486-pc-linux-gnu, GTK+ Version 2.20.0)
 of 2010-12-11 on raven, modified by Debian

And it sure looks like a bug to me.

Best,
 -- David
--
OpenPGP... 0x99ADB83B5A4478E6
Jabber dmj...@jabber.org
Email. dm...@ictsoc.de


pgp4JbgAKCn0T.pgp
Description: PGP signature
___
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


[Orgmode] $0 replaced with ampersand (&) when invoking `org-edit-special'

2010-12-19 Thread niels giesen

According to [ (info "(org) Formula syntax for Calc") ], $0
references the current cell. Pressing C-c C-c on the #+TBLFM line
below does indeed work, but C-c ' (`org-edit-special') changes the
$0 reference into a single ampersand (&). Is this a bug?

| Thing  | Amount |
|+|
| Apples |  2 |
| Pears  |1.3 |
#+TBLFM: $2=$0;%.2f

Regards,

Niels.

Using: Org-mode version 7.4 (latest from git)


pgpQlauKa3Qmm.pgp
Description: PGP signature
___
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