From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id 2G2hMTC2YWfTPAEAe85BDQ:P1 (envelope-from ) for ; Tue, 17 Dec 2024 17:34:41 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id 2G2hMTC2YWfTPAEAe85BDQ (envelope-from ) for ; Tue, 17 Dec 2024 18:34:40 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=CYn9igf1; 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"; dmarc=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1734456880; 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=SW1UmS3J7vi1r60xhjXEaaMRDvHVT/FuoQ+lgeKaGIs=; b=miMTX+oKHsgqj8sBxPoInZmx4iIFBXRWQkA20fc3kTn2mlCYgU+X5mryo7N+RzruYXv8ac JfTOajG18/QXnSceqLxajqB+59n+8TF2f2BZ0ipmgaPoX7KNCqR833ve67+VPGlzl1FUA/ MdXd0SjEY227z5CGF7gAe/xFBg+YGvHtCeXkGvzI248tq2FmafjUC/ULy3IRMvXHzJlg5r UguNhya2yaBReFSxLR0AiyERKtW9lesRYhr8fpppyDUoWTfpPBpEyIHN3CBoHSaoBkNjfS Tzm3k0YpJKZAdCAkwlGFfrdq3/Bt5oGlOigUdmE/OoNDW0RL3ghsVML+y94+tw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1734456880; a=rsa-sha256; cv=none; b=aPD0AZYPoxy7ExxjiLyLm6MCve5dTFEsORQ7lX1POVVVotisgeXCr+eda2gTgEupuNOtdh h7RCKrjBEXLZ3R3cVJZKu0r65QKR4dLe9ly96sBBz/xcYfRlO7pMZb5PC5sOhmBeHwXUfM KGrsmmMn5EM6zWhIniF8UYyKm+KRySJFrNu8FIpDkNVkm4G3JY8zj3TlQpyIEvFbzLD9wj 5eXHAbIyOPMTKYND6O0b5VwhAYBjWjEPgnyRhH/L10e/Ma39xTrMuPGaC+nYu0OB1p0HAK 4cHbRXmqQCFwn0uVJzdLvdSEOLBOsPd9lgyUt2ZgiFAOSKkIUFvJZrS6GHKDLA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=CYn9igf1; 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"; dmarc=pass (policy=none) header.from=posteo.net 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 73D7A9B856 for ; Tue, 17 Dec 2024 18:34:40 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tNbSi-0007GL-Ql; Tue, 17 Dec 2024 12:34:25 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tNbHX-0002mM-UO for emacs-orgmode@gnu.org; Tue, 17 Dec 2024 12:22:51 -0500 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tNbHT-0007E0-MM for emacs-orgmode@gnu.org; Tue, 17 Dec 2024 12:22:51 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id D12CB240101 for ; Tue, 17 Dec 2024 18:22:41 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1734456162; bh=bc8waRMRILkqBDsA31xx2uA+CWAGdQFK8IsFwx1S/Is=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=CYn9igf1T9k7b5mhDctdNkVhc2+xuzeIVwSSEiI8p1LxKTPwcFg8NGBUcwbzoBAPp rOqHUCFwehdVvNJFDPgQBVIdr3G5mZtnqCkF0VdyA9/LoL9BJuO3kp7N/mkah8fDZ+ Q+DrhsFUtbXSMWuPkD18Ai1PEuETVkilRXulOpAjcnLusPbc87szTlyPcVEsUXABJG csbeZYnnJERZFPXGEVVv/npOASSpZbAjgDAjG752G8PFZjVFl/FLsi88TFfJ31MZLI fc/32bGoOb5jSKAYM4L/ERO7AlDaHqNlh4lI6oUMZVscUnRIWQjhR0yrOS6pv3OPTx dajltArXt+Gag== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4YCNt74BSPz6tsb; Tue, 17 Dec 2024 18:22:39 +0100 (CET) From: Ihor Radchenko To: Kierin Bell Cc: =?utf-8?Q?Tor-bj=C3=B6rn?= Claesson , emacs-devel@gnu.org, emacs-orgmode@gnu.org, Philip Kaludercic , Omar =?utf-8?Q?Antol=C3=ADn?= Camarena , Jonas Bernoulli , Juri Linkov , karthikchikmagalur@gmail.com, Visuwesh , charles.choi@yummymelon.com, Justin Burkett Subject: Re: [RFC] The best way to choose an "action" at point: context-menu-mode, transient, which-key or embark? In-Reply-To: <874j34st44.fsf@fernseed.me> References: <87msgzh1dh.fsf@localhost> <874j34st44.fsf@fernseed.me> Date: Tue, 17 Dec 2024 17:23:53 +0000 Message-ID: <87frmm8bpy.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Tue, 17 Dec 2024 12:34:20 -0500 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -6.47 X-Spam-Score: -6.47 X-Migadu-Queue-Id: 73D7A9B856 X-Migadu-Scanner: mx10.migadu.com X-TUID: +vuIVq7WUrtz Kierin Bell writes: > I think that the built-in Emacs thingatpt.el should not be overlooked > here. > > Instead of implementing an entire system specific to Org, imagine a > generic action-at-point interface that works on "things" from > thingatpt.el. For the various targets, Org could add new "providers" to > `thing-at-point-provider-alist', `forward-thing-provider-alist', and > `bounds-of-thing-at-point-provider-alist'. [ Org actually does already > register its own 'url' provider for links. ] This is actually not what I had in mind in this thread. I was only hoping to get input about customizing menu interface in a way that menu UI can be chosen by user. As for `thing-at-point', it is not enough for Org's needs. Let me show you an example of one of the Org "action" commands. org-ctrl-c-ctrl-c does the following: 1. If performs specific actions depending on Org syntax element at point 2. It performs alternative action in Org edit buffers where org-finish-function is defined. 3. It performs different things depending on context around thing at point. For example, first paragraph inside a list will trigger a different action compared to just a paragraph. While (1) can be easily ported to thing-at-point, (2) is much harder, and (3) will involve creating artificial "things" just for the purposes of specific Org command. > Then, Org could implement a number of action selection interfaces that > act on the various classes of "thing". An exemplary package would be > Philip Kaludercic's great =do-at-point= package, which provides a simple > action selection menu for the thing-at-point using > `read-multiple-choice', which I find elegant and intuitive.[1] I'd like Org _not to implement interfaces_. Instead, I want to reuse the existing interfaces - transient, menus, which-key, etc. My main question is whether we can do such thing cleanly. > I may also be misunderstanding the proposed interface. For example, > instead of a generic interface for acting on a single thing at point, > maybe you are describing more of an interface for associating commands > with multiple potential targets that must be located (e.g., in a > subtree), which are then each associated with actions. Yup, something more like this. > Even if that's the case, there is a good case for implementing > thingatpt.el providers for the targets, so that users could bring our > own action-at-point packages/interfaces. [ I would be willing to help > write some of those providers. ] And if thingatpt.el isn't generalized > or fast enough, then there is a case for creating a new, more flexible > /de facto/ library like this for Emacs. Better interoperability with thingatpt.el will be certainly welcome. I even coined this idea in the context of tree-sitter in the past. -- Ihor Radchenko // yantar92, Org mode maintainer, Learn more about Org mode at . Support Org development at , or support my work at