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 20:10:52 +0200 Message-ID: <20210818181052.qpa7cwhim2i6ftmx@Ergus> References: <20210818120834.i3orh535tb2enpos.ref@Ergus> <20210818120834.i3orh535tb2enpos@Ergus> <8335r7546s.fsf@gnu.org> <20210818124309.wvd4vhzv6sgsujdh@Ergus> <83a6le4rz1.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="34679"; 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 20:13:21 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 1mGQ40-0008q8-19 for ged-emacs-devel@m.gmane-mx.org; Wed, 18 Aug 2021 20:13:20 +0200 Original-Received: from localhost ([::1]:58136 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mGQ3y-0007Mh-VN for ged-emacs-devel@m.gmane-mx.org; Wed, 18 Aug 2021 14:13:18 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45658) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mGQ27-0005h6-Ne for emacs-devel@gnu.org; Wed, 18 Aug 2021 14:11:23 -0400 Original-Received: from sonic312-21.consmr.mail.bf2.yahoo.com ([74.6.128.83]:35807) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mGQ25-0002r5-I7 for emacs-devel@gnu.org; Wed, 18 Aug 2021 14:11:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1629310279; bh=XdjaADNysXcIB1FYKBMnM1rCIxdwG07dy5fNaddaQEo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From:Subject:Reply-To; b=str2a8M4IX5Ney7gIyLx3NQ4qjLe3RP6MdqaaFKF2PsaCXvPa+h4+MIuZvMqIpe8PwXZQJPwTrx7E7yFBEyNqLzwQ4yMz1R6ZF3fDgGj1B/Z2aeBaJv1JIcDHC4JqvbeIRRJspP4LCUEtWaZxI4FUTD4oIzoMSnk/sMoUV1/DIaH6aPfxRZVTg4fCG3O+8D+IsyKjpC3NA4vUaE+NMC2JJVEG94yPuQy7YTlZNHjhXU8DLJSGO0G1SchFtR2bx4wUCpYUYFbpo+zHFHa5fjd9gys71rrcPwe0VNVknEu+kumvWpEKY56LuL2ILYMxkGgdx8l697gyH+Pnsi5d9QZHg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1629310279; bh=Mi7V2tBZKC4pdu3+X2F3uVynSAzbwUohe4vjfVAnU1T=; h=X-Sonic-MF:Date:From:To:Subject:From:Subject; b=Yj+d74KEJbkBrN9g3gGIk3hjyySWArVMYGPY2YY0kPDuH2On9h4l/QyZP1LLf4gyTYyXEPHYlWOLIGmPvHhX0RWSgfXZmNuY7ioydMcXV3czHIw3UEjCwGzxJBUYlsNc+r3ew0mhKHpW5VTzj1cSYKPmStDMNgd190NZOuvGlPq4naYRaaXuCVRtu8n3SlHQ9o6EO8Z8m09ObNjae0dFbuy/M3QRklx2LY0OFFCte3RWpcip4jh+rSoCk2rWAPEjYIiDW8ooTP/YC0HrRN+TK16lW55Ane6ssNb29/uByrIvYcVkOFTy9Edq7q3ab5gYwY9aajrD+XMUI7vSVe7+Tw== X-YMail-OSG: F5lVJ5gVM1nlhqL08w1OCBr_JkT6Hkk3fIw27myO8rDQvjZCoyjF_X4RV6vuHPE 7ls0HhQa7UzzHNG15hUMxqjHDLC8jDNKmWv2mEcnjZK6QVHLSAlmhwACKc8VafRxVE4Ke83iQ.hx az0hlrwzz0L8O4yhFFeVZoh7udhWnhCOZYbBdfuh6dlfiSwK3nqLy4e_Mz8c8WwgugCWP8hM2Mow cIQWi2zd3HvDFGu9H.VkWGLv37deqmlcbbjpc.Rv66oPf4H5MI83caNAmdkJ4BDhH4mvvMJjwv0k X3kEBBt.yVhnKaArgSykI_0Ctk_C34iz2WjQixB8ZA56KFHw3RlN5Uy59Fuf4tkuZSKrwitDa.qL knyPqDLl8nfyK9auwA0Mb8_CH8QrUPcR5goNUgv9OoYyxG_wyfHsUEzl_COxo9RXYfUVhlEnK19H iZ3UbyxCk_0rB1sIKEjz5PvycItAIVMjxm2Qzaci.xhvN0J8eX1uBEM8SaTizcqnEMjW3uSg51ym zNAww3sI3UcDCOR3jJl9XxbUGX2CQhgiZLb8nLOqS1MEBWXWwAWYZzVDe.Hq..12yzSm83rOcRdp 9xosiFjYNLWhmTMzo7zPLGhnNQ2X01r9jcqkdCtwQqfG3_dXtavGZIn2ciC8vPGOx_rqfzwflevo j85DgSlBo9u11YzRT0gGFyotegkGMoKTu_VRWfncVJQozJTdR4jcrRqTLOhoYhR785Bgi9w2k7bT mwG5l0y9VEy.0HSBs1MnIjZ7QbtMmok8GoZDEEP_ggzT6ie0544ak2xDL1DjaPpSpjMKS9mJ6lap hAOqKumfcYnZ2uYX2ldvvXhi4TjK9dqitnJ0Lh_b_. X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic312.consmr.mail.bf2.yahoo.com with HTTP; Wed, 18 Aug 2021 18:11:19 +0000 Original-Received: by kubenode518.mail-prod1.omega.ir2.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID b1260a194dea6df8a484cf5b35a11184; Wed, 18 Aug 2021 18:11:14 +0000 (UTC) Content-Disposition: inline In-Reply-To: <83a6le4rz1.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.128.83; envelope-from=spacibba@aol.com; helo=sonic312-21.consmr.mail.bf2.yahoo.com X-Spam_score_int: -1 X-Spam_score: -0.2 X-Spam_bar: / X-Spam_report: (-0.2 / 5.0 requ) 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:272605 Archived-At: On Wed, Aug 18, 2021 at 07:50:42PM +0300, Eli Zaretskii wrote: >> Date: Wed, 18 Aug 2021 14:43:09 +0200 >> From: Ergus >> Cc: juri@linkov.net, emacs-devel@gnu.org >> >> >> Could we add an option to avoid this and have the same interaction >> >> behavior than in gui please?: mouse-3 activates the menu, a click over >> >> an option selects it and a click outside the menu hides the menu >> >> >> >> I know this may be something external to emacs itself; maybe it is how >> >> xterm menu behaves, but probably there is a way to go around this >> >> without excessive complexity. >> > >> >I'm quite sure it's how the mouse support behaves, and has nothing to >> >do with what Juri did. You should see the same behavior in any menu >> >on that display. >> > >> >It works for me as you expect on the w32 console. >> > >> :( I supposed that. It will be hard to have such a functionality in >> xterm then. And no other terminal works completely fine with emacs for >> me. > >Actually, I take that back. The reason for what you see is that the >menu is popped by down-mouse-3, not by mouse-3. So if we can arrange >for optionally doing this with mouse-3 (why isn't that the default, >btw?), or if you could do that in your customizations, you should be >able to have the behavior you want. > Indeed, I tried that and it works! Something as simple as: (global-unset-key [down-mouse-3]) (global-set-key [mouse-3] context-menu-entry) seems to work; but maybe Juri made the other one the default for some reason. Any way I agree that this behavior is more comfortable and probably should be the default. But at least this needs a custom or to be documented for new users. I would do something more or less like: (defcustom context-menu-mode-binding [down-mouse-3] "BLABLA") (...) (context-menu-mode (setq context-menu--old-mouse-3 (global-key-binding [mouse-3])) (setq context-menu--old-down-mouse-3 (global-key-binding [down-mouse-3])) (global-unset-key [mouse-3]) (global-unset-key [down-mouse-3]) (global-set-key context-menu-mode-binding context-menu-entry)) Apart from that, there is another issue with the "Paste" command in tty. Paste calls mouse-yank-primary, but in tty this commands calls gui-get-primary-selection and there is no selection because it tries to get the one on the primary selection not the one in the system (secoundary or clipboard) not the emacs kill-ring either. So I get: error("No selection is available")