From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.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 QBhhMiqzwWJZRQAAbAwnHQ (envelope-from ) for ; Sun, 03 Jul 2022 17:18:02 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 0FAqMiqzwWILVwAAauVa8A (envelope-from ) for ; Sun, 03 Jul 2022 17:18:02 +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 404411D45C for ; Sun, 3 Jul 2022 17:18:02 +0200 (CEST) Received: from localhost ([::1]:43866 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o81MG-0005wk-VH for larch@yhetil.org; Sun, 03 Jul 2022 11:18:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34796) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o81Lq-0005wK-RX for emacs-orgmode@gnu.org; Sun, 03 Jul 2022 11:17:34 -0400 Received: from mail-am6eur05acsn20806.outbound.protection.outlook.com ([2a01:111:f400:7e1b::806]:55008 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 1o81Ln-00036V-VS for emacs-orgmode@gnu.org; Sun, 03 Jul 2022 11:17:34 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=b87s3p9PAl5x5QrJiv/U/BvFYIwcRaoF7EN5dSxOsGqmzJ7rJeoZ2c4R1IEjQYZC0AC3bmXsPhCBEdRHXoWfD4XqR9Bl08ZpmQ+KvfihzrCYyOGMFA3wy2k1CTH/yNJAiL7ggJnR+4TAb9eIm5JbWfkWvri4s1O7DGHZaMc+ANWFLp7xHz+4psS1TTWnIaTz7d9MhdwlaFmx7zuD8jkgKpodXaOf255GvjGenS6wgEtbSdX2zW+KkDu0nKZXd51Ff7O93NR6e2aVSIkicfZ7OjQKzxdr+i2kJucbMPmw3pmmS34IogACQRrf2bvWC5Qr5+lb9qhBgO6bJ3cnS/CnYg== 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=TIgeeFHrpavDP/1MT4bAz/+QBuPWXGvdHLwU8vZb8Qc=; b=bxQ/5EtsCwzg+54SjTwhpmvJDEdtE92Lbussd+pUN8nO319PPe+XZeH8I06Iq4OEkfcDOJBP65tGpNlqGmjBjrlm/ZjT/HAgfir53js0CJ3agBAxtfOtCir4MynXqqw9iVh+f9vzIgDOroANTlQ8x/JZQsaPDYhQIQuJOqIXEco4VJU3jaD7QKCG4GsZE25rP7tazkE7jnNRXgof7ZHlcrTWmmx7xGst8e7eV/EOSsjrzL4YHR64nZhV0kiUoCYCA9ITb4XJJTVGjsIoo9iVHgpnUrTRMzGnC3vK1LWfuXqT2th0Zp+N9zIsjgpxRmI92dUzf1cZTqEta9NAIwidug== 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=TIgeeFHrpavDP/1MT4bAz/+QBuPWXGvdHLwU8vZb8Qc=; b=VmmUw/qGd6YaS4pRGSCfRrpBdvBhFxjdzpsC3eStmClqpk+X1xl5TReM0/aJ5UzzxKW+Xig+kAm4tJVdxo+wl6iSFYWVoT4AYdrILgKaSciuZyaFflLuUTREKIyDjX6m7cqHwfoL/Bjdu/PCter0nSItRSskeLpCGn84sVNidSr54DE1/BqvplfQRIKH8H6dlqlBXkhpEKqjfrOxEg40TnTri1Z7Tju5ctAefRUYEAenWoAD4nY3b9efAAo+VfFAFEy0B7Nevjzv/gFg1nztuFwkFkD5vyTNkIvN4WyGsjH0/uNeSq3yv0VSrtxAZNVTg+Mm2uC1pSnYRjhK45I12w== Received: from AM9PR09MB4977.eurprd09.prod.outlook.com (2603:10a6:20b:304::20) by AS8PR09MB5340.eurprd09.prod.outlook.com (2603:10a6:20b:378::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5395.19; Sun, 3 Jul 2022 15:12:20 +0000 Received: from AM9PR09MB4977.eurprd09.prod.outlook.com ([fe80::1995:84ad:afa1:1f39]) by AM9PR09MB4977.eurprd09.prod.outlook.com ([fe80::1995:84ad:afa1:1f39%9]) with mapi id 15.20.5395.020; Sun, 3 Jul 2022 15:12:20 +0000 From: Arthur Miller To: Max Nikulin Cc: emacs-orgmode@gnu.org Subject: Re: Proposal: 'executable' org-capture-templaes References: <87pmjyco0x.fsf@localhost> <87fskrobiw.fsf@localhost> <87a6ay1enh.fsf@localhost> <87edzvdb44.fsf@localhost> <878rpu5qf4.fsf@localhost> <87zgi7357y.fsf@localhost> Date: Sun, 03 Jul 2022 17:12:15 +0200 In-Reply-To: (Max Nikulin's message of "Sat, 2 Jul 2022 18:31:57 +0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Content-Type: text/plain X-TMN: [+85eBpiDjjM364HQkkfsqkeGtY2PtQmO] X-ClientProxiedBy: BE1P281CA0020.DEUP281.PROD.OUTLOOK.COM (2603:10a6:b10:15::16) To AM9PR09MB4977.eurprd09.prod.outlook.com (2603:10a6:20b:304::20) X-Microsoft-Original-Message-ID: <87wncu6xio.fsf@live.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9e2c72fd-cf2a-4972-61d4-08da5d066a7f X-MS-TrafficTypeDiagnostic: AS8PR09MB5340:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: EEaoD3HyPZ/6STnsSTEJSoDVYdwL0G6Fkpb4O/PDHrPNMmAhCBDzCEETo5z/qI8CDMvcVQsIELcf5K3pwYPUFNpFgMdvR+5fdh1lt9AHCqdHkV56XYn7KJfVF+Foen760Z8311pPhnfdiAgn+Nn8TAkfU5uyMDmn9LssL9bOfREPeIE2vMevjzTax7vsSVi/QNHAZjnMsU5bg7agSFRpKsa/HljReYhjHIpkLKVM6gyaVPsJADa87YXyim+d1cVw3v11ap1DCjjU9L0Wv4yNOVJ2DnxqgKzGrvfcXdf8Q0UfVa4Z/QyzM3owtguTRmHIUFpI7NaSxfq2A7HrU8l4wwpS54VLx9Fb0K+870T4TdaTeaejN9LWO7p3XZOFEo6wDSJRZikeL42lsNh86dBBxX4H2GpQrgDE4qHvYNLLzVeD/29pkIkm3UTMwqt2rDYL5yW0X/FQJMurlAp+7v/oMfvFVWKkHyTqk1sG4eJAnEMTdqZJ7E74JEPAJ3anpsonUOkhyk8dHGhquxLV0J1PtAU+ffBxKImgjWJuyDDlWkZfuNR1Jua4ybdMrk8NwGQcfnnWYKDDjvZFfprWtg+ZADjQwYSD+P6V4lsiImMv5Cz9/vs8DwuSvbvksqQU5n4Q7/DDb8stWoRvV/24/Lk+7A== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?k5NQQ/r9VxAMnqo1WxXAa8A4bZKYtP4HTgfmE6dUSZ66uuAV3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55hNrjCFVUJKj/8HRgU7GG3lsLPNicLaNZ?= =?us-ascii?Q?AF+zbHMObH2odw4J6WfHodxguJKVkxqfQNatzzMAzWs7VnIvAtr3qFIjWfpV?= =?us-ascii?Q?whIE5hzlCR7/o0o+EraNEWnoe9HDsFkbxJlylRyMg3X6nGHdQMhTX/G9WSWF?= =?us-ascii?Q?vSyvWe+nljk90DFNcTWpKPh1aQvhnPoNztt6qo6rs6rA18sgrUKQhaPQcMyv?= =?us-ascii?Q?qgHwqiOkH3PU5FL3OUzfpchDkYoadBpBIuKA6dAdxTZVssx53AK3z0EVkG05?= =?us-ascii?Q?61gaTeHsVBbn1v1Z37U8/1GPaCBB77ZH/qaqOGM3bGCudxz/g/FZjVC3cLZQ?= =?us-ascii?Q?EmKMWjZEw47cTYufFvCLjt34Q7aqlpnvIw9tXrAD1Q=3D=3D?= X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-64da6.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: 9e2c72fd-cf2a-4972-61d4-08da5d066a7f X-MS-Exchange-CrossTenant-AuthSource: AM9PR09MB4977.eurprd09.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jul 2022 15:12:20.3359 (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: AS8PR09MB5340 Received-SPF: pass client-ip=2a01:111:f400:7e1b::806; 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=1656861482; 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=TIgeeFHrpavDP/1MT4bAz/+QBuPWXGvdHLwU8vZb8Qc=; b=S7Cbvc4oVFAlto9u2ZxkDKl8o2sFdINuSmt8pvG+/0OsArNUI62l+c3P+UJ2DUPum3QyUk soaJyJClCmTXbBZJEu8lsrec1NICn2DeN3i5uYI9iEy5WLUbVUop18RoLtD71wPnUC9+vB pgUm6oLXUMcbbelvynRBDaOQoT4VF0N9mWHqskJ+aKXLp69+ty73bGeU6qVrtxYgrXSzwR BzOryCykCOoayJXWt04wSgCy8aIHscva+1iLiOo1VuG+RyXpap1ObwBlq7JUvH4LHvFANA GYs3jbADAW2j3SYCYYy8glwrsAdVQhzWNR6jqr3pX6l6bqZsnJrBMImNiauJrw== ARC-Seal: i=2; s=key1; d=yhetil.org; t=1656861482; a=rsa-sha256; cv=pass; b=M8M0WdPsZ4cNo4ZsIdhg45tuZhhKQC6Gj58hjAwQ76aYYSprpdM6W1de9ukfQpO3HBLh1O tLvCtjeIQH4Y4uMOO4pfUC+NdsrjhM7jKmMDNCcQaawAnHF9U8jyUvndeFHzgNg1+6ApoK ujaJ/RjIPLwk4ySPOUZ11azVb2uJv2o4zsWZcF3KsixtmMkgEIw+BYJEizemRuT/kqYQBE lpHhfcl1uCnvycgvmWwLlZZaSh3F6wnKE7b8S/q2y0eFNmUb8E9zssDduOEul+aNyyyDZc tfdy93M+2vsUs0bvkBlROvORI6Q3Ugla1cF4rLm2v2H7awIbfhhgK/aU70GmJA== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=pass header.d=live.com header.s=selector1 header.b="VmmUw/qG"; 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.75 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=live.com header.s=selector1 header.b="VmmUw/qG"; 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: 404411D45C X-Spam-Score: -10.75 X-Migadu-Scanner: scn0.migadu.com X-TUID: 53XinGQsHJfO Max Nikulin writes: > On 21/06/2022 14:37, Arthur Miller wrote: >> 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. > > A side note rather unrelated to menu for Org mode. > > My impression is that Emacs process per task scenario is not supported. I am not sure if we think of same thing, but "process per task" means simply how people use Emacs. Some people open each file in a new Emacs process, some people like to keep different tasks in different instances of Emacs, for example Gnus in one Emacs, and editing work in another etc. It is not that Emacs has some feature that would make one prohibit to start Gnus in other session, or to load same set of files in different Emacs processes, but I don't think it is necessary either. > almost certainly requires different init files, but request for a command line Again, I am not sure if we think of same things here, but I don't think it is needed, but anyway: > option overriding init.el was refused: do we need it? Aren't -q and -l option enough to load a different file after startup? There is also -e and -f option that could be used for the purpose of more customization. > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=15539 > setting user-emacs-directory at command line invocation >> So I think the conclusion to this long thread was that we don't want to >> add a specific switch for this, and instead people can say >> "XDG_CONFIG_HOME=/whatever emacs" when they want to change these paths. >> So I'm closing this bug report. > > Unfortunately initialization in Emacs is rather tricky and > emacs -q -l init.el > may behave differently. > > On the other hand the latest variant of org-select is quite close to reasonable > level of support of multiple instances of the same menu. > >>>>> 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? > > I would like to avoid confusion here. "*CAPTURE*" buffers are created after > selection of template. Menu is gone away and content is already added to the > target document, so it will be saved in response to C-x C-s or autosaved after > some interval. There is no need of additional persistence at this stage. > > And to be clear, example I provided is broken, it creates 2 template selection > menus existing at the same time, but second request overwrites capture > data. When one template is selected, menu disappears, but session is still > blocked by waiting for a key specifying second template. It is really ugly. I > expect that new menu implementation will allow to improve user experience. > > I was writing about interval between invocation of `org-capture' and selection > of some template. During this period capture data exist only as values of > runtime variable. Currently it is acceptable because it is almost impossible to > do anything else in Emacs till capture template is selected. > > Non-blocking menu makes the issue more severe for some (likely small) fraction > of users. Of course, it is responsibility of code calling menu and arranging > menu item handler, not the code implementing menu. > > The priority of this issue is certainly less than choosing proper menu API and > implementing it. However it should not be forgotten at the moment when new menu > implementation will be committed to Org. I'll think more about what you write here and your next mail, so I'll answer at later time, I am not sure I can give some constructive answer at the moment. best regards /a