From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id cBCBAyPrrWKoRgAAbAwnHQ (envelope-from ) for ; Sat, 18 Jun 2022 17:11:31 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id EA6KAiPrrWKSRwAAG6o9tA (envelope-from ) for ; Sat, 18 Jun 2022 17:11:31 +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 7B019ADD6 for ; Sat, 18 Jun 2022 17:11:30 +0200 (CEST) Received: from localhost ([::1]:56552 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o2a6j-00051B-Hi for larch@yhetil.org; Sat, 18 Jun 2022 11:11:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44064) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o2a5x-000511-W2 for emacs-orgmode@gnu.org; Sat, 18 Jun 2022 11:10:42 -0400 Received: from mail-vi1eur04olkn080a.outbound.protection.outlook.com ([2a01:111:f400:fe0e::80a]:32259 helo=EUR04-VI1-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 1o2a5w-0001DY-15 for emacs-orgmode@gnu.org; Sat, 18 Jun 2022 11:10:41 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kX347MAcLkAKj0Hq3mOuivh53CvJyAbspNnN54GuSgzqbz3pFYWeP2VWhoylsIH2n5fXQ3PLalFVcpAIiCOB7NEP4h/MIYCbKhYqmxBNhLeSz4jnrWMKxO4dDTbtSSbmtA8MCEf6h5zwxpIlxtTgqgsOe3DvTLcGBx3B3zis81NHvm36Y1956w5vcPK08g0iLZoXK1AdlJIiK0tBXmyNwKFysyvt4q5W1AANJ8ggucPVFwHrVzJu/n8PIpFhXMt8o84qQn5zBfdOX91Fk/T5S3+hm650ShrXd4Lyd3vMw7s9iO/tK5MtDjcKIV70SFTDyU8hH6R3Dnwo1I5sscA7mg== 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=dNBVOPvzLE7ofK+gAvUow6rcju9tMcXU9dKVWW1KLJI=; b=D24C4bgKuwepXsf9a5L58vjWxSJQEHI2d8/72gX8iCk2gfrBzOVhfN9s/siNcNzC9FtwbB+xRcTcz9J2ztvEOjE12yUOO06cj9LOcrJIT8/yKH3MzNBlV8YIweaNNZhKO/mmJgCNbLHmUy090OJ0wjTx0UAwAK8QoiR4Q2shi496pI31kvdwQTx4+5FRBgLQwBv4VZkULoLKwyf4f8MlxLfarBE5n9W2xXhI1GfVtRBrMLgkeR4lq8gpo72VBEWTcBRp71SlcRZ2P+aex114RKrU6X1i5R8dc5IgjUX8oM3EOXr+YlJKKTzmGW72k+RVygUGDNtPowV/g+nHNiR0/g== 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=dNBVOPvzLE7ofK+gAvUow6rcju9tMcXU9dKVWW1KLJI=; b=AfcidMGXsJGOwiHrYxGeRmcrrMm/o1rLWh306F398DO605FCjwG8trT2ZfAhWIuBciEYxRpOnIsFjEk2gMok8LLydLpV3Su6Z/9sqmNj/PP4WtPP95fSYIlto5IvXz+ORitdSZAuhl0ZnCmO6QAvsIOOk2QNE5yRGk+7kJA/YsvFPS/LG0k+6C9kSbBpYM3carZY8LOy/lhix7ZQb/ylI2sTnUQRv3t1SWg72d7WgEZ2wWV4c62PKawqu8E1sbVjJJ2nMLK3YEj10wLzU8mcc7gZRhiHci3cP6cCVH5Mjnss2Ay+F+VYfkYynDXsfDXbLNr/aBcriJ0w0uC+b1qGog== Received: from AM9PR09MB4977.eurprd09.prod.outlook.com (2603:10a6:20b:304::20) by VI1PR0901MB1520.eurprd09.prod.outlook.com (2603:10a6:800:86::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.14; Sat, 18 Jun 2022 15:05:35 +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.5353.019; Sat, 18 Jun 2022 15:05:35 +0000 From: Arthur Miller To: Max Nikulin 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> <87edzvdb44.fsf@localhost> Date: Sat, 18 Jun 2022 17:05:34 +0200 In-Reply-To: (Max Nikulin's message of "Sat, 18 Jun 2022 15:18:23 +0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Content-Type: text/plain X-TMN: [P0ULJWbE2Wzvhv13YO2HPGJxXnxwv4Hd] X-ClientProxiedBy: BEXP281CA0001.DEUP281.PROD.OUTLOOK.COM (2603:10a6:b10::11) To AM9PR09MB4977.eurprd09.prod.outlook.com (2603:10a6:20b:304::20) X-Microsoft-Original-Message-ID: <87sfo21075.fsf@live.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8425741d-aaab-403c-65c7-08da513bff24 X-MS-TrafficTypeDiagnostic: VI1PR0901MB1520:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: v6TC198Fq8bJnEO2waf7LKH53T5JFuABr/TCANvrMotYUz7LuhBmLCo1HoPpEKaEDVfD11NN4FPHG5Rh3mfPmPv1jUHhUHiuyMow0uzmGzpBHEH1YGfiVoGr0x7SAwT0mCvuvax+d0mBrEEotAxrFuY6MVeAMsOaziBwD4tOkLzX+ibDPvwLHsTq2WCQca7gkxDoNIjcbYpJQz49R+NmFp1mQ8biU8S2XvHHVBk5B4ri3EzP1pQ21WG8vpyU4B+sNLaD1TOcocI14DoQsv6wlPxjfVKPkTjpzTFaGkW7sdU9S6ShdTPpgBywga/3cjqO+3yrJ/hDA7/n6qF/qmVyxLA0jypSdLSobQV7MqZWjaj0XBRS1ZzswqIIOM2k5bg5KhCfEv9qlmxFw/08qq6tStGVtQu9SgIQJpva4zvei2TAtUZjbR4wXIoR5Po6hXQkpS2kWB72XOzaaaF7Q12olwUvPwskr3cp16IaHAa8qI91qttxzoNdLbVRDi77PXlza5PmkzDShFsDyk4pCDwuJx5SyPXR/n43xYPjGa/+8msXVTE6qCTCJ0wy0pse/yA5 X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?9XU5Uk77Lp6uIBRXfw4oi/HElkIka/pMDeZVzYCBJCqLs1x7AA0Ra7s6X+87?= =?us-ascii?Q?kwb90P+wU67K4ZKgZUY67rg6ZRe58UGztrOtvTecObORtebU8dUAwSH4bOFh?= =?us-ascii?Q?+/ozMDdWrDSx6Jj3W77MNJrRJa9YVLY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D57Ev4w0HzzOmkWvvB5bJCTzjG9xGL6ps3s62Rm4ETBljPLV?= =?us-ascii?Q?VqENmJaaNH+1dhfbzAvGvdV2lBooX3pCeKN0fgm6gDDj9YP3VvZB4QQg4vo7?= =?us-ascii?Q?MIU5wvDKPhIcecwfaDSNVCmiocEfJho/963732bv4XduKVwRAPXeSOoRF+XA?= =?us-ascii?Q?prBBfQZ86urjUD5i29UKpehLJnlftilWJgZL+QFwJXmALTinoyJH8sAyoLxN?= =?us-ascii?Q?TX2y35lrmy2pJRNwgm6PkBe7uk+lHOXyk1+B573VBoUK2hhELNaWD5zRqPni?= =?us-ascii?Q?0chVk/s1TREmBC+0DUKQVyKlPysNBnFpDjJDYJ7vw3tpDD9Nya57nHEgbG6q?= =?us-ascii?Q?Vh/Q6rgUV2KgrA8jZrq3fZVDyZr6yHTEhjtBRmcL0aOJHVGgl98vUA62+sgl?= =?us-ascii?Q?jBY1IRskV5A=3D?= X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-64da6.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: 8425741d-aaab-403c-65c7-08da513bff24 X-MS-Exchange-CrossTenant-AuthSource: AM9PR09MB4977.eurprd09.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jun 2022 15:05:35.5278 (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: VI1PR0901MB1520 Received-SPF: pass client-ip=2a01:111:f400:fe0e::80a; envelope-from=arthur.miller@live.com; helo=EUR04-VI1-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_PASS=-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=1655565090; 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=dNBVOPvzLE7ofK+gAvUow6rcju9tMcXU9dKVWW1KLJI=; b=c4w2FIa1DpwGWXZuX7p8m9euv+SH1ex9/F4E18WLxKfYpoy8NaM+vOqDNdR2onJ3pGcNgs syt5wUjkuG27ZFEX+qSILaejwSJ8wFoKllHSuguIRSIfgr7lnYXSiNCOuL3r5f3mp1+5UN ZzsxMvBo8cvCxOdDTaeOfUNzBVUNRFJjlZ5NlY/X4bQfXrCZKNICQGHM0Ly3l2B1xFX6S/ x27xVI2az5nHqh7Nxr3P5cfjbobhTc2R5KXgZMR4z5C4RfwNmRm1e/cIojnsiBXfpyhjcZ mG+OgDlHn72BEZNlXoJb46yvwEmOtQmhGbJAeUUa2LMy37UPNp28qL7sQKsjZA== ARC-Seal: i=2; s=key1; d=yhetil.org; t=1655565090; a=rsa-sha256; cv=pass; b=WMEmn3OkLwBvXcLbh0cZEvTWEADyYIqn55kbBJEYHPVhZ64+SJDkuPUHugI+RQrBPJE5kL GzJHiai2zqvDfu3LxnScB+okDysXivW/elMkYOG9ut2gSaUsmghGnkEJYYwq9csFZgZHoJ ot3a0Ojq9ubGMaY4YpB6mybqyGTElRzJRYq63nhspGWAzw2yUT8RqZXPcCkn8Gzsqk0iDu y1wGYy0UIqFV8pEzLE86YT2K5PcEfOhAaNamm/0fbSMeD9wysPwBvH48GSODprLNZ5TuHi dWXGeZVlflKfSc/fr5n1kCU1hH/aNO0mBqnWBtXzIg9VjGkvioWYij+Q23eLww== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=pass header.d=live.com header.s=selector1 header.b=AfcidMGX; 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: -4.99 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=live.com header.s=selector1 header.b=AfcidMGX; 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: 7B019ADD6 X-Spam-Score: -4.99 X-Migadu-Scanner: scn1.migadu.com X-TUID: XYLnPx7CfKEM Max Nikulin writes: > On 11/06/2022 12:26, Ihor Radchenko wrote: >> Max Nikulin writes: >> >>> However if two org-protocol handlers are launched without specified >>> template then behavior of Org becomes confusing. I meant this case. >>> Currently reading key from minibuffer serves as a kind of >>> synchronization tool. >>> >>> Imagine what would happen if Emacs decided to show several capture menus >>> with keymap non-blocking interface in different virtual desktops. >>> Capture data should be saved somewhere till the user would discover >>> initially hidden menu. >> 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. > > There are enough side band communication channels in Org. I did not remember a > variable from which properties are obtained. Before I have realized that it is > `org-store-link-plist', I noticed at least `org-overriding-default-time', > `org-capture-initial'. Unsure that the list is complete. I have a question here: what is meant by this: >>> Imagine what would happen if Emacs decided to show several capture menus >>> with keymap non-blocking interface in different virtual desktops. Different Emacs processes, or just different Emacs frames? In case of different Emacs processes, there is no way to guarantee consistence unless one locks file in the file system. Windows can do it, I am not sure what is Linux API to do this, don't know if Emacs exposes this functionality, have never tried. Otherewise, if it is only different Emacs frames/clients, the capture should always find the capture buffer and return that one instead of creating new ones. That way there is only one capture buffer, so multiple captures should not be possible, i.el, it creates same effect as locking the input to minibuffer. I am not sure how org-capture does, I haven't studied the code in-depth yet, but what I see currently a user cancels it with C-c C-k. org-capture buffer could setup hooks to clean everything, even if user kills buffer by other means, c-x k, or whatever. It maybe already does, as said I haven't looked at those details. I just haven't done that in demo yet, so that is why I said when I posted the code, I haven't implemented that "correctly", bit I am quite sure it is not very hard to do. Am I correct about the principle? If not, than I will have to rething about it.