From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id gLzYF+ymmV8EDAAA0tVLHw (envelope-from ) for ; Wed, 28 Oct 2020 17:14:20 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id WD2sE+ymmV/EVgAAbx9fmQ (envelope-from ) for ; Wed, 28 Oct 2020 17:14:20 +0000 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 D93D6940237 for ; Wed, 28 Oct 2020 17:14:19 +0000 (UTC) Received: from localhost ([::1]:47326 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kXp1e-0003sH-CJ for larch@yhetil.org; Wed, 28 Oct 2020 13:14:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46310) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kXp0U-0003qA-7G for emacs-orgmode@gnu.org; Wed, 28 Oct 2020 13:13:06 -0400 Received: from mout.web.de ([217.72.192.78]:55419) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kXp0S-0005Z1-C8 for emacs-orgmode@gnu.org; Wed, 28 Oct 2020 13:13:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1603905179; bh=qcYQuWlZFt9+IE6YdLSsjc0E7bP06A13lixqAYIS1d8=; h=X-UI-Sender-Class:From:To:Subject:References:Date:In-Reply-To; b=TFAK5JLXfxsvANkVqSDS570yMTLM//BJE0P1dpdmVV7zpZWgPvZnPhCRu/PuanUFy 1VwWuNeudf2+JlxxlOiv7Wh3N7ujYVtQJv1tTxaxizyMr8Az+lw0lUV5Loa1o/ZJh3 eFxwIMHJXVNcKae/dV1ZJJcXiIVwpt1ZrSQuMLi4= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Received: from drachen.dragon ([188.98.110.121]) by smtp.web.de (mrweb106 [213.165.67.124]) with ESMTPSA (Nemesis) id 1MgRM5-1jtHW817y3-00hsbT; Wed, 28 Oct 2020 18:12:59 +0100 From: Michael Heerdegen To: emacs-orgmode@gnu.org Subject: Re: Headline generation as in diary? References: <878sdth8fm.fsf@web.de> Date: Wed, 28 Oct 2020 18:12:58 +0100 In-Reply-To: <878sdth8fm.fsf@web.de> (Michael Heerdegen's message of "Tue, 01 Sep 2020 16:34:53 +0200") Message-ID: <87tuue9sv9.fsf@web.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:2Z8wySa+ETBlk7yb/ZZqnolL13gIICDvDAjHAo7v65w5rYmn/+X GMLQRwcy6UuL/M5SEI88v4Zs0ig+R4KkehDKVe88veh+UB9YQM4tIp0S0FLh+s/MvkFmwdj htsFThv+/R/0HlboUlJPgztr1mbEY6OH2wM9XObJY1xh9VfRL+aF3n7pkr0ld0EFIi3QD6B Jy4srfp8PtuTP9wzNvFAw== X-UI-Out-Filterresults: notjunk:1;V03:K0:7RKbUkDkopA=:ysgNLkraRlEDa2s7jo2DjS EzTMIWb7WsoZw5+8EXtXZNAkFExDutJAYn7jOSRNzNrohYVAajt8PX2Exkyj8hEh5PxIRaR4B mthfHhmfgVYIkGhi+hI7EhAIr3kDdmYkH6fKoDBpDzuJAJOBjBfe4lbOVOcRMInatBCrVSJQz R9In+dyoRMtjckse0H1kGv5X9CU50F6MZXSl0LHEcQI7G9HBBe302kj+5atOiOmcq9T6dchOm Emhzv5LgR0l5GL14u2YAop5vzYVB0m8f4hoaNh+97VO5DO2NvMBnCYU6XWkOY4WPGdP3n0L/f k3sU+niH0qOhTZUK86iFMiFFitb3SQ/FzpwINHcUg+3TJq+Bd2YjlEXOIVHBzdVzwMXDdsMf2 mPgXQxADQr7hCfqfsWdRyqAV/D/b45dtZshi+6tzpIaXT8AeqalfN6l8Yw1Nt5Z4FufXEJj7u DXi/oJG6sKrWn08/d6IzVfyqlXJz/8gI6Y6LkW9URyECZE6mcM2rL36bZXo4qQjmzAIkXg1l5 RO18+djrceIPNyfpuN4G1DPKi20AxKVjxABHkt1C4x3NA8iWETKYfA9rw6qIcVkj8zWlBnuFh qC9ILKcI34haepZ9dfhdZq1xXde9wzt7t7/n8EZZAjGUqHym5DGqOzrMiQcWW5cnzrSh5/Rr9 QNi0UNYc3uE2X8ntogNhWZjLpyQtPZCDfY0Lh4N1K49b4Uju0d8IKYVZRsoihzDCgc+qcjO9Z g0qiGFFNLdcOT6IYkW5+PbRt0gxfw/C5/j/VN+Mb1NDxHdnrn2zFz7u/8/X7bVJNPBEKWY2g7 +5seUM4aXmHIbBX29EUcXo8hMnHKLr9Ns/xbsJHw0wGBPOZNAt/oMg+i62BIxbGjr2YnFWjjc pqVjTZKXfVdVlzsn0Tg1CH3yMCj6GFo4o9pfJ7Ky8= Received-SPF: pass client-ip=217.72.192.78; envelope-from=michael_heerdegen@web.de; helo=mout.web.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/28 13:12:59 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 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-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=web.de header.s=dbaedf251592 header.b=TFAK5JLX; dmarc=pass (policy=none) header.from=web.de; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: -0.71 X-TUID: 1Xd4qMc4KYa3 I wrote: > With diary, I can use arbitrary Lisp expressions to generate dates, and > those expressions can also return a string to use as non-nil return > value to generate non-constant headlines including certain numbers for > example. [...] My solution so far: I've set up my `org-capture-templates' so that when I hit T (instead of t) I am prompted for time+headline and optionally a number of days for a reminder, and, for example, when I enter "21:00 Test" and a "2" I get an entry like | ** TODO Special entry: "21:00 Test" | %%(diary-remind | '(and | (dg-it-is "[2020-10-31 Sa]") | "TODO 21:00 Test") | 2) `dg-it-is' is a function that tests whether "it is" the given date specified as an inactive org time stamp. The nice thing about this is that org recognizes the stamp and I can click on it with the mouse to change it etc. And I can freely edit the whole expression. The entry gets listed in the agenda correctly (also the reminder) and I get two appt.el appointments (or rather, my substitution for it). Cons: The headline is ignored, I use a dummy headline. I don't have emacs-lisp bindings to edit the expression in the Capture or Org buffer, so if I want something more complicated I probably need to use *scratch* as intermediate step (I tried to use a source block, but then the %%() expression is not recognized any more, and the time stamps are not clickable any more). And for whatever reason, the agenda doesn't fontify the word "TODO". If anyone has ideas for improvements, I'm curious! Regards, Michael.