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: Tue, 24 Aug 2021 18:05:52 +0200 Message-ID: <20210824160552.mtr5fvglhywsjpq2@Ergus> References: <83y28wyozn.fsf@gnu.org> <87a6l8it83.fsf@mail.linkov.net> <83sfz0wfxz.fsf@gnu.org> <87y28sqhq8.fsf@mail.linkov.net> <83lf4sw246.fsf@gnu.org> <87o89oqcpv.fsf@mail.linkov.net> <20210823180207.ud2v7aar5ws5l7yj@Ergus> <87wnob1iik.fsf@mail.linkov.net> <87a6l7tgqx.fsf@aol.com> 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="10983"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Juri Linkov , Eli Zaretskii , Emacs developers To: Yuri Khan Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Aug 24 18:07:01 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 1mIYx3-0002fd-3G for ged-emacs-devel@m.gmane-mx.org; Tue, 24 Aug 2021 18:07:01 +0200 Original-Received: from localhost ([::1]:48532 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mIYx1-00035y-3Q for ged-emacs-devel@m.gmane-mx.org; Tue, 24 Aug 2021 12:06:59 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48634) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mIYwV-0002RK-QK for emacs-devel@gnu.org; Tue, 24 Aug 2021 12:06:27 -0400 Original-Received: from sonic301-3.consmr.mail.bf2.yahoo.com ([74.6.129.42]:35430) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mIYwS-0007ul-St for emacs-devel@gnu.org; Tue, 24 Aug 2021 12:06:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1629821182; bh=/jPdlMfok4sCXvCPzoe9FS9BC25jV8UvDvRM201w1aM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From:Subject:Reply-To; b=Q4SMGEDo0lid8t8JWamBM3DlAQXDo7/wlyXe0wDA3+DvcRqPl+fwm86ha3cTl1vkq06aU/pV9WzSRRHK05AzAhJ6ak+fU0ncU97nKWZw3QWWCs84Q4qS7wtqXIVKkklYj1KUCMYw6LX2F+1CMjQZnzoJ/DoO91211NZfMdlaA+Jqmvr4d1yFm5vfsoonHvt9C+kLCzFjTcM9Rbau5LBhbhiMh20/nFBGXaIDrBLhNRKbnKzcZRvOHImos4JXGT5+jUt0n6Hbz7QyWQhbG1tv28SWscuXtDQXP2ALVwPNRoLZiDGlxYsUbgcOl7qbAI7yBp4TjychWx+9OVSrF7BNSA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1629821182; bh=GUGZbVziOUwpE2IUV/7NXqmUXHzlaxQ3Bx+Lw7sRpYo=; h=X-Sonic-MF:Date:From:To:Subject:From:Subject; b=QnhDcT0oTvZ+XE4tQTb2M6SKWDU0aJ5RfygWuIkEihTQZNPZR/oGuhcXed3AuLWV/Lci7NgbTniyyD/kmi+vGE654Yq+8S4qKlX0tZjqIaY1lNtH4I786qGOW9Ij/AuaqXsTPLYTcmgyh8UgRUGjsc7xUKCK2mRot4lfcNmkc2AOfoFnjsXWuVCBqNjCF/L681iZ5PJTesllqGGoIZy/l0AtduF5fgsdRS7uuM3r4P97MdD4E594VxtzJn4kVWku8IW6b8rSgjH4GQ8kxHJpC5VgnRqNJRlXGpzU5NN0/xHqnIcCKcZ9wZF1jFv0vJFFVwmCfebZxIB0jsw3KunL8g== X-YMail-OSG: VecPUiYVM1mGyJ4pQ11SEZX4U51FFQNuo73oyf5yEktSe26Mn9.G1ONYcZ2TGR. HKS6BT2hSQel4PUeI4fZCtCG2feiuiQ9MHG2kBbVByD9TicmtC5oEOMrMOwyqNLscSGOaHu5E6dh znzTA_x0IevoEdvxWA_lQVMcOt03kZ8dDloVZ7ApWGVYfZVcXQx6A5gOlBt7e89m9PwCL0b.SxNK KUOJ8p2Hwh5TqaFXSYaeM5o3suoqVsGxMMnzHKCsO_6jNUtqv.Jzlb0W7NiWBNQdgg1MCqNAOvuL WWpw1n48VCcSyLW78Dogy8iDRkm6s1Qj8X002i8b3a1.3NRhrclo3N1JpP2AwiJT3J6bVyn.0E2z dVk0jwbxuTiSl9bxWsMsv5JQO7pzRuQRVwkw3pdK2CdBQ5kz4LTVhdA84VvARa9OmiIGESUqg0hd t_30TNcakB8BuCa6h4oaJhZKPZRdwxmByYl3JAPI94ZGAkMzGMb2.mcCu7MYuqeGLkL2u4WKsr9n MCsFS.5MhAs37AlSmkeb65Fpx5oTaigpRKV3KLnQj32hR8b0kprD1nEQI7KqnxO2nKjRvqRKtydC 4bOHpJ03AdS2V_KAg..hGwJfvsE28OGJsF4YAoYkQjevFkjmM4yroIeRAVTnWcwGaPpB4v8zZ2Lw H.5uRchh2qxN5Krr51lq48V75fvvjcHkUEGZC4EHSVeL0NsRZNEv76GP5CASbo8gLaS2juCamYi8 .zbZDcJuDz_hlvljkLmndymoOZFcKIOADdiZuOUdsnPRDuP.T7rrfX6vDSyHbn_oB1hC.1.Xseq4 xioJIbg6v3BYlF.fqIDgGoYLNIcHQGtnI19V5y_68F X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic301.consmr.mail.bf2.yahoo.com with HTTP; Tue, 24 Aug 2021 16:06:22 +0000 Original-Received: by kubenode521.mail-prod1.omega.ir2.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 54bfb1d9ed14aa9b21985fd96ffb9422; Tue, 24 Aug 2021 16:06:16 +0000 (UTC) Content-Disposition: inline In-Reply-To: X-Mailer: WebService/1.1.18906 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.aol Received-SPF: pass client-ip=74.6.129.42; envelope-from=spacibba@aol.com; helo=sonic301-3.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:272911 Archived-At: On Tue, Aug 24, 2021 at 06:44:44PM +0700, Yuri Khan wrote: >On Tue, 24 Aug 2021 at 15:01, Ergus wrote: > >> >> lk201.el:35: (define-key map "\e[29~" [menu]) >> >> rxvt.el:67: (define-key map "\e[29~" [S-f6]) >> >> xterm.el:353: (define-key map "\e[29~" [print]) >> >> >> >> where "\e[29~" is the sequence the menu key sends. So maybe you could >> >> use [S-f6] instead? >> >> >> >> That will make it work out of the box in urxvt. >> >> Maybe I miss explained myself. The idea to put it in [S-f6] is to make >> the context menu work with the [menu] button out of the box when >> available in urxvt (and on xterm if fixed). > >That would be wrong. Better: > It is not wrong actually. Because keys like [menu] require an alternative for those that don't have such a key. That's why in some emulators they are the same sequence than some other complex combinations like S- or C-S-; or some keys not present in our keyboards anymore (like ) but can be emulated with combinations. They are intended to be more like shortcuts; and when not, we use to bind to another combination any way. See the vt220 or the vt100 specifications for example. >* Push for terminfo to include a string capability that indicates the >sequence sent by the Menu key. Push for the terminfo database to >include that capability for major terminal emulators. > I already discussed this with the xterm developer, but the current translation is direct and does not rely on tricks in the emulator side. Xterm actually can distinguish between them, but I can't force every emacs user to use xterm because it is very limited in many aspects. >* Push for rxvt to change its Menu sequence to something different >from Shift+F6, and submit that sequence to the terminfo database. > >* In rxvt.el, change \e[29~ to the new rxvt Menu sequence. > This is somehow like create a key sequence to distinguish between 2+2 and 4... Or modifying all the universe around just because we want pi to be 4 instead of 3,14. >Even better: > >* Use a terminal emulator that lets you distinguish all key combinations. Actually the recommended terminal emulator to work with emacs is xterm. It is the most compatible and actually was a topic of a previous discussion/question I did long time ago. xterm allows to distinguish between S- and the [menu] sequence, they are different. But urxvt and many others don't; so that will imply that in urxvt, the context menu will take at least 3 keys when bound to [S-f10]. Because binding to [menu] will also take [S-f6]. That's what I want to avoid. Also because S- is already taken. So again binding it to S- will solve all the issues with a simpler trick. 1) not replace the current S- binding, 2) take only one S- binding 3) make the [menu] key work in urxvt the same as with gui.