From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.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 2PG7KfCLrWLRCgAAbAwnHQ (envelope-from ) for ; Sat, 18 Jun 2022 10:25:20 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id mEm9KfCLrWKNTgAA9RJhRA (envelope-from ) for ; Sat, 18 Jun 2022 10:25:20 +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 2ED782FC9F for ; Sat, 18 Jun 2022 10:25:20 +0200 (CEST) Received: from localhost ([::1]:34852 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o2Tlf-0004Vz-8P for larch@yhetil.org; Sat, 18 Jun 2022 04:25:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37034) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o2Tkw-0004Vn-6Q for emacs-orgmode@gnu.org; Sat, 18 Jun 2022 04:24:35 -0400 Received: from mail-pg1-x52f.google.com ([2607:f8b0:4864:20::52f]:41649) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o2Tku-00012t-KY for emacs-orgmode@gnu.org; Sat, 18 Jun 2022 04:24:33 -0400 Received: by mail-pg1-x52f.google.com with SMTP id w29so5883424pgl.8 for ; Sat, 18 Jun 2022 01:24:31 -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=lpfJjNB2IlWSD/NIMo+oxoG4J4fg3Q0QX5BHLJ5qnQ8=; b=UFWOlJ3bdIPjUALE/Kgg9NJxRdpHMhCcm3wkaW6W0rndggHPk1L68AeVf71JDBODR1 Xr+eZwtp03ULZB/VWlBLzcDAWoirR06lIA/6mAiUxkMi3eNdN8ZJZ2yZbngIhH8Mn9/b mMH+gxVWoeu9ZPdoCcUhGEZXzDdniIRBt5xy6cyjsDwXulhp8+jkqQv7Grj7kgJWaw1P ndhpO/FhXYAj25ZPuTs2kWsyAnuUO0LTUtS+idnH3OM2J2HjK6CyIEG9aUDuyhEdOIEI 2ihR4JVtEC+FRHBa9AfW/mv9mz9eXU4NDtHS2p2DAYK+dtiIvqJCsjJfmxUrO7rAs06Z /DPA== 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=lpfJjNB2IlWSD/NIMo+oxoG4J4fg3Q0QX5BHLJ5qnQ8=; b=1fH6cc+F8+VUAU2cAbNtx9U5UaZE8s88faT/eLqjnbY7SdCuQPLktAxqgE09Z6uRwK tu313dM4ZlPjZ8weBg8wxoXHI39cpWT2DzcmjlN2IBRFyj5H+zxD1Ckf77CoftZyn1+q Oq6raiMv6crUtIFgvYFY55xEfUsXsJjSLO+DE0KrZU9+zmxztZVQ0vEY72DY/adKRFWu 2HdJDly0Uqe00KYbZwz6zrTThgmHuXT3CB7aLQlH9A/t2CA9w1ezbazCGHpDAHZkO0gQ YLXIPboH0SNcpDya7ukUDSS7KiiUuhbB74wYadUmzXwk7ePEW+2VaOW5/dXdPB0FRLrP TWXQ== X-Gm-Message-State: AJIora8Vcyuhye81njcdUpnASXqh94izqsOW8gQ/w6SFIbUc/BT5x9L+ KpD3/fc8t4uzbZo3BLpSezStSd/nLkGzQehv X-Google-Smtp-Source: AGRyM1sWgrxou6UDkiUHJF3HIhfCaGa0OMBt/V0NW9CSkcttbmwPtarPNGUEgSok6owI020FdfvD+Q== X-Received: by 2002:aa7:888f:0:b0:524:eeb8:5bbe with SMTP id z15-20020aa7888f000000b00524eeb85bbemr2714163pfe.0.1655540670388; Sat, 18 Jun 2022 01:24:30 -0700 (PDT) Received: from localhost ([204.44.110.111]) by smtp.gmail.com with ESMTPSA id l25-20020a637019000000b003fdc7e490a6sm5055109pgc.20.2022.06.18.01.24.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 Jun 2022 01:24:29 -0700 (PDT) From: Ihor Radchenko To: Max Nikulin 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> <87a6ay1enh.fsf@localhost> <87edzvdb44.fsf@localhost> Date: Sat, 18 Jun 2022 16:25:35 +0800 Message-ID: <878rpu5qf4.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::52f; envelope-from=yantar92@gmail.com; helo=mail-pg1-x52f.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=1655540720; 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=lpfJjNB2IlWSD/NIMo+oxoG4J4fg3Q0QX5BHLJ5qnQ8=; b=n93SL02hNcLWG+2l+lZjijRc1vaY4sqUVAQj9G5x4+Nkqia5S7q2p6Ky4r2fB8OT1SAYfx Z2K+1K4PoeB1UCe4wpZvRM/SEfjA7INhfXnGj7CT9iFnfeIfA0rOrVjsPZx9/Y6+Mdgrr7 8u31zlhhORwOYaafqKPVggdiAzWOfi2xq8WDkZT6itejOsc9hgqCtInP78QWIInR6bsSfS xaUi0qyQQboaKdnV1S8bmET0xLyybPghpHk4h29KN1+rluIfmNg83jR71jWfhcFHDk+Ukn uNrnSVGyp1H8ThjGOZLT6hDQsTQCHK7Ea0UHh7+ZI3tcxNKgXOX9OXBN6SiiJQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1655540720; a=rsa-sha256; cv=none; b=lacmlaj6UKKrzjD4yHkqbY6gUJYahJTQoJj97+viagyHsxURs9gEJgZHGPlLtLHQjoBN7d PzOYYzjy5dXZq2IJgOYKawFLfAi2SBfOQCJLbA74Ptlf6o0HqnlgiUhYrGzKbNYax6TyMn kxNPtPkevjlM4aRpTeZ59ukrE5cYZr/QazF/Pcjs0VrpHcLgMEjRptjraYwUwzNLLUwjCi 33W2JEDmKV67FEz7Krd3ycDbd3DdmkkmPoPcCRFqYOf8T+fBiRkx8F2G/X1y2eqYxJ8E1j HcNpKO6+8AZH89cNvU9wEcFvMWiMXK9n1LYlVF/PHP91hNfawL0LZSIwczUsDg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=UFWOlJ3b; 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: -1.99 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=UFWOlJ3b; 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: 2ED782FC9F X-Spam-Score: -1.99 X-Migadu-Scanner: scn1.migadu.com X-TUID: 2cYNp+tE0wjS Max Nikulin writes: >> Note that there is not much happening when capture menu is called. Only >> the link is stored into link ting. Otherwise, no capture data is >> altered. All the fragile staff is happening after selecting capture >> template. > > Ihor, magic is impossible. If several captures may be requested in > parallel then snapshot of data required to fill capture template should > be stored somewhere at the moment when capture is initiated. Otherwise > the user may kill the buffer she is going to capture before selecting > particular template. Sure. That somewhere can be buffer-local variable inside the capture menu buffer. Or global variable. Or closure. How is it relevant to the capture menu? Of course, using global variables will limit things to a single capture, but it just means that if a user starts capture, leaves the capture menu buffer, and then starts another capture, only the last capture will be handled. Just like we have now. Best, Ihor