emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Uwe Brauer <oub@mat.ucm.es>
To: emacs-orgmode@gnu.org
Subject: Re: org table: generate a weekly calendar with column that represents the hours
Date: Fri, 22 Apr 2022 14:47:43 +0200	[thread overview]
Message-ID: <87zgkdgu8g.fsf@mat.ucm.es> (raw)
In-Reply-To: 87pml9tqta.fsf@ucl.ac.uk

[-- Attachment #1: Type: text/plain, Size: 1955 bytes --]

>>> "ESF" == Eric S Fraga <e.fraga@ucl.ac.uk> writes:

> Something to play with:
> | start | duration |   end | notes |
> |-------+----------+-------+-------|
> | 08:00 |     1:00 | 09:00 |       |
> | 09:00 |    01:00 | 10:00 |       |
> | 10:00 |    01:00 | 11:00 |       |
> | 11:00 |    01:00 | 12:00 |       |
> | 12:00 |    01:00 | 13:00 |       |
> | 13:00 |    01:00 | 14:00 |       |
> | 14:00 |    01:00 | 15:00 |       |
> | 15:00 |    01:00 | 16:00 |       |
> | 16:00 |    01:00 | 17:00 |       |
> | 17:00 |    01:00 | 18:00 |       |
> | 18:00 |    01:00 | 19:00 |       |
> | 19:00 |    01:00 | 20:00 |       |
> | 20:00 |    01:00 | 21:00 |       |

> #+TBLFM: @<<<$2..@>$2=@-1;U::@<<<$1..@>$1=@-1+@-1$+1;U::$3=$1+$2;U
Thanks very much let me see whether I understand its logic

I tried

| start | duration |   end | notes |
|-------+----------+-------+-------|
| 08:00 |     1:00 | 09:00 |       |
#+TBLFM: @<<<$2..@>$2=@-1;U::@<<<$1..@>$1=@-1+@-1$+1;U::$3=$1+$2;U

I put the cursor say on the word «start»
And then fire up  C-c C-c, nothing happens. I fire up C-u C-u C-c C-c and it complains because the expression 
points outside the table

| start | duration |   end | notes |
|-------+----------+-------+-------|
| 08:00 |     1:00 | 09:00 |       |
|       |          |       |       |
#+TBLFM: @<<<$2..@>$2=@-1;U::@<<<$1..@>$1=@-1+@-1$+1;U::$3=$1+$2;U

Now C-u C-u C-c C-c gives

| start | duration |   end | notes |
|-------+----------+-------+-------|
| 08:00 |     1:00 | 09:00 |       |
| 09:00 |    01:00 | 10:00 |       |
#+TBLFM: @<<<$2..@>$2=@-1;U::@<<<$1..@>$1=@-1+@-1$+1;U::$3=$1+$2;U

Very very nice, so I can proceed like this.


Thanks a lot!

Uwe 
-- 
I strongly condemn Putin's war of aggression against the Ukraine.
I support to deliver weapons to Ukraine's military. 
I support the ban of Russia from SWIFT.
I support the EU membership of the Ukraine. 

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]

  reply	other threads:[~2022-04-22 13:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-22  6:54 org table: generate a weekly calendar with column that represents the hours Uwe Brauer
2022-04-22  9:23 ` Eric S Fraga
2022-04-22 12:47   ` Uwe Brauer [this message]
2022-05-04 22:22 ` TRS-80

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=87zgkdgu8g.fsf@mat.ucm.es \
    --to=oub@mat.ucm.es \
    --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).