From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 2PJTIqaglWLQeAEAbAwnHQ (envelope-from ) for ; Tue, 31 May 2022 06:59:18 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id MMdKIqaglWLblQAA9RJhRA (envelope-from ) for ; Tue, 31 May 2022 06:59:18 +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 32D4D1CBF9 for ; Tue, 31 May 2022 06:59:18 +0200 (CEST) Received: from localhost ([::1]:44958 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nvtyO-0007h4-Md for larch@yhetil.org; Tue, 31 May 2022 00:59:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59214) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvtxW-0007gg-Vr for emacs-orgmode@gnu.org; Tue, 31 May 2022 00:58:23 -0400 Received: from mail-qk1-x72f.google.com ([2607:f8b0:4864:20::72f]:39705) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvtxV-0001Sq-FU for emacs-orgmode@gnu.org; Tue, 31 May 2022 00:58:22 -0400 Received: by mail-qk1-x72f.google.com with SMTP id 14so12431132qkl.6 for ; Mon, 30 May 2022 21:58:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=z9qojsHZzOOpVCgllJ8P+ZqdmB67Ae1htF79MQ7N5rw=; b=HVeQlnNm3MG0MYFvjjdVaxjVMrWmSMqhVATUgT/9zKQmK4H4XmIdq5EeCEcSYqDE5F KSf+0ZkRj5iEpfZ+Gk58MGbjUUfJooKiR6iJaYptf2ogV/y+Wi/yBzgP7Y/36oWAueJV 7meWCmVOpUBSfiKu3ull05vadexALTQ8s+fr17ADnD4iG8EIyaMkcMrzhYKJFQAtj5TP GntE60Zw9VG68Dz+mr+riEYJDI7iVhNhjqHU+jx+473MRFWjRgJuqGdaiiORcVDc/m1f x8h7t/e6o5rkj/GrY1foHvhaGa/UqKYM5CGv9iPPZy26mSCBAl4ay8G/Zqgi+gKGWaBu DKLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=z9qojsHZzOOpVCgllJ8P+ZqdmB67Ae1htF79MQ7N5rw=; b=6WyH+zO6JDHt1JaeA5PoH3FjVIj1UqoxRk8/nkqubgjrn+UUlaH+g4j+Whyb6lyNSp 49ZEuwvJ9etu5Yw56yyYnqQWjkY6f5t7ae7wjx5a72ke7RxX3rMhtn76tJixSSCT4VJp v340iflt6JokTzO20mKKH6xSb4a3aHfqZTAkCWaZBZErQG2txElQVXMce9vFQ2SbrJBu PWE7ddvoqvDNQ5efaGZnxgIrso+2PayHaaqgGpTobAxebjPdqJtgYNThFs5RQ/LB+eAb jfl7pIE0di05xc5+BFx8PMblzPGjEA6747rkMdoxkhQRVtUuCoNdymBso398nlCoKGda K5aQ== X-Gm-Message-State: AOAM533zPQ/P4nRjbNRiwX6mcCHduPFEA2KpjCKHCuLLoij6waHGGJol dLMnsqnkRqLx2jXNmtEVa0H+WKLj9gU= X-Google-Smtp-Source: ABdhPJwtwfHaBK0NHgxvYEAeA+LuQppe1+bDrjTHdwU+1sIPTBlrmlBb2TBJ090nYQW+X2bpKrw3nQ== X-Received: by 2002:a05:620a:29c2:b0:6a0:5fac:2f45 with SMTP id s2-20020a05620a29c200b006a05fac2f45mr37445972qkp.529.1653973100097; Mon, 30 May 2022 21:58:20 -0700 (PDT) Received: from localhost (22.b2.a86c.ip4.static.sl-reverse.com. [108.168.178.34]) by smtp.gmail.com with ESMTPSA id d13-20020ac84e2d000000b002f39b99f6a3sm8243482qtw.61.2022.05.30.21.58.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 21:58:19 -0700 (PDT) From: Ihor Radchenko To: Arthur Miller Cc: emacs-orgmode@gnu.org Subject: Re: Proposal: 'executable' org-capture-templaes In-Reply-To: References: <87mtf3tui1.fsf@localhost> <87pmjyco0x.fsf@localhost> <87fskrobiw.fsf@localhost> Date: Tue, 31 May 2022 12:58:58 +0800 Message-ID: <87a6ay1enh.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::72f; envelope-from=yantar92@gmail.com; helo=mail-qk1-x72f.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham 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=1653973158; 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=z9qojsHZzOOpVCgllJ8P+ZqdmB67Ae1htF79MQ7N5rw=; b=bMHg3K6dRXWdYDolk/sIA2AqENbBNRPW0w2G+6a+fajdOD9J9Ece5GFlKvODU78JTemzC0 hZu3dyqGmT22eyG/wFPbUkov/XXnUs/CuI619bf1hHDmvN94g/q2PHTpgH56dakTf8Ca/8 yHZ1KXm43/rXid9et9b1w9eY1OaiuOoo4UbMWHwQF1aXLqEF2O9HTahGW3aWw64C9DKlrk zYhSmuDsiwndnOdXfEDCbyb1MId8B1xeU5zwiTPSzT1+3pzXsZ3rlw9+xoPE124W39r/Uf Vg/OLfveyUxPX9S9t1G/tVil9r5PXwNWYMWxfQAbtrtYRSu6nbePB+gd1x3ULQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1653973158; a=rsa-sha256; cv=none; b=FErJKy/Lyqw0oiVyH8mmMwOw1pKkAgpsJH778zB0dLFpkBrOAnRHL9by877pOHNgAoSdXh yJ24pvJY5H4ReHqGD2WT31Xb58bFZ/MsznnurW8KMx968NAaNM0xO4vISuGJ16UdQdEWlo PPRgrZWAvJxkd44Z0sym2bldk8Ho6ThDCZsRAOjm2F4Tv0QWmw0HHL9WqVG7KvaLrSQfX1 u6CPNiuBFK9/a0SeG+UKFi8mLdsQa9+vfKNMWrOs2CsdjUggTVHu0Zw3TPHrlfGbHp84pW sOKS53U52cHS4l/Ye/04dlQoa5MDyXwuoaIw8oUTAO6vl4iMW0lb9vhQLFylig== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=HVeQlnNm; dmarc=pass (policy=none) header.from=gmail.com; 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: -7.03 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=HVeQlnNm; dmarc=pass (policy=none) header.from=gmail.com; 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: 32D4D1CBF9 X-Spam-Score: -7.03 X-Migadu-Scanner: scn0.migadu.com X-TUID: U7hrnsBRGyPk Arthur Miller writes: > Instead of hardcoding the actual work in the conditional statement, there should > be a function to be called, so org-capture would setup its own work, some random > "exec" menu like here would setup its own and so on. I haven't look at other > parts of org you have mentioned, so I am not yet sure if the approach would work > for all the kids in the block. I don't think it would that much harder to > refactor this out, but I might be wrong, since I am not that familiar with org code. There are several slightly more complex things in org-agenda (you can set extra switches in agenda menu to affect the subsequent command - see agenda restriction), but please by all means go ahead if you have interest in this area. > Factoring this out of Org itself, as suggested by RMS in the link you posted > might be much more work though. I haven't looked at that, and question is if > that is really worth the effort? I would agree with him that things like > org-table and date/time handling would be great to have in entire Emacs, without > need to load org, at least bigger parts of it. If I remember well, table mode > started outside of org as its own minor mode and got merged into org. This is not an immediate goal. Rather a justification that we generally aim for a more modular code structure. >> The above statement is a hint that patches are welcome :) > > As said, I am not that well familiar with org in-depth, and with other places > that might need to be factored out, so I don't promise anything. Initially I > just got a quick idea while working on a project of mine with org-capture, and > hacked the 'org-capture' function to implement my idea :). Feel free at ask anything if you encounter difficulties. It is not always trivial to convert something that works for you personally into something suitable for all the people using Org. Best, Ihor