emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* $0 replaced with ampersand (&) when invoking `org-edit-special'
@ 2010-12-19 11:34 niels giesen
  2011-01-09 13:36 ` David Maus
  2011-02-11  9:52 ` Bastien
  0 siblings, 2 replies; 6+ messages in thread
From: niels giesen @ 2010-12-19 11:34 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 417 bytes --]


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)

[-- Attachment #1.2: Type: application/pgp-signature, Size: 196 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
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] 6+ messages in thread

* Re: $0 replaced with ampersand (&) when invoking `org-edit-special'
  2010-12-19 11:34 $0 replaced with ampersand (&) when invoking `org-edit-special' niels giesen
@ 2011-01-09 13:36 ` David Maus
  2011-01-30 16:32   ` David Maus
  2011-02-11  9:52 ` Bastien
  1 sibling, 1 reply; 6+ messages in thread
From: David Maus @ 2011-01-09 13:36 UTC (permalink / raw)
  To: niels giesen; +Cc: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 748 bytes --]

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.... dmjena@jabber.org
Email..... dmaus@ictsoc.de

[-- Attachment #1.2: Type: application/pgp-signature, Size: 230 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
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] 6+ messages in thread

* Re: $0 replaced with ampersand (&) when invoking `org-edit-special'
  2011-01-09 13:36 ` David Maus
@ 2011-01-30 16:32   ` David Maus
  2011-01-31 11:44     ` Niels Giesen
  0 siblings, 1 reply; 6+ messages in thread
From: David Maus @ 2011-01-30 16:32 UTC (permalink / raw)
  To: David Maus; +Cc: emacs-orgmode, niels giesen


[-- Attachment #1.1: Type: text/plain, Size: 562 bytes --]

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.... dmjena@jabber.org
Email..... dmaus@ictsoc.de

[-- Attachment #1.2: Type: application/pgp-signature, Size: 230 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
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] 6+ messages in thread

* Re: $0 replaced with ampersand (&) when invoking `org-edit-special'
  2011-01-30 16:32   ` David Maus
@ 2011-01-31 11:44     ` Niels Giesen
  0 siblings, 0 replies; 6+ messages in thread
From: Niels Giesen @ 2011-01-31 11:44 UTC (permalink / raw)
  To: David Maus; +Cc: emacs-orgmode, niels giesen


[-- Attachment #1.1: Type: text/plain, Size: 1221 bytes --]

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.... dmjena@jabber.org
> Email..... dmaus@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


[-- Attachment #1.2: Type: text/html, Size: 2213 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
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] 6+ messages in thread

* Re: $0 replaced with ampersand (&) when invoking `org-edit-special'
  2010-12-19 11:34 $0 replaced with ampersand (&) when invoking `org-edit-special' niels giesen
  2011-01-09 13:36 ` David Maus
@ 2011-02-11  9:52 ` Bastien
  2011-02-27 17:11   ` David Maus
  1 sibling, 1 reply; 6+ messages in thread
From: Bastien @ 2011-02-11  9:52 UTC (permalink / raw)
  To: niels giesen; +Cc: emacs-orgmode

Hi Niels,

niels giesen <niels.giesen@gmail.com> 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: $0 replaced with ampersand (&) when invoking `org-edit-special'
  2011-02-11  9:52 ` Bastien
@ 2011-02-27 17:11   ` David Maus
  0 siblings, 0 replies; 6+ messages in thread
From: David Maus @ 2011-02-27 17:11 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode, niels giesen


[-- Attachment #1.1: Type: text/plain, Size: 984 bytes --]

At Fri, 11 Feb 2011 10:52:29 +0100,
Bastien wrote:
>
> Hi Niels,
>
> niels giesen <niels.giesen@gmail.com> 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.... dmjena@jabber.org
Email..... dmaus@ictsoc.de

[-- Attachment #1.2: Type: application/pgp-signature, Size: 230 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
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] 6+ messages in thread

end of thread, other threads:[~2011-02-27 17:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-19 11:34 $0 replaced with ampersand (&) when invoking `org-edit-special' niels giesen
2011-01-09 13:36 ` David Maus
2011-01-30 16:32   ` David Maus
2011-01-31 11:44     ` Niels Giesen
2011-02-11  9:52 ` Bastien
2011-02-27 17:11   ` David Maus

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).