From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.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 6CvNN9N2sWLNeQAAbAwnHQ (envelope-from ) for ; Tue, 21 Jun 2022 09:44:19 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id eP27N9N2sWJuPgEA9RJhRA (envelope-from ) for ; Tue, 21 Jun 2022 09:44:19 +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 5C1F114FA4 for ; Tue, 21 Jun 2022 09:44:19 +0200 (CEST) Received: from localhost ([::1]:37838 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o3YYc-0006yD-37 for larch@yhetil.org; Tue, 21 Jun 2022 03:44:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41500) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o3YXC-0006wN-IX for emacs-orgmode@gnu.org; Tue, 21 Jun 2022 03:42:50 -0400 Received: from mail-am6eur05olkn20801.outbound.protection.outlook.com ([2a01:111:f400:7e1b::801]:9830 helo=EUR05-AM6-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 1o3YXA-000403-OB for emacs-orgmode@gnu.org; Tue, 21 Jun 2022 03:42:50 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TiMn/bDuqnoTigds5r35skuuCviSrfR2N3SXcDB3ccjhZDKpORcTogHEsel0DZv9Y+Z3rwvqOTLvO+UXsmYN7oDsQ3xpNTaAvWfSJE3QWSGYvlxHzBRKvIMfOBfdTxzkTAQyoyPfGv+8CURnlMyoxwbCKjOqad8crIYw1sFGHXYNnHjqf6j09xKsPwES0z1HoOvGujIzhFwOR6F47hAuHK7BAOFBABaa1B2LzGpMkEXD4nGQxiSN+5TzVuT0kVxoTsuD2GRitrtN2a2ebW8DJ8t8WbkDkYpEAs7x2xQiLUol9fUioK0xIQeQto31bgt+oZ5qJFTfr/CLA3NPPFvcNw== 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=513kdn98HncaD9iqXED5EWH2jw1Ms8FybztN4r36+T8=; b=gOBI1BDa4FzYlQTovNSRvQ7Qn8fT46L/fk8/duhT6gQ87NXdMdiQqc1dI+I56OSoVk0qwPJ/SAveKJhyHStnkVgQxYldvxsWPpSsNvOQGim2zgwQw8V9a/fjoywFGdcV/G833phNFx+Txw5uqSbykI9WWD9murucPJVafQUWqyiBkmvcPhacK4k8IwsT9TTvCg3xXzsscVf6ULsMJPcFr1SYtkMpkOzbXbX3+i9Eem+BHA9ByntuMgmfQui6toHL1F4yI+3RebfwAdZpr5SuyHrith8QnGj5ul75OW8lkwxWnX6KOlh0MXoQ6KixVF4U2SF/pZmrfc3cJT2uEE/yDA== 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=513kdn98HncaD9iqXED5EWH2jw1Ms8FybztN4r36+T8=; b=VR4nQFqqwKLH3ks3YB9pcaFTp50Vhiy6pvHyk+O8fRyKQS30QaXygd+5oO9ybliMXBzj9kSM4W7Cky69Qn5xqmk0ErpFkXstlG0QVpKKdpyFLHYYMx0hOEA7KQznQI9if9RrcK5VaZXfOupBg5aJpeEkXLh3pl2uEWoAKYZNsbtnSLw9ooK16Dj6oJvPzS6AleKKgc7Yh3PJpke9OsLVlHb4R++DlIresvnoss8ceV31lLWUhAQ8W+9090Mf6fXUx4xwX7GYO/OmySN5UTqO2wh9bQuDUl1xP4V+qVhqVXpPmNBNBau8U3mCEZD/WwsiWICbP8QFmDcksAnVbHskFw== Received: from AM9PR09MB4977.eurprd09.prod.outlook.com (2603:10a6:20b:304::20) by HE1PR0902MB2043.eurprd09.prod.outlook.com (2603:10a6:7:1d::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.18; Tue, 21 Jun 2022 07:37:42 +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.022; Tue, 21 Jun 2022 07:37:42 +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> <878rpu5qf4.fsf@localhost> <87zgi7357y.fsf@localhost> Date: Tue, 21 Jun 2022 09:37:39 +0200 In-Reply-To: (Max Nikulin's message of "Tue, 21 Jun 2022 00:24:26 +0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (windows-nt) Content-Type: text/plain X-TMN: [hMP7m2AhAA83G42UgilUdEG5aH8DlB+I] X-ClientProxiedBy: GV3P280CA0052.SWEP280.PROD.OUTLOOK.COM (2603:10a6:150:9::6) To AM9PR09MB4977.eurprd09.prod.outlook.com (2603:10a6:20b:304::20) X-Microsoft-Original-Message-ID: <824k0ejwl8.fsf@live.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d86c6fbd-ce34-4a80-3e21-08da5358ec5b X-MS-TrafficTypeDiagnostic: HE1PR0902MB2043:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Z0vqQ5G9pGg2AxfNE7T+dH8gDbOtznpLmYPef9qyHWLVRW52blwZykHfrFQDyDHn9B9OdD6jJ6ADo74RunFsrRfUPbYLKtK5P2K7kU09WU+NAsfPeIsU7S+BRDLDHYk1a2CmRLm15CTMPsM8tfBGtcdgG3V1jY/cmvXedYYTX44LX/bgtDcTauZeSBhdlTIsIxqhZC/lkZ6GdJlFoafFhJJZiGRKGYyASGVr+WND8WWAhsz5oLaQLV5W10+pudm00U25cBXg9fjsgPYat7AZZNsgriD1bShq4Y+Yw6YqiCFxzY1vQqmWfYxiT3ybOmaCE7OXc92626mnwkHn8uOZQOilo9tnqv1WrFEfnBlym2PPODxBJ+KdI6zmBMJQXEjvaoOKmM+lj/+fiO0GeJ3ehnfzEU00HbFSGfPG9zBzIKju0M8pbAYcphyEkdquT2uRFvNXRArepwdsebyWuatCXafxArhz6j/UaDFD304iifpKdA7MSMTs0tj4h16EauTB5kNge5+PaDSNI4/S3OepLONV+R8sgU0OhipO/QInwGaxUU6NKLQ3shuP4QvmAkV6C7tuxQd4agHEBNoD5UWQPw== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?jktVyZAEDRnNms2hAKtw88mYm6/waFwURtFAa0asFopxS5W0qjMN3LW+Yk76?= =?us-ascii?Q?nmZ4uTANQk7Kh9Yoe+hgNXexrGn4/RDQfAcyc9vxZmGdU/BCDGZfvel+iGst?= =?us-asc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ieceEEOAoEPVa1wslZTTjJ1VsvXt?= =?us-ascii?Q?MQ/hZd+5IlQYOQCdtj3nXICHeaPiWD35Bv9EU01SOeETDjB4XQB/LhtgvxBz?= =?us-ascii?Q?pkn1uCEZGmuJfXiEavn/guzH1IysZojjvkVodrcKN0W3TerWIVuImgsHAxf5?= =?us-ascii?Q?+j4mYLQn3uQBeMr3627u9HQaZF+RWmKJgX0KcJjTMjxiQlydG8PAYxyCifV9?= =?us-ascii?Q?oipOEFl/Hjoijy0EN/crEk3tvTnGyj8sS++TmDA+uivHIo/wAedbuSi6Ef5D?= =?us-ascii?Q?qYBtLH526JbNweANGH/nDVFFHc5/EAXG6PY0ni7if7OFMf6a577PqI4+RHL/?= =?us-ascii?Q?FbW9NE3rm97es/ZoGarJ6m5rsCQjhnyiTk9aQpGlEMBGSOTy9BH3M3tDHRgq?= =?us-ascii?Q?cLxNasqFSpBKpDLOoDzuTAoVwaSYQzQXs0T2MM3glYp0DXW81X0ynJQKmBEO?= =?us-ascii?Q?jBpjUAuIGOk=3D?= X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-64da6.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: d86c6fbd-ce34-4a80-3e21-08da5358ec5b X-MS-Exchange-CrossTenant-AuthSource: AM9PR09MB4977.eurprd09.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jun 2022 07:37:42.2582 (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: HE1PR0902MB2043 Received-SPF: pass client-ip=2a01:111:f400:7e1b::801; envelope-from=arthur.miller@live.com; helo=EUR05-AM6-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=1655797459; 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=513kdn98HncaD9iqXED5EWH2jw1Ms8FybztN4r36+T8=; b=kVTWjeJqTdD7QI0Ie5VvyukJ2lT7r2k+mdPiexRWUBoUfZ0pyl3poz3kLnXjz6+RlyjSSO OVgBsVuvJhW3LMj8Pl6Bhm/+ebN/IhvUI5LyDPIwJch7iEwOOlCcWIZOudq4GOwL5OvXlt P15A3Izb98FkkaT8q2EfqHE6PGHxlyxgfOH0iot55XhO7PFPW4OTSVaakDqduuWaJpPggg T0x+MFcUkBCWS0c4kzNsUpo7p+CCwkuSJ7TAmHiwqQdlXM1nJ5CarWZ8O7HbBsJA3aGHRL XRjscgvcsI/HqfTv2LxFnTJwn3ANU78dzLOC+IzWt8BAWxAOmo6B6zRA0eayHw== ARC-Seal: i=2; s=key1; d=yhetil.org; t=1655797459; a=rsa-sha256; cv=pass; b=ErZaV+vW9HV6Or8OOhv1g1Z1XyzxYf1wUZa/3hP5IbKkVll2royanNpQPDV2LmpR8X6oCW GfdR1ZZYd+TG6o9ej/1N1R4LBlJ0SFKr2KgWlgphb2Ar2bveVVjCIEtoR2NHE7EfYmQPE3 mm3wc8/nIAB9SbsQuojqI6vN1WcqVNXx4Hlkej7u8HiwPQEYBXjkGDIWg0OjWS/fhoPzZI xd8GvmHZiPx45LJ1MucOWokxle26VyqIveS5S83upPQa269hQ/K46VwF55pvxZWIJCc9sB pMTgRm0rA3YFK7bg0fRxJJ1SHBzpIpoqsCLI2DKSoYbSka17XylzhqjEdpuEgQ== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=pass header.d=live.com header.s=selector1 header.b=VR4nQFqq; 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.97 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=live.com header.s=selector1 header.b=VR4nQFqq; 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: 5C1F114FA4 X-Spam-Score: -4.97 X-Migadu-Scanner: scn1.migadu.com X-TUID: CX9F7jw6/4L/ Max Nikulin writes: > On 20/06/2022 19:10, Ihor Radchenko wrote: >> Max Nikulin writes: >> Sure. I was hinting about such functionality in the new library we are >> discussing. Multiple capture menus are not possible now anyway, so it >> will be a new feature if we decide that we need it (I am not 100% sure >> if having multiple menus is not going to be confusing). > > In my opinion application logic should be consistent with UI. Do you think > current behavior of help buffers has no problems? If so I have no chance to > convince you that upgrade of menu should be accompanied by changes in > org-capture. > > Consider the following case. A user has 2 virtual desktops dedicated to rather > independent tasks and an Emacs frame on each desktop. On desktop 1 she opens > help for some function with aim to evaluate if it is appropriate for some > particular purpose. Next she has to switch to another task and applications for > it reside on virtual desktop 2. To proceed further she has to read several help > pages relevant for task 2. After completion of this task it is time to resume > task 1 and to switch to virtual desktop 1. Does a window with the help buffer > still display the same content as before switching to task 2? No, context on > desktop 1 lost due to some actions in the Emacs frame on desktop 2. > > Such synchronization is against multitasking and I do not like the idea to get > it for org-capture as well. Currently read-key and modal prompt is a kind of > excuse, but the idea of new menu library is non-blocking keymap-based selection. Yes, that is true, current Emacs help-buffer implementation is not designed with your use-case in mind. If we leave out "virtual desktops", it is unimportant detail. What you speak about is that user is working with two different contexts at the same time and prefers to keep each context in it's own frame. Emacs as a whole is not designed to work in the way I percieve it has clean separation between contexts in each frame. Menu buffer is "global" for entire Emacs process, and there are other features of Emacs that does not work well in such scenarion. Some people prefer to keep an Emacs process per project/task for that reason. I can agree with you, that it would be nice if things were not designed the way they are, but I don't have an opinion how org-capture should behave in that regard, and how much work would it be to design it the way you suggest. With other words, I say neither yes or no to anything :). I would just like to remind that we are speaking of two things here; one is menu buffer, that is replacing org-mks & co, as in org-agenda and other places Ihor mentioned in earlier mails, and the other one is org-capture itself. >>> Currently several capture menu instances may be requested though >>> org-protocol (or calling org-capture from emacsclient). The behavior is >>> rather confusing. New menu may help to fix the issue, that is why I >>> raised the question about parallel captures. >> I am not sure which behavior you have in mind. > > try the following commands without selecting a template in an Emacs frame in > between > > emacsclient 'org-protocol:/capture?url=url-A&title=title-A&body=body=A' > emacsclient 'org-protocol:/capture?url=url-B&title=title-B&body=body=B' > >> What I was thinking as a conservative implementation that would not >> introduce any new features is replacing the old menu with the new one >> every time the same menu is called. So, every time the user calls menu >> (e.g. capture menu), only the last capture environment is preserved. The >> previous, potentially unfinished, capture menus will be destroyed. > > Causing loss of user data. Currently it is hard to start new capture before > selecting a template. Current org-capture is one at a time because of how org-mks works. There is nothing that prevents org-capture to open enumerated buffers, org-caputre<1>, org-capture<2> etc. User has to manually serialize data anyway, via C-c C-c from withing capture buffer? So in principle it is still one capture buffer at a time that manipulates the file on the disk itself? Problem would arise if serialization takes long time, i.e. there is lots of data to write to file, and user switches to another org-capture buffer and tries to save that one. So the serialization itself has to be guarded somehow, but a mutex or file lock or something. At least I think so, I am not sure if I am correct completely. Just trying to think loud about it.