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.devel,gmane.emacs.orgmode Subject: Re: [RFC] The best way to choose an "action" at point: context-menu-mode, transient, which-key or embark? Date: Sun, 15 Dec 2024 09:07:45 +0000 Message-ID: <87zfkx1fha.fsf@localhost> References: <8734m28l9a.fsf@gmail.com> <87v7x548ri.fsf@gmail.com> <87y120daue.fsf@localhost> <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> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35261"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, emacs-orgmode@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Dec 15 10:08:10 2024 Return-path: Envelope-to: ged-emacs-devel@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 1tMkbi-0008zE-0b for ged-emacs-devel@m.gmane-mx.org; Sun, 15 Dec 2024 10:08:10 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tMka7-0004Tz-VP; Sun, 15 Dec 2024 04:06:32 -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 1tMka3-0004SV-9e for emacs-devel@gnu.org; Sun, 15 Dec 2024 04:06:27 -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 1tMka0-0006wB-Tx for emacs-devel@gnu.org; Sun, 15 Dec 2024 04:06:26 -0500 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id E02C3240101 for ; Sun, 15 Dec 2024 10:06:17 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1734253578; bh=CHPIwIcQwUGNNp71IxoXsb9d0XD1gloudUEsWWTWKks=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=A/1tSkoccQT6MAP/BzJhjyICDai+HHbqokaq3761c1v/tabLfS5KhBePlWFR33BAB 1BZTRDYk9gr1jxmZZ4wHi3oFevH894kUf/4SnNlOIwBYs7zo2edQFrUaPYnXfCzBXx l07IPnxRz0Z4oH8+Ct7ZSYo/yngo4lTYvPjsSf+6yEtuobNIXdpUNIwAqF+LiiWhMz czqStiDLbJQioXDg5EDNWvzMMLzSTQlPmHgElOwKbMDUPFhexLBKMJcqKEC2zmIziO He9umKl0I2mfVagqqMQyPWJLymje2p6gPcSnpxbYgPekudhd6901leFIe+r4aV0xPx 1rgsgCiFLt0HA== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Y9xyK09B7z6tsb; Sun, 15 Dec 2024 10:06:16 +0100 (CET) In-Reply-To: <87frmq6ufj.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_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-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:326521 gmane.emacs.orgmode:164154 Archived-At: Juri Linkov writes: >> 1. List of possible actions: ((name1 . action1 props) (name2 . action2 ...) ...) >> PROPS is a plist defining extra properties like key-binding, display >> string, maybe something else to be used in the future. >> 2. Menu interface to use (transient, context-menu, embark, which-key) > > This looks like the best design. Any part of the org buffer could have > text properties with a list of its available actions. Such a property > could be similar to 'context-menu-functions' handled by 'context-menu-map'. > But since it will be a plain generic list, it could be transformed to any > menu interface such as transient, context-menu, etc. I am a bit lost. Maybe I did not describe the use cases I had in mind well. What I have in mind is a menu UI for various commands: 1. org-open-at-point (one set of actions) 2. org-ctrl-c-ctrl-c (another set of action) 3. some other command 4. ... Then, "actions" will be various options a given command can do. In such scenario, the usefulness of text properties is elusive to me. I'd rather link the menu items to a command, not to place in buffer. > To transform it to context-menu, org-mode should provide a function > like 'context-menu-minor' that will create a corresponding menu > that will be added as a submenu of the default context menu. > > Such integration with existing menus would be better than the current > implementation of context menus in org-mouse-context-menu that completely > replaces the context menu with its own. What do you mean by "default context menu"? -- Ihor Radchenko // yantar92, Org mode maintainer, Learn more about Org mode at . Support Org development at , or support my work at