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 0KxLI2dhkGK1ggEAbAwnHQ (envelope-from ) for ; Fri, 27 May 2022 07:28:07 +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 aClBI2dhkGIXkgAA9RJhRA (envelope-from ) for ; Fri, 27 May 2022 07:28:07 +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 3BCCA208AE for ; Fri, 27 May 2022 07:28:07 +0200 (CEST) Received: from localhost ([::1]:37454 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nuSW6-0005mg-3x for larch@yhetil.org; Fri, 27 May 2022 01:28:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56694) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nuSVH-0005mX-ID for emacs-orgmode@gnu.org; Fri, 27 May 2022 01:27:15 -0400 Received: from mail-pj1-x102e.google.com ([2607:f8b0:4864:20::102e]:42670) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nuSVG-0005cm-1W for emacs-orgmode@gnu.org; Fri, 27 May 2022 01:27:15 -0400 Received: by mail-pj1-x102e.google.com with SMTP id cs3-20020a17090af50300b001e0808b5838so3455891pjb.1 for ; Thu, 26 May 2022 22:27:13 -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=CNSBSCKL3/BKPXldqOJQgtaatlo89tiYIZR/v3Yoqss=; b=dcH/SwAOTsVjMu2QqUk0klKmGKKPbRNPFzScrjg8Ju2rd4jRKkDiWKcgc9ryiqxWFY 1Q05lQVVUcniAFUJvUC+bZyDLHBSoYLClevQaIwjZZFsJ21pgvvSKWHr4Hx7CHyjS9xz xjo0V1CgwG3JaSxN4aLIt+D1TMLitWZWKMuxSeP0nRbT/vY/Go/AoR8pOmKaW9uU1yNb B7dqgvGVfI8uFt13ElQJ1viWfNZW6+iALkavNQAaxqyfg3p1vBw6a56LCfQSiARE5U6j T3DM8GgSTgsr+EeRRGh7Ufq/ORjzXqKMUXbdCQzZYxypkqfT4pzZBgTpHwQw5UemfgL7 RjTQ== 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=CNSBSCKL3/BKPXldqOJQgtaatlo89tiYIZR/v3Yoqss=; b=WW68PVh+gL9Y6qK23XHAiI+yBpPCeoPi5q7ii7kRizkrGnFnWiy35kv1soYD4k6mD+ Xlj65BFvoMWowlVrd5w8snmgzLZSWGOOF9DLIDeS7+DvKo/USpSJ79LsMleL9wD6xceR D7+lQhrabT+v9fz5CPrsgPUAAIbD7oUCt4SeXOKTAnf6OrZkV5k3S79gSBCmOReCp0kB 0AgYcN/QyHlv5nKVYDrfVxUnz7DCeSwtdhputl2MQZJ61YvCWdQsWV0RexUlklk1ONji GTEylPZu6NQMImuC/UHTy4YKxhk8woHKeWND/ADQMLTeofwYmHr4UP1jlFiKWdq3RQrt nIIw== X-Gm-Message-State: AOAM531/kVh3rx53Bp2BDrX4c4q+HZdM96XpocNSuKhMdSrcuqr9o137 B75HDMuodgopBDSP25wVaCk= X-Google-Smtp-Source: ABdhPJxlF436Sw5nk/9jmH02R5L2EYPs90kpcaT5JsxbbsbasCRcuH6UWSK1WUhQp0T9/bTVgHLR8g== X-Received: by 2002:a17:902:854c:b0:163:7dd2:130f with SMTP id d12-20020a170902854c00b001637dd2130fmr5534939plo.57.1653629232411; Thu, 26 May 2022 22:27:12 -0700 (PDT) Received: from localhost ([104.223.86.8]) by smtp.gmail.com with ESMTPSA id r14-20020a17090a940e00b001e0abbc3a74sm628053pjo.5.2022.05.26.22.27.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 May 2022 22:27:11 -0700 (PDT) From: Ihor Radchenko To: Arthur Miller Cc: emacs-orgmode@gnu.org Subject: Re: Proposal: 'executable' org-capture-templaes In-Reply-To: References: Date: Fri, 27 May 2022 13:27:50 +0800 Message-ID: <87mtf3tui1.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::102e; envelope-from=yantar92@gmail.com; helo=mail-pj1-x102e.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=1653629287; 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=CNSBSCKL3/BKPXldqOJQgtaatlo89tiYIZR/v3Yoqss=; b=RUHCkGFpkUNRwTsctytp5UERUgfum0eRGlLMaCPTzusoO2TnTWYusVqDSRhUk14XP1qiD3 Ns8JIs2O1tFMb6FzhY3kgCun2ymSeVJflcJ0n5ZjmU8VDyuN9s+8CHoIt5tW/JO33lhnJT LwHQnZERg8mmk6WzveZTJRGmgOr1tncMHSMmAnLcXLq+B8DjYsJmPtS/QpDL1y8ez7De19 HUpeNEl0JW35FvDAPi/dbIRPLmyzn2S/yBY7R1w8tb1MPRHokQs2fI4RkMJWmAXznCONch SVbMBTMtm2rZo5RWKcr6VWOyIdM37Q9G+T3tuhEku55pvGOfgvVNg7YuRu6pdA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1653629287; a=rsa-sha256; cv=none; b=FR+bkzVyFWD88l6C6Bnk8HUKv4eLXrfLjtfggJYLjyv7DL/k1f8J8ytGsJOckvIehhAtvS vc/xzLEXo9IwvW4o2mh7TrBFRKNngSeN1po6uEBrPW2UywBrqXEpHn99DTgo7ZaBsGHzJy n9eCcs1WzAvxKhAmWtDlyIvS3LOPrviLIXYBVUpsI84HrDI/hKQxJznb4HYiygq2haSv6U Ih5RPodIIYggOYUGHXSKXc/EqDPvdDLUSAmkOfYz2xRLsuJhBRecXI/O+RBJ5HmH/Bq9/W Ft5ZHtbiqaa6SQVjrgO//09/SeZbnbW3zjyNvIey72rMYAGwQaMkSTgb5wvJ7Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b="dcH/SwAO"; 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: -9.04 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b="dcH/SwAO"; 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: 3BCCA208AE X-Spam-Score: -9.04 X-Migadu-Scanner: scn0.migadu.com X-TUID: x7HEY9glTy1p Arthur Miller writes: > I was playing with org-capture today, and it strike me that it could be used as > a simple and lightweight alternative to create GUIs for user options, somewhat > resembling the use of well-known hydra/transient or built-in help macro or easy > menu. Is there any reason why you dislike transient (now part of Emacs core)? We actually had multiple threads discussing possibility to port all the Org dialogues to transient. > I would like to propose a small 'feature/change' to org-capture templates, to > inlude a new target: 'exec'. It should be followed by a function to be > executed. > > I believe that this is a simple change that does not intrude on anything else in > org-capture, you can see the attached patch. The goal is to just circumwent the > createion of capture buffer, bookmark and other processing done by org-capture > etc. However there might be things I am not aware of, so if someone have more > insight, it is welcomed to hear. It seems to be quite out of scope of org-capture. If anything, capture menu might be factored out to a generic menu framework. But again, we already have transient achieving the same goal. Best, Ihor