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: Context menus and mouse-3 Date: Tue, 13 Jul 2021 14:32:19 +0300 Message-ID: <83zguq8n5o.fsf@gnu.org> References: <20200914061111.3trmuzhdvv7nwdcc@Ergus> <87y2acv2tw.fsf@mail.linkov.net> <83zguragqj.fsf@gnu.org> <87pmvnuyug.fsf@mail.linkov.net> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7385"; mail-complaints-to="usenet@ciao.gmane.io" Cc: philipk@posteo.net, rms@gnu.org, spacibba@aol.com, emacs-devel@gnu.org, monnier@iro.umontreal.ca, arthur.miller@live.com, dgutov@yandex.ru, ghe@sdf.org, drew.adams@oracle.com To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jul 13 13:33:47 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 1m3GfZ-0001j6-UE for ged-emacs-devel@m.gmane-mx.org; Tue, 13 Jul 2021 13:33:45 +0200 Original-Received: from localhost ([::1]:52234 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m3GfY-0007hp-W6 for ged-emacs-devel@m.gmane-mx.org; Tue, 13 Jul 2021 07:33:45 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56504) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m3Gea-0006V4-LB for emacs-devel@gnu.org; Tue, 13 Jul 2021 07:32:44 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:55968) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m3GeU-0002qm-8P; Tue, 13 Jul 2021 07:32:38 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4108 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 1m3GeI-0003ke-IL; Tue, 13 Jul 2021 07:32:29 -0400 In-Reply-To: <87pmvnuyug.fsf@mail.linkov.net> (message from Juri Linkov on Mon, 12 Jul 2021 23:56:39 +0300) 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:271195 Archived-At: > From: Juri Linkov > Cc: monnier@iro.umontreal.ca, philipk@posteo.net, rms@gnu.org, > spacibba@aol.com, emacs-devel@gnu.org, arthur.miller@live.com, > dgutov@yandex.ru, ghe@sdf.org, drew.adams@oracle.com > Date: Mon, 12 Jul 2021 23:56:39 +0300 > > Nowadays every other app uses down-mouse-3 to pop up a context menu, > but in Emacs mouse-3 operates on the region. So the solution is > similar to mouse-1-click-follows-link: to pop up a context menu > after a delay, otherwise the immediate click operates on the region. Can't we decide which effect is TRT based on where the user clicks? Context menus are available only in special places, and it would seem that setting the region in those places doesn't make sense, by and large. And if sometimes we cannot dwim there, how about making the defcustom you introduced to allow the users to express their preferences in these problematic cases? If the above makes sense, I think it's a better solution than forcing this feature on everyone. I would be surprised if holding the mouse button for several hundreds of milliseconds would suddenly produce an entirely different and unrelated effect, and I'd probably be annoyed by the need to hold the button when I _know_ I want the context menu. So it sounds like this implementation is sub-optimal from the get-go, and we should try looking for a better one. We could also consider an even more radical solution: an option to swap mouse-2 and mouse-3. Because isn't it true that people who expect context menus to pop up when mouse-3 is pressed generally don't expect and don't use region-related mouse clicks at all? (We have such a "swap-buttons" variable specific to MS-Windows, and I've been using it for eons, because clicking mouse-2 on a wheeled mouse is very inconvenient.) Thanks.