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 UGjPIsErlmKqhgAAbAwnHQ (envelope-from ) for ; Tue, 31 May 2022 16:52:49 +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 QKfEIcErlmL7ywAAG6o9tA (envelope-from ) for ; Tue, 31 May 2022 16:52:49 +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 00C7912A60 for ; Tue, 31 May 2022 16:52:49 +0200 (CEST) Received: from localhost ([::1]:53232 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nw3El-00016N-Ov for larch@yhetil.org; Tue, 31 May 2022 10:52:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54892) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nw3E4-00015X-RE for emacs-orgmode@gnu.org; Tue, 31 May 2022 10:52:05 -0400 Received: from mail-dbaeur03olkn20802.outbound.protection.outlook.com ([2a01:111:f400:fe1a::802]:48352 helo=EUR03-DBA-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nw3E2-0007ye-9m for emacs-orgmode@gnu.org; Tue, 31 May 2022 10:52:04 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=E3WWYmyEdOlCwpaNp+dX+TDxxCNRMl10WidGoqlT8bhrtmHIO8LTVhJJbvPTUQpkA87t/l3j5/dnPtG2hBxpKYrIZUVIbYdGvZz/8tMq5mo0wX81EFOytaAuSC4qtXZ7HFc8LWxe2oSRvlmi3HwMrEQsfmEjnemaQLe5cM4H9Y5NaSDpQrhTbbKcJ8pNFTTss9/edexAf/PSX613eWDy4gXBCELvLXMGceqt+e+19YKbl4eHTOokXyODgvq1anE5q1AZZX+uy3ShhYx+8d+PuvHSOTDKEMPt552POe9qSW9W6lb2zmiJB+OPHMTDYSMX0jL9ENps82tHhAbLPGlHeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=6BOFwipF8Lel4G60H5N5JkatOow+Yt4lTKYDiU7t8k4=; b=P+1JaYe5gQ2/+VsBjxXbNWT/e1e5oDUJAyHDwz9sxg706Ziu34KshLz8sn6SZGsnzHqIASvbl8DIADbCfDJoo/kibwUKKBbtHhZGoXT+8p4dpOEyO0vV/YAYhGJF2fYxkzVdzO1JQ8YCEUyBaNdMaVdZpxgKCMwr1VcCnhhLoHQtn+6iCsq5lXwRis4rWRK65ayPj1aVOsdAOLw9I3zftz33IBXMT6m+sjMS2Bk+cvOUjEoepuzO4UCJTKBLZIZs99aEdsoE+6HDW0EQHsH0jRTh2JPqf2tP1stFh75WJllci+ZrIeUrS4/QRumww7qEcxsbF2WY5VA/YYP1Una89Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=live.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6BOFwipF8Lel4G60H5N5JkatOow+Yt4lTKYDiU7t8k4=; b=fRiCsMJ7oLHc5wD+j/jz2GUN+WKQg8SWDTKEUav0NRw3qS9dQ3ePVU1luAejk/kchlN9kbtReyl4gpoHKSjSCI6zk1FExOVdoWp0bPdZqdlNQf/czdTjborhRQo9X4Nue1Lon45CViJPIWHcihAegOma7l7EOY/UbjAblVH1i9CICMc1q2v4HouNwYHQIfJyu1Up/d0sCGA6nU3em+cTlxRgxaaymGC17pqoWjmHJONGNi2tIUVAhMVHzqVU7tqhM2wy4H3GExOeyS4dasrC1j3rljsXnITLnes8rhugxJ29qDkFEeVOHRK1rsnIU4DQykIWPnvmOVxsMz76VOlymg== Received: from AM9PR09MB4977.eurprd09.prod.outlook.com (2603:10a6:20b:304::20) by VI1PR0901MB1584.eurprd09.prod.outlook.com (2603:10a6:800:8a::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5293.19; Tue, 31 May 2022 14:46:59 +0000 Received: from AM9PR09MB4977.eurprd09.prod.outlook.com ([fe80::48c7:3657:142f:a842]) by AM9PR09MB4977.eurprd09.prod.outlook.com ([fe80::48c7:3657:142f:a842%4]) with mapi id 15.20.5293.019; Tue, 31 May 2022 14:46:59 +0000 From: Arthur Miller To: Ihor Radchenko Cc: emacs-orgmode@gnu.org Subject: Re: Proposal: 'executable' org-capture-templaes References: <87mtf3tui1.fsf@localhost> <87pmjyco0x.fsf@localhost> <87fskrobiw.fsf@localhost> <87a6ay1enh.fsf@localhost> Date: Tue, 31 May 2022 16:46:57 +0200 In-Reply-To: <87a6ay1enh.fsf@localhost> (Ihor Radchenko's message of "Tue, 31 May 2022 12:58:58 +0800") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Content-Type: text/plain X-TMN: [W3RiEghzl9xGwomUccu+U/bNbweRdh4Z] X-ClientProxiedBy: PAZP264CA0067.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fd::10) To AM9PR09MB4977.eurprd09.prod.outlook.com (2603:10a6:20b:304::20) X-Microsoft-Original-Message-ID: <87a6axwyhq.fsf@live.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 68155b46-1cbe-415c-f3a9-08da43146a08 X-MS-TrafficTypeDiagnostic: VI1PR0901MB1584:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5UtYd94fvsFPNZDHuh1jbyU4veBKvTbWv39+Hy5VNxzmfrNdDO2lbF6dCLdcbETGI3SwGWQ9VD4TQFzZIrlmtCW1LdxZdaURpdR+6CfL2Qz5Mt46mk0a/4ta+moUABN09LGcXonVkWm9KZ375B8GCIr6qD22JlYxYVN2p3tXYV/xWCF1xy27GWnduP/2UtVcl/AXsnyuzIGYAdgb57wkRb4cxeBq7k7zfsnI9dXDlmjEqyCf2CGmiOIMS60lDnGketcxUwJTjcFYY8zy9fa8krMuTy4jqISPr/6xYfHY4ZcmxA+ttWp0ygK3T8LtK4Mi/CyFNeuY6mmtBQZCO7v+UMeb7uwzbCq51mKpIP0JrcT8ApxPs65gJBSlVESnR5tAxts09+L9L0WkHFq1zp9tZHWmuLb872lkQJJlf4Yti9Lexhsqrx0Y4P1gfN253Y0T2ynX7K2/hXMdGbyRFRkE+kPINEjmAubIxb3uCO/yBCs/zAOk7jQuVi2t/Y5jkTwwz+i6UTYHB0QY29u7jY01RIdIfcj+M8f5/30uhmfIbd9wBgVi1XE5tnjzQhHA9/P+hU5kC0QQNukLZFhXeljjRg== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?xEtG9QBI6VUX6bCn2G6bPjBcbpl0ADRyY+BPv0BHiHxkkDfFfn1m3oU6LY37?= =?us-ascii?Q?v2Y2qIlulE2f2wW10qLP0V/fhJM5/loE/odjRKuRdD+gKwH3/5Rx0wg+XrrC?= =?us-ascii?Q?xtzvgVXBHwdokLBn3JsLBUiJm5uy/sHBZQtqL5F4opGTrdU5NkGCovZYXDfE?= =?us-ascii?Q?IdYKQimdtZrc6XggGcitGP3DMW8Pqc4WWrlM57crf0TfiuH1Seah6KSaLYsK?= =?us-ascii?Q?x4dPb7uzclvvNKbAWVDE6gHelF3q75a7tSubR2eP858YesGj9H1EHjFaVhof?= =?us-ascii?Q?4uTYQ1K1niY4QBVK3uO9/tETZ1Daq12+0wNXMQvu7t4vhPqv4v4DN8m0fcvH?= =?us-ascii?Q?/31nOkeJvs9j0cg/gUJxoyMzkVWDi+t4d3BGDkWnLOivB1Y2coD48vTe+C5r?= =?us-ascii?Q?9KzneRo7JHmtVylvAfqYz+60VuWzznNpyxPRzxWz5MLzP3eG5cBP645QDZtu?= =?us-ascii?Q?a+4ci8oJeKhNZHNY8WizANplwHoucdPKCcqImSGpz/8mCvzp4dky6BF9yr8x?= =?us-ascii?Q?T9RICc7Of9s4QeORs4eZ6pRriXSmciiWqcHhgcUBexsTEtDzHyZqVrzTjEfc?= =?us-ascii?Q?vMsioptDTFiFNqKOB8yN/vZoln7qaHUtze2W7/wsiL8sblCv7N04GgHpwuTN?= =?us-ascii?Q?bYqgaDNpuYQY1EbkCrjKuNArFjiiGyvtb4qQsaJ1gIBAud2chaZDYqrRhEB6?= =?us-ascii?Q?jfWhH9yUo9KwPI5JUukmfb9hDjFx0P3GH5agyeOYdlOGRoDprOGyntty6oCc?= =?us-ascii?Q?qIP7Chl+k/PiWyL3bEBnt0fquATLw1G+nn3DdgmfIaM3GI4ECf1QE5Azcadv?= =?us-ascii?Q?4YsbRJnxpX/S3jsXNFO2QiGBic/hFRDMBv4kDZ2CE32Khnbbfikteqf+k/BR?= =?us-ascii?Q?TYO6Wf/y0PneG/fKfIdPpOHuRf/qrVr0qwIBfDE9IZLgANPn5PU2U3ssbjfb?= =?us-ascii?Q?o+bFQiuqu4nOB+JvjYyJvKDosZDec4XJ0WGOdPFbBmqcz7IDEBRlL1jTmtoP?= =?us-ascii?Q?oVIes5czIUBa4KL9H7652jT/pRdwBjJs1FhqpF/dmSMR/tHmGD4KFGpE9Bbb?= =?us-ascii?Q?+PdL6Qat89JAbSrFgDjr08wzDjVEHcgy4UKFQVPcxNc6Ys6s15mZdRtpUz9i?= =?us-ascii?Q?oluBcT4m3l7FSM61FJX7yn/zzYGoWJCuRvDdG3xJvBVQwqbM0bmeCy7d2/T6?= =?us-ascii?Q?R0MEeTc7aAWl3lp86eMvbPLXx3FZgLPcTpZ83o96lp9HhlHHKJzO72dc6/8G?= =?us-ascii?Q?WF+gOHf1p0ErWuG72mSWNWtaphkV5pH1YzgptyKkn4ELxSd92WAzOnFzVgbE?= =?us-ascii?Q?5qA/9ZWlT7CUE3eRKPRxz//TwfTJX6g/31SlLJezyjcZgTaUi6Lxo6DBHhce?= =?us-ascii?Q?9bfd5OtrYlDSz64uD5hM2QwLyTyIN2z++3x2MDc7wYNKfsTxlm3oSmCIuKYs?= =?us-ascii?Q?avwQijunMYQ=3D?= X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-64da6.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: 68155b46-1cbe-415c-f3a9-08da43146a08 X-MS-Exchange-CrossTenant-AuthSource: AM9PR09MB4977.eurprd09.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 May 2022 14:46:59.0598 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0901MB1584 Received-SPF: pass client-ip=2a01:111:f400:fe1a::802; envelope-from=arthur.miller@live.com; helo=EUR03-DBA-obe.outbound.protection.outlook.com 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, 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=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1654008769; 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=6BOFwipF8Lel4G60H5N5JkatOow+Yt4lTKYDiU7t8k4=; b=b5ePvVuWP9g3Lmy3K2uPIoxvrMPudfxqW+fd1hfKFls97PzABcT0LOTKijqC2qMTOfQBBo 5CydN3yUxHReyunjUB+Lvb927jTd8zgdBZ6IpcUx7ijcCtZ8P4Ilv1w/nyxladvvFC6TnC jzIPFlxInPTvJrmrzT39fJiB80njLLuZw0ScWy+TEJHqHmCJW5l/rSI485+RrGB0ZBWHL5 qkxhEJfAxkKjJ06ybjw/LSGHdWnvUEy4Jf/iYYRu74tlMqtnUnyCH3z/NLeN6CB/6sM5nU fpzRRJgupMZA0mI0U/ZFmLveCpWpLCGER7hbhlIq8WH0snRkCtKnnfuUJfwT9g== ARC-Seal: i=2; s=key1; d=yhetil.org; t=1654008769; a=rsa-sha256; cv=pass; b=U7twTgDuLG8jd+qe2xp31BXfEWHwZ/WMewKluiyiXi01FhAFdY8YgKkiI6iBuacaafS/oB HPOafqlxjIndXuM8dfMzfJkjuZNciR12Ich40zptdwsRovPxVa5Z7HY/0MjaYdy5xdGENT Atg+IiqcHvt57rcjXAvFW67DfXX5XJkYd0/+iqge5oRMLmYkjaIj9WghNgLgoYaItrRIWo UjCUMF3JoPlUKPJ5QvExRXQrrI7+iGIPFJI0/q/jjX6wgN2KBjlFHRULsKs9/fnpHvxb19 2BM2ea+zOjHTtCGra9G6OBB2Jnkz0y1wGQU0j+FLEdCz1I8Y0PoY0JQ2AKE+zA== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=pass header.d=live.com header.s=selector1 header.b=fRiCsMJ7; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=live.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: -10.34 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=live.com header.s=selector1 header.b=fRiCsMJ7; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=live.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: 00C7912A60 X-Spam-Score: -10.34 X-Migadu-Scanner: scn0.migadu.com X-TUID: Dzfmlpp5X/lY Ihor Radchenko writes: > 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. Thank you for the help, I'll come back if I have to ask something for sure. I have looked little bit into org-agenda-capture and org-mks that does the real work, but I will have to familiarize myself more with org-agenda and other places before I dare to suggest something. best regards /a