From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id uJpECTqWO2IKRAEAgWs5BA (envelope-from ) for ; Wed, 23 Mar 2022 22:50:50 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id YITtBTqWO2L+XwAAauVa8A (envelope-from ) for ; Wed, 23 Mar 2022 22:50:50 +0100 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 CA8163EB3 for ; Wed, 23 Mar 2022 22:50:49 +0100 (CET) Received: from localhost ([::1]:36594 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nX8sS-0006M4-Ru for larch@yhetil.org; Wed, 23 Mar 2022 17:50:48 -0400 Received: from eggs.gnu.org ([209.51.188.92]:56296) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nX8rP-0005vS-GO for emacs-orgmode@gnu.org; Wed, 23 Mar 2022 17:49:43 -0400 Received: from [2607:f8b0:4864:20::52e] (port=37791 helo=mail-pg1-x52e.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nX8rN-00069Q-CI for emacs-orgmode@gnu.org; Wed, 23 Mar 2022 17:49:43 -0400 Received: by mail-pg1-x52e.google.com with SMTP id bc27so2276299pgb.4 for ; Wed, 23 Mar 2022 14:49:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=references:user-agent:from:to:cc:subject:date:in-reply-to :message-id:mime-version; bh=xHyrdztYWs5XYU1LwY50sA9WIzQDM/vqm5B+lNmHJFc=; b=VYlRlE0SwZ6VR6bKGyBrVQqDARmF882ZMc5qiBxT6Ed0qHLuJeMLMYS88GysDVwgiO ixWcPRN+DYzMiKMPhyp4z6v7dEmsZXUFPDs15c7gbBZe/tX8WGRnw5p0KUeTu4GpSZuj lAlQEpAar8KIFwfoi/cUj+UscXvn3egqVMXbegbha53xGGcNvDOVes9Dkh3SHkI0mNhA 3HZKvfPCdkfcj/oJzE9e+0P7Hv9sNEBCEYmAMhRbvpNaZlXaAn+6NFmoAYM2dEF0pqSS E76Iqb75u/ZVCx2YEt9GxypgpeorwcPtWegWTXj5j65OaSvwrMJdTusH9DzMC9mHsOss gDEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:references:user-agent:from:to:cc:subject:date :in-reply-to:message-id:mime-version; bh=xHyrdztYWs5XYU1LwY50sA9WIzQDM/vqm5B+lNmHJFc=; b=Le4F4d3DUCl4I2sEmbBS40LCfLy3IX+R1vMeAHP20pe8JNqt42Qak992alSIo+s5ov IMV0uqS5YTjYdqaBjLzzWHGO/dqi1AsCsPlQLGgFwTG35GE6bVc8G1WCkGkyUiqGKzry 29Nk57WFaNpLgDqmSHOkaubn8v8HWRejIgq4xARDFpRzaX0uTuicDtylUPLNtXQX1tda I+cPqn2hKWCJ+gtUpeamjqH+Ws+ZyAjGrAP7eywGNfhbP2Gko3XfQa38elDzpB44UhVo 6UhOVKmkp5oqvOBf5EsIu2QgizPb5wjxQz9FmJuHAvHkSrsJU45/NJQ3sx10SWajAT5n ftUg== X-Gm-Message-State: AOAM532L1EoZeM5Sf/6QXYs+WM+cPjL+eretGOLyH1ecmkikG1Eu1zIZ +y4lrMVXT9+Wdcs4U3zT72Y= X-Google-Smtp-Source: ABdhPJwXtkX060OvxXrEFjDWv6dz/zSbHpzjXUWBRzs2BDosPDWea8kJUvF6Jcz/HPUPig6s2OGU2g== X-Received: by 2002:a63:3688:0:b0:382:8bf0:aad7 with SMTP id d130-20020a633688000000b003828bf0aad7mr1499059pga.602.1648072179473; Wed, 23 Mar 2022 14:49:39 -0700 (PDT) Received: from dingbat (220-235-26-154.dyn.iinet.net.au. [220.235.26.154]) by smtp.gmail.com with ESMTPSA id v13-20020a17090a088d00b001c64d30fa8bsm5627763pjc.1.2022.03.23.14.49.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Mar 2022 14:49:38 -0700 (PDT) References: <87wo66t8i7.fsf@gmail.com> <87y2qlgq33.fsf@nicolasgoaziou.fr> <87d07wkbkz.fsf@gmail.com> <87czihdiyy.fsf@localhost> <875yo8u5kj.fsf@nicolasgoaziou.fr> <87bkxzd5wc.fsf@localhost> <87wngkk4vc.fsf@nicolasgoaziou.fr> User-agent: mu4e 1.7.10; emacs 28.0.92 From: Tim Cross To: Nicolas Goaziou Subject: Re: [RFC] DOCT: Declarative Org Capture Templates (easier template syntax) Date: Thu, 24 Mar 2022 08:28:47 +1100 In-reply-to: <87wngkk4vc.fsf@nicolasgoaziou.fr> Message-ID: <871qyss5jl.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::52e (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::52e; envelope-from=theophilusx@gmail.com; helo=mail-pg1-x52e.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 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, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, 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: , Cc: emacs-orgmode@gnu.org, Ihor Radchenko , No Wayman 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=1648072249; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=xHyrdztYWs5XYU1LwY50sA9WIzQDM/vqm5B+lNmHJFc=; b=sig9YMdp26HdDT8yIF7tm6oCdxOF99T7pLrba4z1giUrqIv1z2v2ygGCFlMrS0gNtJIoie R2E9BN07iKqau/BBbxrpkwgterF/O1tD+peyaMnUYvtEz0uXG12z5A1We8C84SDZOdGIeQ TuB/BQX/OOao7SYhKb6J3vqJv/MPZX80I/2BcQ4R12vZlUOQOjjjfGtKIW6gSqVs7ExBUG iMGpIUzpu8Lkwa08LlAhOJpP9GPgvf++FTbhLADGwfRqN9ILmecmzK0wSRxlHfHo7meYz0 4Fiqyj/Q4yj55S6S7fqrZ9qUH80rZcbswgkIpe1KPPUC+BetTXvZhZUQ+RntAg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1648072249; a=rsa-sha256; cv=none; b=blR7kYjBGPBTbVo/isWOVg4j4L8l3lpTnAIUBSXEJKOATFx5Kjtu2gdZ1FQXVD1uXDBcOA EppPsJk46Q4A/WtEaDPa+K7ZKVWVYcd42IKbvy2OxBfvoLEqzPwrSGQvoIH1xzw1KpML0d 1oNOv96dn8K+ourV0zBcVg/gOotshCa+k2VoZPs+Y64eh/MAXa4lGG9Pkzc4OAnumHrIRP SwkkUInoq6EFUba7vpU5nkbI1fbDfWADpElBcIe56vP7sl2Oe166gF/428aD8JsSSqKjnf nhyYf08F5mbfOP8ro/215XndqEFkWCR3FdNo76cG1XDcQNwEirMW0/NcWYTrjg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=VYlRlE0S; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=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: 5.81 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=VYlRlE0S; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=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: CA8163EB3 X-Spam-Score: 5.81 X-Migadu-Scanner: scn0.migadu.com X-TUID: 4QWq7XOJVNlg Nicolas Goaziou writes: > > Ihor Radchenko writes: > >> Nicolas Goaziou writes: >> >>> I think there should be a direct mapping between Customize interface and >>> values. Adding this macro as a band-aid to simply configuration is not, >>> IMO, a solution. >> >> I think that current customize interface for org-capture-template is >> perfectly fine. doct aids users who set org-capture-templates >> programatically. > > I am merely pointing out that the programatically defined value is then > no longer compatible with Customize interface. It may be important, or > not. > This could be an issue for users who use both customise and programatically modify their configuration. > The fact that we need a tool like "doct" to write templates in a compact > form may be a sign that the data type is not good enough. Actually it > sounds like a failure somehow. > > Should templates definition be more compact out of the box? Could the > data type be made more powerful to permit more complex templates without > relying on doct? IOW, can a tool such a doct be made transparent to the > user? > Yes, I would agree. Such tools are generally a 'code smell'. Underlying data structures should be transparent and not require helper functions to assist the user in creating or updating them. While I can see how doct can help with some use cases, I'm a little concerned about the mixing of both setting of the org-capture-templatges variable and adding/manipulating hooks together in one function. It feels like two separate concerns being meshed into one function/macro for convenience and attempting to work around limitations in the existing system. As you say, doct might be useful as a transition aid, but perhaps the correct fix is to make it largely unnecessary (which I would assume would also provide the additional functionality it offers to users of customise and not only to those who configure their setup programatically). >From a personal perspective, I've never needed the additional functionality offered by doct and while writing a capture template does require lots of referencing of documentation, I suspect that even with doct, I would still need to do that as I simply don't write new capture templates often enough to remember all the options (even if they are named rather than positional arguments).