emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Rares Vernica <rvernica@gmail.com>
To: Michael Brand <michael.ch.brand@gmail.com>
Cc: Org Mode <emacs-orgmode@gnu.org>
Subject: Re: Bug: Table formula does not copy time interval correctly [8.2.10 (release_8.2.10 @ /usr/share/emacs/25.0.94/lisp/org/)]
Date: Thu, 07 Jul 2016 21:06:58 -0700	[thread overview]
Message-ID: <87vb0gbwnx.fsf@gmail.com> (raw)
In-Reply-To: <CALn3zojF6TjityhmmXmy6eCxw+stDxNBbdBCn0SHst6OuAmbYg@mail.gmail.com> (Michael Brand's message of "Thu, 7 Jul 2016 08:52:36 +0200")

Michael Brand <michael.ch.brand@gmail.com> writes:

> Hi Rares
>
> On Mon, Jul 4, 2016 at 6:28 PM, Rares Vernica <rvernica@gmail.com> wrote:
>
>> | [2016-07-03 Sun]--[2016-07-04 Mon] | 1d | d   |
>> | [2016-07-03 Sun]--[2016-07-05 Tue] | 2d | 2 d |
>> #+TBLFM: $3=$2
>
> A Calc formula interprets field values as a symbolic expressions to
> calculate with. To copy literally one needs a Lisp formula:
>
> | [2016-07-03 Sun]--[2016-07-04 Mon] | 1d | 1d |
> | [2016-07-03 Sun]--[2016-07-05 Tue] | 2d | 2d |
>
> #+TBLFM: $3 = '(identity $2)

That did the trick, thanks!

Just to clarify, how would you fix this:

| [2016-07-05 Tue]--[2016-07-06 Wed] | 1d | vsum(d) |
| [2016-07-06 Wed]--[2016-07-07 Thu] | 1d | 2 d     |
#+TBLFM: $3=vsum(@1$-1..@0$-1)

Notice the "vsum(d)" instead of the expected "1 d". How would you add
"identity" here?

Thanks!
Rares

  reply	other threads:[~2016-07-08  4:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-04 16:28 Bug: Table formula does not copy time interval correctly [8.2.10 (release_8.2.10 @ /usr/share/emacs/25.0.94/lisp/org/)] Rares Vernica
2016-07-07  6:52 ` Michael Brand
2016-07-08  4:06   ` Rares Vernica [this message]
2016-07-10 14:38     ` Michael Brand

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=87vb0gbwnx.fsf@gmail.com \
    --to=rvernica@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=michael.ch.brand@gmail.com \
    /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).