From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id AIpIBev8cmLS3QAAbAwnHQ (envelope-from ) for ; Thu, 05 May 2022 00:23:39 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id qBYzBOv8cmJcMQAAG6o9tA (envelope-from ) for ; Thu, 05 May 2022 00:23:39 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 9678B2E28E for ; Thu, 5 May 2022 00:23:38 +0200 (CEST) Received: from localhost ([::1]:43044 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nmNPF-0004ko-AE for larch@yhetil.org; Wed, 04 May 2022 18:23:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46230) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nmNOC-0004jf-GG for emacs-orgmode@gnu.org; Wed, 04 May 2022 18:22:32 -0400 Received: from ciao.gmane.io ([116.202.254.214]:53452) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nmNO8-0005K0-Qf for emacs-orgmode@gnu.org; Wed, 04 May 2022 18:22:30 -0400 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1nmNNx-0007uv-VF for emacs-orgmode@gnu.org; Thu, 05 May 2022 00:22:17 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: emacs-orgmode@gnu.org From: TRS-80 Subject: Re: org table: generate a weekly calendar with column that represents the hours Date: Wed, 04 May 2022 18:22:10 -0400 Message-ID: <87ilql2b1p.fsf@isnotmyreal.name> References: <87bkwtip4u.fsf@mat.ucm.es> Mime-Version: 1.0 Content-Type: text/plain User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) Cancel-Lock: sha1:gGor3tDUus6u4m4iepOFhEP8Dp0= Received-SPF: pass client-ip=116.202.254.214; envelope-from=geo-emacs-orgmode@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.249, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1651703018; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=UGWYL/cgviIN9aw/6RJzXsinbIrsVNKsWgiS3hHSUfw=; b=NtoM/PaXGcg/78b8ZIrnZ2sQuS4eJqr8eZqV7+CvJih1MFQBz25ifF+Q1nz4fi8HcMKG/F o0Y3Hps0vJhq6/TGWPLLtea2HGVGBz9u4J+G2DIcDvTynRbhVHhqf4Q9+QQRMHGNmHZ2Ku boFgJ5kevmjardN4uJmN9q2/7AbUzpqdQV4xfhiSRhB+Y4mAcNFMTX1hqC2ZnckLHG8B11 MCIh37aLoV8AjrMORgelgiIEUGLUO0Hch0eCfy2mEZVvLVR+bZlNUlaPQSu0Ns3F7YWrDh YMKky2GksRxlgZVbt8y1Qxu8Gut8tfOxZOejUkR+V1RGKOERRI4p77lRvFgjAw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1651703018; a=rsa-sha256; cv=none; b=Db2Q82pLNFXOmPrt4pBQgfviAUqGLpzK+8hn9nB7F14XB2wFWHb/cI1TZFcj1t98qq7sKa 6wOoB3CtiN3HbUFvqtnXkGi9bL2VexStBImyZRAAw78UKXyOdDA+6c54hlKA9q38qa45sx fKd8SPY7Mq4X5Hp9i7xNrNM8VKwHuBPhIOdsEro/o1CZPe8TotlgJVu+zD8nKhOhTrbzYS lfzOZpiDVzBh04lPIpYGs3CdI1eWK7YZn6E3jzrhk7CI72kO3YQgct8ZG9GhAwqhAUDUhB E0tNtg0JmlJhbWyA+4j3S3iybFGeJfwi1Btu6P+TinpCwMr2evL9xrco9prO/g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.29 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 9678B2E28E X-Spam-Score: -2.29 X-Migadu-Scanner: scn0.migadu.com X-TUID: SBvpIF7pgEPd Uwe Brauer 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