From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.help Subject: Re: Syntax for <%%(diary-float )> Date: Fri, 21 Oct 2022 08:03:47 +0200 Message-ID: <87fsfhzpa4.fsf@web.de> References: <81D47CAB-50F5-4EF5-88E0-D6A898AF1FFD@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10492"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: help-gnu-emacs@gnu.org To: Renato Pontefice Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Oct 21 08:28:54 2022 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ollWX-0002Xg-C0 for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 21 Oct 2022 08:28:53 +0200 Original-Received: from localhost ([::1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ollWW-0003wt-Ad for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 21 Oct 2022 02:28:52 -0400 Original-Received: from [::1] (helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oll8b-0002hx-OA for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 21 Oct 2022 02:04:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oll8Y-0002fp-7T for help-gnu-emacs@gnu.org; Fri, 21 Oct 2022 02:04:06 -0400 Original-Received: from mout.web.de ([212.227.15.14]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oll8K-0008DA-L3 for help-gnu-emacs@gnu.org; Fri, 21 Oct 2022 02:04:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273; t=1666332228; bh=ETarFtfF5o9/Nfrxg32SApxt/bTBvZcAXqaXtCUvYks=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date; b=uAKNL3Q/G4czBFYVK2nHRd/XmtBgKegodHPUd8SDj9I6K0VX4pCb4HFVltjcfqouj Gurox3dAY15I93ccOt4tlCp9r2iiENZDtDj+VaYU0+lSoXZDAfmNoRciqodNBlBHp3 pASD5QD9Ik9J6B0dg552xIcv2giEfa6pGMmPQMtFTsw2UNaHxzbupwAqOeR47qDcz7 NONoSdJGemm1kL3DeZBHEeOqxfV193ApFGET/AG8DbiIhsUA1rWdBoa6bplw/UnmBU Y3VM8A3AbxFaAJ0spjaf2YoC1MDqAyX8OSn31nMDLBl7YhZ2bliODS9btDukKrDNfz N1xK9sYHyizKw== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Original-Received: from drachen.dragon ([188.105.185.54]) by smtp.web.de (mrweb005 [213.165.67.108]) with ESMTPSA (Nemesis) id 1Mr7ac-1pPzFK0L5i-00o8j8; Fri, 21 Oct 2022 08:03:48 +0200 In-Reply-To: <81D47CAB-50F5-4EF5-88E0-D6A898AF1FFD@gmail.com> (Renato Pontefice's message of "Wed, 12 Oct 2022 20:19:57 +0200") X-Provags-ID: V03:K1:ffE4wgVeYqlv13EaLS2HaYT6LGnPyjDOyC/qil0DgDaa4z38YmH R7J0mMB4izgzh2f1i+u17okmEPeOv6hUvhGMHSL19x5mJghVkdl9R17wKQkEWcNG+4UA2gO Mk/5JTuN5y5k81uJE0SSbYKc3of5zPaRGwUh/iMJ3ezyOTQLjVO9b4CHPFFB3m31PDOCiOA iRq/JAPZAK2SgmSCDXVng== UI-OutboundReport: notjunk:1;M01:P0:W2RfBzdAOTw=;XLnQ6WTJj1X56Is7qRI9Vqyb/re 8OfBbkNXr+FfoRLADc5xvDUOTKKK0uwy0KSkjryVGFLZ6G+rSgxdYDLhv2L1lfhB72CUcW4Yr s8rjGMvGmwe/dgYDtCVbblJ0xSyvghyVn/kWggzXnzSDv8PatcWY4VqW7QnJRJwRzqS+FKdYb vqB39c97QMFgypPKdtpjrRlzYnk7EYg6K8p3Q0v2Ph3eFAqd2k15nmrejO9qEM5HglYYY3aiQ 43NmAdHJjl6Ppdk3dSMq7x1zI/m0o5xQ63v+UO/mrYWVVZS3z/YD0jGLhUfUrbyhxw3EdVacO eCsfBbIPEO+lJVnVS5VeJd7DsLxTvpnvZhEJMRQmHTZkZCSTNVfbv1afdFLqfoMt0n9+eFSA9 yuMvgkn+RRnMUs833smWd7rJNwZu9VQrweosdbukS8W7/rjucq/NlfRfbqg4OvPKzvHXORgyV qp5xJmxORs8ojtfoub4w3867D+vMPUcvVxGPRG3OUd7RUoWq1kZqeMlM9OKrI8ainK+Sas5td /bFgf94pBTUjbU70g4Bw5psNVlwyEbvqZJv8SEfDjzrAKzzmwuv9U9Cob41IGdqQTphfOH2LD P51AV9sQ0ZG5k5lL6u3OMFs+UuLfBTyn1Yxn8wCENt2O6erR9czWb7DhFlNUrnxsQo8uf6njD vToB2JuO8pplmz8hFmi7dMUIXMEOMCD/ahO2Q1Y/HPNEUwTMf+wBkqazSpb9f8kQYbDorI0F1 VjGfG5tmTDg4YJ8rhXW69pmdjtsK7HIIziUaZD8lZo9bRjiOp0U7AEjqe5VIo2+kEYT4+Zyn Received-SPF: pass client-ip=212.227.15.14; envelope-from=michael_heerdegen@web.de; helo=mout.web.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:140231 Archived-At: Renato Pontefice writes: > Can someone tell me the exact syntax if this statement? So, if you have more specific questions about diary sexps, please ask. I can't tell that much about the syntax for the usage in org-mode. If you have found out your typical way of use patterns, it is a good idea to add appropriate entries in `org-capture-templates' for them (prevent mistakes) and use org-capture to add such entries. You can call your own defuns in these templates if stuff (e.g. input reading) gets more complicated. When you want to use diary sexps as timestamps (e.g. following SCHEDULED or DEADLINE keywords), AFAIR they are not allowed to be multiline. That will just break them. If you need complex diary sexps there it's better to define a named function and use that (in one line, then). For org agenda generation as described in (info "(org) Weekly/daily agenda") you don't need timestamps - you can write the diary sexp in %%(...) form just after the property list (if there is one) of the entry, and that %%(...) syntax _is_ allowed to be multiline. Another important difference is that in this case the string that appears in the agenda is the return value of the diary sexp, not the headline of the current item (as for time stamps). And then let me add what I always say: many people have a wrong impression how diary sexps work: these can be _any_ Elisp expression, anything is allowed. There is no limitation to use only built-in diary sexps, you can freely combine them, define your own ones, etc. The (only) rule is: A diary sexp is evaluated with the special variable `date` bound to the considered date, and it is considered to apply for that day when and only when the return value is non-nil. That's all. The built-in diary sexps just implement that - it's a good idea to look at the code to get a feeling for how that works internally. Ok, that's all I could think of at the moment - any questions in particular? Michael.