emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <dominik@science.uva.nl>
To: Carsten Dominik <dominik@science.uva.nl>
Cc: Stephan Schmitt <drmabuse@cs.tu-berlin.de>,
	Emacs-orgmode mailing list <emacs-orgmode@gnu.org>
Subject: Reference to same row in spreadsheet
Date: Fri, 19 Dec 2008 18:49:03 +0100	[thread overview]
Message-ID: <6A739C05-988F-41CA-95A9-78E5223DD524@uva.nl> (raw)
In-Reply-To: <73C77123-15BF-47B9-A8D4-28073D85EEA0@uva.nl>

With the latest push to the git repo,

you can use $LR1, $LR2, ... to reference fields in the last row.

HTH

- Carsten


On Dec 18, 2008, at 11:14 PM, Carsten Dominik wrote:

> Hi all,
>
> thanks for your constructive contributions to the thread.
>
> However, I will still reverse the change that introduced @0 as a  
> reference to the last line.  The risk that someone will be bitten by  
> this is too high, and @0 is really too similar to @+0, so I think  
> the distinction is not large enough.
>
> I will try to find a different solution, like @last$2 or so, but  
> this is harder to implement and will take a little while.  Sorry Matt.
>
> The reason why I am in a hurry to revert this change is, among  
> others, because Emacs 23 might go into pretest very soon, and I  
> really want a clean, good version to ship with it.
>
> - Carsten
>
> On Dec 18, 2008, at 5:50 PM, Stephan Schmitt wrote:
>
>> For me the new behaviour is fine, if leaving out the row  
>> specification works.
>>
>> The distinction between @0 and @+0 would work, too, but is rather  
>> confusing and
>> hard to remember.  I think both should represent either the last or  
>> the current row.
>>
>> Greetings,
>> 	Stephan
>>
>> Carsten Dominik wrote:
>>> You are right, this is an incompatible change.  Dammit.
>>>
>>> What should  do?  Opinions?
>>>
>>> The problem is that this change may lead to older tables
>>> evaluated incorrectly.  I do like the new convention and
>>> think that @+0 or leaving out the row  specifications are
>>> good alternatives - but maybe we are obliged to keep
>>> the old convention....
>>>
>>> - Carsten
>>>
>>> On Dec 18, 2008, at 4:01 PM, Stephan Schmitt wrote:
>>>
>>>> Hello,
>>>>
>>>> the reference to the last row @0 led to incompatible changes:
>>>>
>>>> * spreadsheet: relative reference to same row
>>>> (using Org mode version 6.15d)
>>>>
>>>> The Org mode version 6.15 introduced @0 as a reference to the last
>>>> row for spreadsheet (org-table) formulas.  This leads to problems  
>>>> if
>>>> you used it as reference to the same row before.
>>>>
>>>> - description from [[http://orgmode.org/Changes.html][Org-mode  
>>>> list of
>>>> user-visible changes]]:
>>>>
>>>> Spreadsheet references to the last table line.
>>>>
>>>> You may now use @0 to reference the last dataline in a table in a
>>>> stable way.
>>>>
>>>> - according to  [[info:org:References]]:
>>>>
>>>> `0' refers to the current row and column.  Also, if you omit
>>>> either the column or the row part of the reference, the current
>>>> row/column is implied.
>>>>
>>>> However this doesn't work since @0 refers to the last line.
>>>>
>>>> If you press `C-c *' with the cursor inside the tables below, the
>>>> second column should contain the doubled value of the first.
>>>>
>>>> ** @0 refers to last line
>>>>
>>>> |---+---|
>>>> | 1 | 4 |
>>>> | 2 | 4 |
>>>> |---+---|
>>>> #+TBLFM: $2=2*@0$-1
>>>>
>>>> this has worked before as reference to the same row, now it refers
>>>> to the last row
>>>>
>>>> ** bug: omitting explicit reference
>>>>
>>>> |---+--------|
>>>> | 1 | #ERROR |
>>>> | 2 | #ERROR |
>>>> |---+--------|
>>>> #+TBLFM: $2=2*$-1
>>>>
>>>> this seems to be a bug, should refer to the same row
>>>>
>>>> ** @+0 refers to same row
>>>>
>>>> |---+---|
>>>> | 1 | 2 |
>>>> | 2 | 4 |
>>>> |---+---|
>>>> #+TBLFM: $2=2*@+0$-1
>>>>
>>>> works as expected
>>>>
>>>>
>>>> Greetings,
>>>>  Stephan
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Emacs-orgmode mailing list
>>>> Remember: use `Reply All' to send replies to the list.
>>>> Emacs-orgmode@gnu.org
>>>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>>>
>

  reply	other threads:[~2008-12-19 17:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-18 15:01 reference to same row in spreadsheet Stephan Schmitt
2008-12-18 16:25 ` Carsten Dominik
2008-12-18 16:50   ` Stephan Schmitt
2008-12-18 22:14     ` Carsten Dominik
2008-12-19 17:49       ` Carsten Dominik [this message]
2008-12-18 16:55   ` Ben Alexander

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6A739C05-988F-41CA-95A9-78E5223DD524@uva.nl \
    --to=dominik@science.uva.nl \
    --cc=drmabuse@cs.tu-berlin.de \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).