From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: New Context Menu Date: Wed, 18 Aug 2021 16:30:37 +0300 Message-ID: <83tujm518i.fsf@gnu.org> References: <20210818120834.i3orh535tb2enpos.ref@Ergus> <20210818120834.i3orh535tb2enpos@Ergus> <8335r7546s.fsf@gnu.org> <20210818124309.wvd4vhzv6sgsujdh@Ergus> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5822"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, juri@linkov.net To: Ergus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Aug 18 15:31:35 2021 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 1mGLfK-0001HD-Nw for ged-emacs-devel@m.gmane-mx.org; Wed, 18 Aug 2021 15:31:34 +0200 Original-Received: from localhost ([::1]:36234 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mGLfJ-0000SD-1P for ged-emacs-devel@m.gmane-mx.org; Wed, 18 Aug 2021 09:31:33 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45138) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mGLeS-000876-Bd for emacs-devel@gnu.org; Wed, 18 Aug 2021 09:30:40 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:47078) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mGLeR-0008U7-8S; Wed, 18 Aug 2021 09:30:39 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1641 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mGLeQ-0007og-Du; Wed, 18 Aug 2021 09:30:39 -0400 In-Reply-To: <20210818124309.wvd4vhzv6sgsujdh@Ergus> (message from Ergus on Wed, 18 Aug 2021 14:43:09 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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" Xref: news.gmane.io gmane.emacs.devel:272567 Archived-At: > Date: Wed, 18 Aug 2021 14:43:09 +0200 > From: Ergus > Cc: juri@linkov.net, emacs-devel@gnu.org > > >> Maybe this is ask for too much, but I am wondering that once the context > >> menu will be released with emacs 28, then a lot of packages will try to > >> implement such a functionality in a hacky way with advises/hooks and so > >> on and they won't get properly maintained. > > > >I don't see how this can be worked around in a hook, because TTY menus > >are implemented entirely in C. > > > Users and external developers may try their best it this annoys them > enough. Yes, but there are limits to that. Like the speed of light, for example. > >> In case the user wants to bind the context menu without using the mouse > >> how can be done? Will the context-menu appear in the current cursor > >> (point) or in the current mouse arrow position? > > > >We could do something similar to what we do when the user presses F10 > >on a TTY frame. > > > On tty the F10 menu opens in the minibuffer. ??? It does not! I just tried. Are you trying in "emacs -Q"? > It would be better if we can just show the same menu than with the > mouse instead That's what F10 is supposed to do. > because it appears in place, closer to where the user is editing. If you want the menu to be dropped close to point, you need to tell the menu code where that is, it by default expects to get that from the event which triggered it, and that only works with mouse clicks, not with keyboard keys. In the implementation of F10, we use some trick to do something similar, but since that opens the menu-bar menu, the location of point is not very relevant, so we use something else. > >> I know the context menu without mouse is a bit pointless > > > >Why pointless? menus work on TTY frames without a mouse just fine, you > >can move and select using the keyboard. > > > But context menu it more mouse-oriented in general because it is a need > specially for more mouse oriented users. Why to do something like F10 + > arrow + arrow + Enter: when you can do just M-w? Because menus are self-explanatory, whereas M-w requires that you remember it? > Or why to use arrows if just used the mouse to activate the menu? Because you don't have a mouse to begin with? or because you don't want to move your fingers from the keyboard? The usual reasons, IOW.