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 and mouse-1 Date: Fri, 27 Aug 2021 09:55:36 +0300 Message-ID: <83y28nqsuv.fsf@gnu.org> References: <20210818120834.i3orh535tb2enpos.ref@Ergus> <20210818120834.i3orh535tb2enpos@Ergus> <87tujb77vq.fsf_-_@mail.linkov.net> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9244"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Aug 27 08:59:26 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 1mJVpk-00026c-US for ged-emacs-devel@m.gmane-mx.org; Fri, 27 Aug 2021 08:59:24 +0200 Original-Received: from localhost ([::1]:43000 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mJVpj-0008MA-Py for ged-emacs-devel@m.gmane-mx.org; Fri, 27 Aug 2021 02:59:23 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48994) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mJVmU-0004it-MS for emacs-devel@gnu.org; Fri, 27 Aug 2021 02:56:02 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:40806) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mJVmS-0003Xt-T7; Fri, 27 Aug 2021 02:56:01 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2790 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 1mJVmN-0001Fy-EH; Fri, 27 Aug 2021 02:55:59 -0400 In-Reply-To: <87tujb77vq.fsf_-_@mail.linkov.net> (message from Juri Linkov on Fri, 27 Aug 2021 09:21:21 +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:273126 Archived-At: > From: Juri Linkov > Date: Fri, 27 Aug 2021 09:21:21 +0300 > > Other apps support the following optimal mouse gesture: > > 1. Press down-mouse-1 and move the mouse to select the region; > 2. Without releasing mouse-1, click mouse-3 to pop up the context menu; > 3. Release mouse-1 on the menu item "Cut", thus deleting the region. > > This allows selecting and deleting the region with just 2 mouse clicks. > The same works almost perfectly in Emacs with a single snag: > while dragging mouse-1, visually it looks like the region is selected, > but really the region don't get selected until mouse-1 is released > and calls 'mouse-set-region' bound to [drag-mouse-1]. > > But while using the above gesture, [drag-mouse-1] (mouse-set-region) is > never invoked: > > ;; mouse-drag-region > ;; anonymous-command > ;; anonymous-command > ;; anonymous-command > ;; kill-region > > I have no idea how this could be fixed. Why do you need mouse-set-region to be invoked? And if you do, why cannot the command bound to down-mouse-3 do that?