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 QL5ZDOQswGL2mAAAbAwnHQ (envelope-from ) for ; Sat, 02 Jul 2022 13:32:52 +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 GGE5DOQswGKFQwAA9RJhRA (envelope-from ) for ; Sat, 02 Jul 2022 13:32:52 +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 B507AFC9B for ; Sat, 2 Jul 2022 13:32:51 +0200 (CEST) Received: from localhost ([::1]:57008 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o7bMo-0001hi-Tq for larch@yhetil.org; Sat, 02 Jul 2022 07:32:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51562) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o7bM9-0001h9-JG for emacs-orgmode@gnu.org; Sat, 02 Jul 2022 07:32:09 -0400 Received: from ciao.gmane.io ([116.202.254.214]:36690) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o7bM7-0006mW-AM for emacs-orgmode@gnu.org; Sat, 02 Jul 2022 07:32:08 -0400 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1o7bM3-0009Kl-QW for emacs-orgmode@gnu.org; Sat, 02 Jul 2022 13:32:03 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: emacs-orgmode@gnu.org From: Max Nikulin Subject: Re: Proposal: 'executable' org-capture-templaes Date: Sat, 2 Jul 2022 18:31:57 +0700 Message-ID: References: <87pmjyco0x.fsf@localhost> <87fskrobiw.fsf@localhost> <87a6ay1enh.fsf@localhost> <87edzvdb44.fsf@localhost> <878rpu5qf4.fsf@localhost> <87zgi7357y.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Content-Language: en-US In-Reply-To: Received-SPF: pass client-ip=116.202.254.214; envelope-from=geo-emacs-orgmode@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: 28 X-Spam_score: 2.8 X-Spam_bar: ++ X-Spam_report: (2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FORGED_MUA_MOZILLA=2.309, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, NICE_REPLY_A=-0.001, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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=1656761571; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=266cZHlLF+4qDqCDZKup8E+mDpohtszPMMR4B1E0Sm8=; b=ODN6s5wTaqilQETSp+MVAzzEVpYbl/gy+s/JeOzSQyNzZskRxi/HENmkcUJBQHLLRjDBpK 1/IZxektIVpnaTbG3exVGmYNYnpQKTWRxgrNqpm43j+OShqcGsfh7Pjm+bd0jFzuF4ryiP dUojPkBS8stePldmNMmSdUVzCMaAtZyAqUnI80XbgM9euIlizPtmMLbDEGPtTJYJaBGcR2 HjNwb13a25Q4T0zVsxOb91GXDHAooj6bglVRPfwR8E+t36PIKwK+r8tq+QoZTI6T8SOpVR 5qCtwVkv0ABhBGh3FZTJBVFPgqSxSOm3XT6pTJbszXhshldQ6GNOaG/VmNd7Xw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1656761571; a=rsa-sha256; cv=none; b=hrHjg+gZDySKWTAZr1c65b7ms2czBsZQnW9F00eOkOucMgi3o2LPH1HDgJwZ7Isz8bXOOZ XZ+8ayisbFWy65+Y21yRvz2417DlQzsOMDiMeVxr1O/45nsCieR/n/X0TqAnD/hLSLJtgQ 9Q65NxSF+EKm0BT+uR0UZxGhXXry6rE9774jDIYB+s2EpqAV1EJ70RiOhI8yiBBaZdo2pT ZgS/nCeoL7/fF6nw5s41ZkWS4CWFQVNh/7ngE6OpeEUPC70qrlx5MMF5Kek7cvAIUThZNS ItueTSEPlSQ2RA7tTM+OUZHhYtKdN0Gec1aZwjo9dt3ZPGsM8eF2u4q7/keA2g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none); 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: 2.75 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none); 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: B507AFC9B X-Spam-Score: 2.75 X-Migadu-Scanner: scn1.migadu.com X-TUID: /UnxrwQqIwbL 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. It is almost certainly requires different init files, but request for a command line option overriding init.el was refused: 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.