emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Referencing a cell from a clockview table looks impossible
@ 2012-03-20 11:29 Sebastien Vauban
  2012-03-20 13:18 ` Sebastien Vauban
  0 siblings, 1 reply; 3+ messages in thread
From: Sebastien Vauban @ 2012-03-20 11:29 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hello,

I need to access to the "Total time" cell of a clocktable view. I've named it
properly, but references to a given cell all return "#ERROR".

* Work

Some tasks with CLOCK lines, for showing the problem.

** TODO Do this
   :LOGBOOK:
   CLOCK: [2012-03-19 Mon 09:00]--[2012-03-19 Mon 10:11] =>  1:11
   :END:

** TODO Do that
   :LOGBOOK:
   CLOCK: [2012-03-20 Tue 10:00]--[2012-03-20 Tue 12:22] =>  2:22
   :END:

* Report

** Dynamic block

The dynamic block captures the fact that I've worked 1:11 hours yesterday, on
some task of this file.

#+TBLNAME: hours-yesterday
#+BEGIN: clocktable :maxlevel 4 :scope file :block yesterday
Clock summary at [2012-03-20 Tue 11:59], for Monday, March 19, 2012.

| Headline     | Time |      |
|--------------+------+------|
| *Total time*   | *1:11* |      |
|--------------+------+------|
| Work         | 1:11 |      |
| TODO Do this |      | 1:11 |
#+END:

** Table with remote reference

As I need the above time to be converted first to a float, then to money, I'm
using a remote reference to the above "Total Time", and a table which shows
the intermediate results:

| Tasks     | HH:MM  | Float | USD    |
|-----------+--------+-------+--------|
| Yesterday | #ERROR |  0.00 | #ERROR |
|-----------+--------+-------+--------|
|           |        |    0. | 0      |
#+TBLFM: $3='(/ (float (org-hh:mm-string-to-minutes $2)) 60.);%.2f::$4=$2*30::@2$2=remote(hours-yesterday,@2$2)::@3$3=vsum(@-I..@-II)

But the remote reference fails with whichever referenced cell.

Any idea?

Best regards,
  Seb

-- 
Sebastien Vauban

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

* Re: Referencing a cell from a clockview table looks impossible
  2012-03-20 11:29 Referencing a cell from a clockview table looks impossible Sebastien Vauban
@ 2012-03-20 13:18 ` Sebastien Vauban
  2012-03-27 22:50   ` Bastien
  0 siblings, 1 reply; 3+ messages in thread
From: Sebastien Vauban @ 2012-03-20 13:18 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hello,

I just found the reason: it's because *the "Total time" is in bold*, with `*'
before and after the total (for example: *3:33*).

* Design

Some tasks with CLOCK lines, for showing the problem.

** TODO Do this
   :LOGBOOK:
   CLOCK: [2012-03-19 Mon 09:00]--[2012-03-19 Mon 10:11] =>  1:11
   :END:

* Develop

** TODO Do that
   :LOGBOOK:
   CLOCK: [2012-03-19 Mon 10:00]--[2012-03-19 Mon 12:22] =>  2:22
   CLOCK: [2012-03-20 Tue 10:01]--[2012-03-20 Tue 12:35] =>  2:34
   :END:

* Report

** Dynamic block

The dynamic block captures the fact that I've worked 3:33 hours yesterday, on
2 different tasks.

#+TBLNAME: hours-yesterday
#+BEGIN: clocktable :maxlevel 4 :scope file :block yesterday
Clock summary at [2012-03-20 Tue 14:12], for Monday, March 19, 2012.

| Headline     | Time |      |
|--------------+------+------|
| *Total time*   | *3:33* |      |
|--------------+------+------|
| Design       | 1:11 |      |
| TODO Do this |      | 1:11 |
| Develop      | 2:22 |      |
| TODO Do that |      | 2:22 |
#+END:

** Table with remote reference

As said above, referencing an "regular" (not bold) total does work, as in:

| Tasks     | HH:MM | Float | USD     |
|-----------+-------+-------+---------|
| Yesterday | 1:11  |  1.18 | 30:11   |
|-----------+-------+-------+---------|
|           | Time  |  1.18 | 30 Time |
#+TBLFM: $3='(/ (float (org-hh:mm-string-to-minutes $2)) 60.);%.2f::$4=$2*30::@2$2=remote(hours-yesterday,@3$2)::@3$3=vsum(@-I..@-II)

But the real grand total is not referencable:

| Tasks     | HH:MM  | Float | USD    |
|-----------+--------+-------+--------|
| Yesterday | #ERROR |  0.00 | #ERROR |
|-----------+--------+-------+--------|
|           |        |    0. | 0      |
#+TBLFM: $3='(/ (float (org-hh:mm-string-to-minutes $2)) 60.);%.2f::$4=$2*30::@2$2=remote(hours-yesterday,@2$2)::@3$3=vsum(@-I..@-II)

Any idea how to work around this?

Best regards,
  Seb

-- 
Sebastien Vauban

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

* Re: Referencing a cell from a clockview table looks impossible
  2012-03-20 13:18 ` Sebastien Vauban
@ 2012-03-27 22:50   ` Bastien
  0 siblings, 0 replies; 3+ messages in thread
From: Bastien @ 2012-03-27 22:50 UTC (permalink / raw)
  To: Sebastien Vauban; +Cc: emacs-orgmode

Hi Sébastien,

"Sebastien Vauban" <wxhgmqzgwmuf@spammotel.com> writes:

> I just found the reason: it's because *the "Total time" is in bold*, with `*'
> before and after the total (for example: *3:33*).

You can now (>master) use `org-clock-total-time-cell-format' to 
format the total time cells.  The default format is "*%s*", the
same than before.

Thanks,

-- 
 Bastien

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

end of thread, other threads:[~2012-03-27 23:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-20 11:29 Referencing a cell from a clockview table looks impossible Sebastien Vauban
2012-03-20 13:18 ` Sebastien Vauban
2012-03-27 22:50   ` Bastien

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