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 sKFzF1zCnmLC0wAAbAwnHQ (envelope-from ) for ; Tue, 07 Jun 2022 05:13:32 +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 COFtF1zCnmJGHQAA9RJhRA (envelope-from ) for ; Tue, 07 Jun 2022 05:13:32 +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 CE98651F4 for ; Tue, 7 Jun 2022 05:13:31 +0200 (CEST) Received: from localhost ([::1]:51486 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nyPer-000368-H3 for larch@yhetil.org; Mon, 06 Jun 2022 23:13:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35826) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyPaw-0000Vq-2P for emacs-orgmode@gnu.org; Mon, 06 Jun 2022 23:09:26 -0400 Received: from mail-ej1-x635.google.com ([2a00:1450:4864:20::635]:38893) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nyPau-0003E9-0i for emacs-orgmode@gnu.org; Mon, 06 Jun 2022 23:09:25 -0400 Received: by mail-ej1-x635.google.com with SMTP id n10so32527801ejk.5 for ; Mon, 06 Jun 2022 20:09:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=sTUDuwjLdH3VWMLx5eFPtO/nrKN/mMa0HFvh/oNMEH8=; b=R8pkptIW3kH6hrKQCgscRvMuBe1vfb3pgcvh2YBWGB5P8TbZuG/trobb2ze3szY6gL B4FtNqxGU2CjQXRXyrwAGZ+Ptz6VJxUNioVuHk51KYuroffqgx8VgiBdBsNrVkSL5NqX bHSWt01cwvKM58CYf4fK02XmQtSokiJUs5u+Swqjr6RBh6b8qGLjajPMx0oYqaCqQo8b 8dfcH7pXmo4jswfulkLogjvHlOY7yxIJMIZ28UhkQQtSMyRTHtAgNMo6RLwV8Bj7JT6t IOCeBp0n7R0aCu/TrBAZIRtPot4AvdLYfwfVUErh8/FTNtCD0ObOSQUFSJ5XajM67ecK 9xtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=sTUDuwjLdH3VWMLx5eFPtO/nrKN/mMa0HFvh/oNMEH8=; b=JJREA00lf1BLQxeHgCEcGiWYubpEaEeRp3dKZ/2o57/dFwI1HtphgTaVHo+L8wrmNI pR2FvmmwOLZbhblNnniIztk9J/+r3IUr+fY+VyGWnjYQRvHD7D+0CJpUy8dNcjX0jJSM Qhpcaxk9BVSL1rZ3udbLSGSW3YnIuQGWWNj53PBPhfWkculDihucpe1cd3Osi4FwEmsQ ltJEKMO+Wkn8DsRhOpF8Qf2gou3FxxfzDEqh6mlR26taJ02eSXNHpSMX8FQJt3F1pDly k/5jnAfiZC1wxXT/9TSO3pEjBbAzhelHw1LRT/AAmycKhdPEd173D73V6lr+4TEeVxhe Btcg== X-Gm-Message-State: AOAM5333zAMr7b5/3fvaaGWzHWgLc0BDmStbjwBpPVtFALZ9IM63rwXD fLFLy8qe7fFUyko3Ern/qhvhawlGafi/0io1dQw= X-Google-Smtp-Source: ABdhPJz6RYHqTxVs29AsaI9IuN5cvH+/rssYJZoPo19bGfzUoea1cDk6/xYXsLBOwgP3Syw3bQhlnDsjT05C9PSFHLQ= X-Received: by 2002:a17:906:d550:b0:704:7ba6:9854 with SMTP id cr16-20020a170906d55000b007047ba69854mr24094381ejc.579.1654571362156; Mon, 06 Jun 2022 20:09:22 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a17:906:478b:b0:6fe:f76c:8596 with HTTP; Mon, 6 Jun 2022 20:09:21 -0700 (PDT) In-Reply-To: References: <87mtf3tui1.fsf@localhost> <87pmjyco0x.fsf@localhost> <87fskrobiw.fsf@localhost> <87a6ay1enh.fsf@localhost> From: Samuel Wales Date: Mon, 6 Jun 2022 20:09:21 -0700 Message-ID: Subject: Re: Proposal: 'executable' org-capture-templaes To: Max Nikulin Cc: emacs-orgmode@gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::635; envelope-from=samologist@gmail.com; helo=mail-ej1-x635.google.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, 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=1654571612; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=sTUDuwjLdH3VWMLx5eFPtO/nrKN/mMa0HFvh/oNMEH8=; b=GaqGZnau4ag5L/uZHgn2TeD163dPORwE6TZG0X3XoTci2d0AzaJkGFm3EG8d98rx20sRfu u1AkHgBJws1nqk+7lxzVe9xGS4FDNc5A0fqPF40GdXMdh0vq0yRIcWIoO1sAUtMj314YKP RUdsNJ2qws9jw5oIjXIpMtfw5baIQUtJX+Db64gJaXdt/h65m/hWPE8rqe0n4tG/E41fhh bTi96hYNZ9JBy5QLOkQh/mjRl3hRlTgEJghucLrhzdZY5tjJ841rE8/MjFY8npKJaSV/Dg yHCvL9gSaTWtrUV1oIjMQZAVMuaoFn6JmXu+SAjpw49a93FYDqKKQ7rOnw2d1w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1654571612; a=rsa-sha256; cv=none; b=lCbGkbI3x939Q24mdrNUsbcTFD366Pk/noWtiFM+3Bk5irtXAlXOwZofBqOqTE953OCY2i sSmeMvI5rOjPSWjV/QIMF5XAutlNFISi5JtjCoDlUYnXdL38Vu/11TFPtQMHr4LYDA87Oe xT6AoAp9wHLld2zLUqX0XR0Ut18mRhkH6BEVM/9PMoUdqLHxsBDcZDLfyil3NSOnV/R46D FzDktrgWZ3+ctwb+r438Ywq0CcYSUJNDN3/KYHuLFArExjRdbzgYENrtzLrrYIKkLQ+lHk 1ZztW/eW8NP8KcE3r0MIkqAxY9sGseaDdhbmqT/RhQm1za7ZwH66m8SFefUJDg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=R8pkptIW; 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: -4.01 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=R8pkptIW; 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: CE98651F4 X-Spam-Score: -4.01 X-Migadu-Scanner: scn1.migadu.com X-TUID: +97dlW++i/I6 i must be confused. menus aside, you can currently capture and it uses the org forest itself, so it is both crash-proof and snappy. and you can yakshave as much as you want, starting a capture while doing a capture. those were design goals. you can even be in the middle of a capture, get distracted, navigate around your forest, and find where you are in the middle of a capture. goes with the original crash-proof and yakshave and snappy use-original-buffer design goal. so are we talking about menus then? is there truly a need to make /menu state/ persistent or yakshaveable? On 6/6/22, Max Nikulin wrote: > On 05/06/2022 22:07, Arthur Miller wrote: >> Max Nikulin writes: >> >> After input from Ihor I agree that it isn't the best way, and was >> able to refactor org-mks to create a menu where I can execute any lisp >> form, >> when it comes in a list like this : ("h" "hello-word" (message "Hello, >> World")), where third element is just a lisp form. I have something like >> this: > > This message is merely my opinion that you may disagree. I am not trying > to prevent you from going forward. > > From my point of view current `org-mks' is more general giving you > opportunity to treat extra elements as you wish. A thin wrapper allows > to evaluate 3rd element of returned list. You have not convinced me that > built-in executable form is the essential feature. > >> (defun demo3 () >> "Illustrate nested menus, unicode separator and alternative >> decorator." >> (interactive) >> (let ((quick-menu-key-decorator-chars "<>") >> (quick-menu-vertical-separator ?=E2=94=80)) >> (quick-menu >> ;; table >> '(("g" "Greetings") >> ("gh" "Hello, World!" (message "Hello, World!")) >> ("gb" "Bar" (message "Hello, Bar!"))) >> ;; description >> nil >> ;; more tables >> '(("f" "Functions") >> ("ff" "Find File" (call-interactively #'find-file)) >> ("fo" "Open File" (flet ((next-read-file-uses-dialog-p () t)) >> (call-interactively 'find-file)))) >> '(("q" "Abort" (user-error "Abort")))))) > > It is tightly based on org-mks, but actually it is way to represent list > of choices with some hints to possible hierarchy and accelerator keys. > Quite similar list may be fed to completion read or represented as a > hierarchical GUI menu. The only specific is "always visible" elements > like "abort". When Ubuntu used Unity desktop their had a nice feature of > searching in application menu. > > There should be an extension point that allows users to replace > representation e.g. to improve accessibility. > >> DESCRIPTON is a property list containing following members: > ... >> :horizontal when `t', if multiple menus are present they are rendered >> from >> left to right, otherwise from top to bottom. > > It may depend on whether a window created to display menu is tall and > narrow or wide. > >> I have paramterized decorator character for shortcut keys as they appear >> in the >> buffer, org-capture uses "[]", as well as menu separator, which is >> currently >> hard-coded in org-capture, > > I agree that org-mks may have additional argument to specify menu > decoration. > >> Exactly. It is important that org-capture is one capture at the time so >> people >> don't mess their note files, agenda files etc. >> >>> Unsure if some >>> intermediate persistent store would be an improvement. >> >> Not sure what you mean here, but I don't plan to change anything in >> org-capture >> itself, it should still be one-task at the time. > > Changing interface to less degree of blocking may be confusing for > users. Capture template selection menu may be displayed in another frame > hidden behind other application, on another monitor, on another virtual > desktop, so invisible. So a user earlier distracted by something urgent > may try to start another capture. Captures may be initiated from other > applications using org-protocol. > > To avoid data loss while other capture is in progress, the data of next > capture may be temporary saved to some place till the user pops it from > the queue. I mentioned persistence since something may unexpectedly > crash, so it should be possible to resurrect enqueued captures in next > Emacs session. > >>> Likely nobody performed any steps toward `transient' as the interface, >>> but due >>> to such requests it would be nice to have possibility to switch between >>> menu >>> implementations. >> >> I am not building some generalized framework, as I said in my first >> respone to >> Ihor :-). > > I am not requesting for a framework, I mean API compatible with other > frameworks to let user choose their preferred ones. > > So tunables to control decoration sounds interesting. I am in doubts > concerning fixing some element as executable. Mode-map instead of > minibuffer may be a great step to more convenient interface (it > resembles help buffers), but may require more changes in functions that > do actual job. From other messages on this list my impression is that > API should be designed having in mind flexibility and other UI packages. > > > --=20 The Kafka Pandemic A blog about science, health, human rights, and misopathy: https://thekafkapandemic.blogspot.com