From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ergus Newsgroups: gmane.emacs.devel Subject: Re: New Context Menu Date: Wed, 18 Aug 2021 19:17:53 +0200 Message-ID: <20210818171753.5pi2sugllugncfew@Ergus> References: <20210818120834.i3orh535tb2enpos.ref@Ergus> <20210818120834.i3orh535tb2enpos@Ergus> <8335r7546s.fsf@gnu.org> <20210818124309.wvd4vhzv6sgsujdh@Ergus> <83tujm518i.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11980"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, juri@linkov.net To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Aug 18 19:19:59 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 1mGPEN-0002pO-4m for ged-emacs-devel@m.gmane-mx.org; Wed, 18 Aug 2021 19:19:59 +0200 Original-Received: from localhost ([::1]:38230 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mGPEL-0005N5-0x for ged-emacs-devel@m.gmane-mx.org; Wed, 18 Aug 2021 13:19:57 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53368) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mGPCo-00046U-MJ for emacs-devel@gnu.org; Wed, 18 Aug 2021 13:18:27 -0400 Original-Received: from sonic311-14.consmr.mail.bf2.yahoo.com ([74.6.131.124]:46111) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mGPCk-0006XH-V6 for emacs-devel@gnu.org; Wed, 18 Aug 2021 13:18:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1629307097; bh=6G2TQOElUXpBUNoZxLksRx6KEOhlyztP/2g7VbOWd/U=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From:Subject:Reply-To; b=A5SF5YEb9mSHkJjx5EqT1p+dW/8UdGJQv4jktoYfFgQMJa9dL6fweeTTHyN3f5Bj0SaZoM0ltDtz8UIT2qxb/HO/9PgRk+X1J7MhGGWJ4YSWDjN80bY2NFaaddB1xb2epaIGjPQo4UkGK6sEdsMMxIw1MhqDdA3uzkdAJgZGfgcqmHZcR0f9rem8wXdcGZ8DMtQ2RsmK+fZEyzMpcEsfqkmauIfTObrKKdlA6XU46zxzXzQXXJYkYbIIA7oThI4c5LOD70Uv/NEhRhqu9+DCM++Q8W0YmvureO/BihdREMGR+QVJiWks6xAcOcfanybyD7M5bQghYIZNYiiOTIdtaA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1629307097; bh=8wFzDkCV7jKK7vf0Vz1MwDNy/OtspAS3NdftheTHDJO=; h=X-Sonic-MF:Date:From:To:Subject:From:Subject; b=WOQ2xY7Ec/TY0fvHwmJUWmSrX0v0CUck/4Lc0+bRw33mDMkpco8Y43nvNuQ1O3xsE4R/7rHecrGTytoWLf1X79aFbBsFmT7Ok3PX9NcviSKQPq+yC/4yb4P4eeF5mlwpjTfm+uE0aRIDODQ8g4AE+bI+v2WFh4EbBPocOxMWZJYlsHrvuzMqMJqp3CugKRJxv26zfHFTQYM9dvdmWiJfXwxy7BQF8irXoCd9Z2sl1DYNRR2gNtM8RtniTVGepcR+oP4kBhvEaPYZt+yevlHCRiNSyd1KKYNxrL1SWBeL4loLluEyNtUaPu8e9u5aioOk3jFmnC3mj1ZgZjAoZ621Ng== X-YMail-OSG: 8lEKa_UVM1nTMSkAvBw9z3.AU6cZc2P65HqdoblrkLFLpNb_wEY5h1HEw.7c3bE uMG6imocrYlAMILHQhMaksS128y8RuZwwTVOrUWuIMrwKJ6N4bp33meXFlumXt.04Y.cqkaIFl3c Xs_R_xUCv0QWTmf1Jz._FetrOMPhK64RU4bWOBP91DIRTZQCz.yhqNV18TIg8cfGV3GgOLKsDSVB d0aJDDwjNEMNyXerjTCMHA7yM1AApcnVSD.olZ4AVeYetFpMcGuVGH.94HNyUi9QHNJ1Zwpldqw0 avZSgbKFdwdOpe_JuagCKCxZsA4ggi02kEjUKOeNV71sH_XemYQ3GxRUTnTj_L.ygsx5YAcZG6er XH1FMAqy84tIOQJ3w7.hSvDd13Coe0fpiE60xtiXsbOyufCWdXsafyzq4AAhxxhDps_R0mppfFrd KWZ6GpGOHv856UcL3v8eeV48Zdo_E1xzOaAeSbE41h04eTZZ8K40LVc6kBetICA6GRbvPkFr457T BXbFFSeHr9IdKRsszbIwuJUpoGvoi555oZ5N_Y5oAr28JPZoRb_0_iRY4Or6Gv4QYKy1UpGADewv 7Ns9xOqUYO9tnm6n1JYD9tt47e6mDEL5RlGk70mbfLDfD5EIMMBD.C2MmlGBTuVLkkupF.6VBilK I6Bo0XGd7fCMEdZrMX8FKq0juV_3Qyoda79Ceqlc4DQDXkrSo0bWFuLnpPrlKZVm8utB_wR.wrvG q80v_ZGF4zZNQ.yH2QYwPMOEH.qHutdktgIb5otJ4VGG5VCqmrqp26_mMHbTwnorhLRo1exeCGBd R82K.hul6NA9mVL4ilhMgvrD94IJGSNY2XfJlIsfWR X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic311.consmr.mail.bf2.yahoo.com with HTTP; Wed, 18 Aug 2021 17:18:17 +0000 Original-Received: by kubenode532.mail-prod1.omega.ir2.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 4c6e45142487d40f9228b0ad11b7ee46; Wed, 18 Aug 2021 17:18:15 +0000 (UTC) Content-Disposition: inline In-Reply-To: <83tujm518i.fsf@gnu.org> X-Mailer: WebService/1.1.18850 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.aol Received-SPF: pass client-ip=74.6.131.124; envelope-from=spacibba@aol.com; helo=sonic311-14.consmr.mail.bf2.yahoo.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, RCVD_IN_MSPIKE_H2=-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.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:272599 Archived-At: On Wed, Aug 18, 2021 at 04:30:37PM +0300, Eli Zaretskii wrote: >> 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. Ahh sorry, I tried that from a real TTY ;). Now I get your point. Yes, that's what I want. > >> 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. > Passing the point location shouldn't be too hard; maybe it only requires an extra condition when the "event" is not a "mouse event" use the point location. On tty some time ago that was an issue because the menu used to open always in the middle... but now it is fixed. >> >> 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. >