emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: TRS-80 <lists.trs-80@isnotmyreal.name>
To: emacs-orgmode@gnu.org
Subject: Re: org table: generate a weekly calendar with column that represents the hours
Date: Wed, 04 May 2022 18:22:10 -0400	[thread overview]
Message-ID: <87ilql2b1p.fsf@isnotmyreal.name> (raw)
In-Reply-To: <87bkwtip4u.fsf@mat.ucm.es>

Uwe Brauer <oub@mat.ucm.es> writes:

> I am looking for  convenient method to generate a weekly calendar in
> table form that looks like
>
> #+begin_src 
>
> |       Hours | Mon | Tue | Wed | Thu | Fri |
> |   8:00-9:00 |     |     |     |     |     |
> |  9:00-10:00 |     |     |     |     |     |
> |             |     |     |     |     |     |
> |             |     |     |     |     |     |
> |             |     |     |     |     |     |
> |             |     |     |     |     |     |
> |             |     |     |     |     |     |
> |             |     |     |     |     |     |
> |             |     |     |     |     |     |
> |             |     |     |     |     |     |
> |             |     |     |     |     |     |
> | 19:00-20:00 |     |     |     |     |     |
> #+end_src
>
> But, of course the missing hours should be inserted automatically.
>
> A poor man's solution would be to do it manually and to save the table
> as a template, but is there a way to generate it using org's table
> functionality?

Eric gave you a way that you asked (using Org table functionality), but
another way could be to simply use a bunch of insert statements.  Or
rather, 1-2 to insert the header, followed by a loop with a starting
time, interval, etc.

Two advantages to that approach:

1. You could specify start, end time and resolution (spacing) as
arguments (might not be needed).

2. You would not need a 'duration' column.

3. No need for formula (which leaves more room for your own, should you
need it).

Just another way to do the same thing.

Cheers,
TRS-80





      parent reply	other threads:[~2022-05-04 22:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-22  6:54 Uwe Brauer
2022-04-22  9:23 ` Eric S Fraga
2022-04-22 12:47   ` Uwe Brauer
2022-05-04 22:22 ` TRS-80 [this message]

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=87ilql2b1p.fsf@isnotmyreal.name \
    --to=lists.trs-80@isnotmyreal.name \
    --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).