emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Table formula with @I
@ 2014-09-01 15:02 Loris Bennett
  2014-09-01 15:17 ` Andrea Rossetti
  0 siblings, 1 reply; 5+ messages in thread
From: Loris Bennett @ 2014-09-01 15:02 UTC (permalink / raw)
  To: emacs-orgmode

Dear All,

In the following:

|   |   |   |
|   |   |   |
|---+---+---|
| 1 | 1 | 1 |
#+TBLFM: @I$3=1

I expected to get a '1' just in the third column.  Where am I going
wrong?

Cheers,

Loris

Org-mode version 8.2.7c (8.2.7c-44-g3fed03-elpaplus @ /home/loris/.emacs.d/elpa/org-plus-contrib-20140818/)
-- 
This signature is currently under construction.

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

* Re: Table formula with @I
  2014-09-01 15:02 Table formula with @I Loris Bennett
@ 2014-09-01 15:17 ` Andrea Rossetti
  2014-09-02 11:41   ` Charles Millar
  0 siblings, 1 reply; 5+ messages in thread
From: Andrea Rossetti @ 2014-09-01 15:17 UTC (permalink / raw)
  To: Loris Bennett; +Cc: emacs-orgmode

"Loris Bennett" <loris.bennett@fu-berlin.de> writes:
> In the following:
>
> |   |   |   |
> |   |   |   |
> |---+---+---|
> | 1 | 1 | 1 |
> #+TBLFM: @I$3=1
>
> I expected to get a '1' just in the third column.  Where am I going
> wrong?

(apologies in advance for suggesting just a workaround
instead of a rational explanation, hope it helps anyway)

It happened to me too some time ago, I used a slightly
different formula and it worked:

#+TBLFM: @I+1$3..@I+1$3=1

Does it work for you too? Kindest regards,

  Andrea

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

* Re: Table formula with @I
  2014-09-01 15:17 ` Andrea Rossetti
@ 2014-09-02 11:41   ` Charles Millar
  2014-09-02 12:34     ` Loris Bennett
  2014-09-02 13:02     ` Andrea Rossetti
  0 siblings, 2 replies; 5+ messages in thread
From: Charles Millar @ 2014-09-02 11:41 UTC (permalink / raw)
  To: emacs-orgmode


Andrea Rossetti wrote:
> "Loris Bennett" <loris.bennett@fu-berlin.de> writes:
>> In the following:
>>
>> |   |   |   |
>> |   |   |   |
>> |---+---+---|
>> | 1 | 1 | 1 |
>> #+TBLFM: @I$3=1
>>
>> I expected to get a '1' just in the third column.  Where am I going
>> wrong?
> (apologies in advance for suggesting just a workaround
> instead of a rational explanation, hope it helps anyway)
>
> It happened to me too some time ago, I used a slightly
> different formula and it worked:
>
> #+TBLFM: @I+1$3..@I+1$3=1
>
> Does it work for you too? Kindest regards,
>
>    Andrea
>
I must be missing something. When I recalculate the table (update table) 
applying both above TBLFM's - on the line to be updated, in the TBLFM 
line, and in the table itself, an error is returned

"can't assign to hline relative reference"

Org-mode version 8.3beta (release_8.3beta-304-ga4a1d8 @ 
c:/cygwin/home/Charlie01/.elisp/org-mode/lisp/)
GNU Emacs 24.3.1 (i386-mingw-nt6.0.6002) of 2013-03-17 on MARVIN
Windows Vista SP2

Charlie

---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com

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

* Re: Table formula with @I
  2014-09-02 11:41   ` Charles Millar
@ 2014-09-02 12:34     ` Loris Bennett
  2014-09-02 13:02     ` Andrea Rossetti
  1 sibling, 0 replies; 5+ messages in thread
From: Loris Bennett @ 2014-09-02 12:34 UTC (permalink / raw)
  To: emacs-orgmode

Charles Millar <millarc@verizon.net> writes:

> Andrea Rossetti wrote:
>> "Loris Bennett" <loris.bennett@fu-berlin.de> writes:
>>> In the following:
>>>
>>> |   |   |   |
>>> |   |   |   |
>>> |---+---+---|
>>> | 1 | 1 | 1 |
>>> #+TBLFM: @I$3=1
>>>
>>> I expected to get a '1' just in the third column.  Where am I going
>>> wrong?
>> (apologies in advance for suggesting just a workaround
>> instead of a rational explanation, hope it helps anyway)
>>
>> It happened to me too some time ago, I used a slightly
>> different formula and it worked:
>>
>> #+TBLFM: @I+1$3..@I+1$3=1
>>
>> Does it work for you too? Kindest regards,
>>
>>    Andrea
>>
> I must be missing something. When I recalculate the table (update
> table) applying both above TBLFM's - on the line to be updated, in the
> TBLFM line, and in the table itself, an error is returned
>
> "can't assign to hline relative reference"
>
> Org-mode version 8.3beta (release_8.3beta-304-ga4a1d8 @
> c:/cygwin/home/Charlie01/.elisp/org-mode/lisp/)
> GNU Emacs 24.3.1 (i386-mingw-nt6.0.6002) of 2013-03-17 on MARVIN
> Windows Vista SP2
>
> Charlie

Andrea's kludge works for me.  My understanding is that only a C-c C-c
in the TBLFM would actually update the table.

Looking at the documentation at 

http://orgmode.org/manual/References.html#References

again, I would have expected

@I+1$3

to be a correct way of referring to the 3rd column in the row after the
first hline, rather than the entire row.   It is unclear
to me what 

@I$3

as I used in my example above should correspond to.

Cheers,

Loris

-- 
This signature is currently under construction.

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

* Re: Table formula with @I
  2014-09-02 11:41   ` Charles Millar
  2014-09-02 12:34     ` Loris Bennett
@ 2014-09-02 13:02     ` Andrea Rossetti
  1 sibling, 0 replies; 5+ messages in thread
From: Andrea Rossetti @ 2014-09-02 13:02 UTC (permalink / raw)
  To: Charles Millar; +Cc: emacs-orgmode

Charles Millar <millarc@verizon.net> writes:
> I must be missing something. When I recalculate the table (update
> table) applying both above TBLFM's - on the line to be updated, in the
> TBLFM line, and in the table itself, an error is returned
>
> "can't assign to hline relative reference"
>
> Org-mode version 8.3beta (release_8.3beta-304-ga4a1d8 @
> c:/cygwin/home/Charlie01/.elisp/org-mode/lisp/)
> GNU Emacs 24.3.1 (i386-mingw-nt6.0.6002) of 2013-03-17 on MARVIN
> Windows Vista SP2
>

It works on my Org version (8.2.7c from ELPA). After a bit of
digging I found that:

  - the "can't assign to hline relative reference" message was
    added by commit a2c71a6e359cb93aa652f65c666294fb2a3b5e1b
    dated Nov 5th, 2013

  - motivations for that patch have been discussed here:
    http://thread.gmane.org/gmane.emacs.orgmode/71562
 
  - so I think I suggested something undocumented/unsupported
    that can't be used anymore, sorry :(

  - I'd like to express it as a wish for the future: support for
    hline references ("@I") in the left side of the formula
    would be a great feature (and it already seemed to work
    in some special cases, like @I+1$1..@I+1$1)
    
Kindest regards,

  Andrea    

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

end of thread, other threads:[~2014-09-02 13:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-01 15:02 Table formula with @I Loris Bennett
2014-09-01 15:17 ` Andrea Rossetti
2014-09-02 11:41   ` Charles Millar
2014-09-02 12:34     ` Loris Bennett
2014-09-02 13:02     ` Andrea Rossetti

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