From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ihor Radchenko Newsgroups: gmane.emacs.orgmode,gmane.emacs.devel Subject: Re: [RFC] The best way to choose an "action" at point: context-menu-mode, transient, which-key or embark? Date: Mon, 16 Dec 2024 18:06:18 +0000 Message-ID: <87ttb3cxk5.fsf@localhost> References: <8734m28l9a.fsf@gmail.com> <874j4m9ep6.fsf@gmail.com> <87h68gfqj1.fsf@localhost> <87pln3f3cc.fsf@localhost> <87jzd9ojj0.fsf@localhost> <87cyj0ajm9.fsf@gmail.com> <87zfm4s50x.fsf@localhost> <87wmh8s358.fsf@localhost> <87y11nwp9z.fsf@gmail.com> <87v7wd9a2h.fsf@localhost> <878qt7fbki.fsf@gmail.com> <87o71jwdxz.fsf@localhost> <87wmg6edr0.fsf@gmail.com> <87msgzh1dh.fsf@localhost> <87frmq6ufj.fsf@mail.linkov.net> <87zfkx1fha.fsf@localhost> <8734io3xyo.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11308"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, emacs-orgmode@gnu.org To: Juri Linkov Original-X-From: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane-mx.org@gnu.org Mon Dec 16 19:05:50 2024 Return-path: Envelope-to: geo-emacs-orgmode@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tNFTa-0002m9-9O for geo-emacs-orgmode@m.gmane-mx.org; Mon, 16 Dec 2024 19:05:50 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tNFSl-000068-AG; Mon, 16 Dec 2024 13:05:01 -0500 Original-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 1tNFSj-00005T-Hv for emacs-orgmode@gnu.org; Mon, 16 Dec 2024 13:04:57 -0500 Original-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 1tNFSf-0007u5-C0 for emacs-orgmode@gnu.org; Mon, 16 Dec 2024 13:04:56 -0500 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id DC5E1240101 for ; Mon, 16 Dec 2024 19:04:50 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1734372290; bh=mRDpg+LuCVbYcaNakF4Y+1guJRC3SsSk87NsiCusJIQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=Ab7l/BKjCXWNVRhENXH2tQe+OPJ4AIrTR4cbRyW1eGP0OxXhiF+FvErRm0OGDpsWp palI0LyTEkPmsOGhFHhFeCmBlk60HHzWufECE6jvwNWt93xTbWcJ6AhMMXKpkWEK8h MHtOfRj3AxUdGD5Dfs+5mTkTy17R7uSFmUVs7hwPRGQ5EdtrqKfRLRv0WapRFuNkw3 kWN/FdGv0+ocLdu92NlM8G6zNCia3xk+6ZVGi0y8OvyTK226sEubUp/FiRQGkZANqX 7vl0yvQjN8V6oAQ4IpqBy1rNKie1oFal09osYbWg+kIYLlBZJsdL3SFDqPobYHSxI0 H+S8BykqU62wQ== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4YBnsG1csCz9rxL; Mon, 16 Dec 2024 19:04:50 +0100 (CET) In-Reply-To: <8734io3xyo.fsf@mail.linkov.net> 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_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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+geo-emacs-orgmode=m.gmane-mx.org@gnu.org Original-Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.orgmode:164192 gmane.emacs.devel:326558 Archived-At: Juri Linkov writes: > Then you can use something like the buffer-local variable with the > same name 'context-menu-functions' (handled in 'context-menu-map'). > The main point is that these functions return a menu. > > But instead of a menu, an org function could return > a more high-level data structure like > ((name1 . action1 props) (name2 . action2 ...) ...) > > IOW, this means adding an abstraction layer on top of the existing > user interfaces such as transient and context-menu. Yeah. I am not 100% sure if adding an abstraction layer is a great idea. Another idea I was considering is similar to what you propose: have some kind of hook like `context-menu-functions', but accepting an extra argument - menu type (context menu, transient, which-key, etc.). Then, it should produce appropriate menu spec. However, this will require Elisp to customize things. Also not ideal. -- Ihor Radchenko // yantar92, Org mode maintainer, Learn more about Org mode at . Support Org development at , or support my work at