From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.devel Subject: RE: poplife-mode Date: Sun, 12 Nov 2017 19:40:58 -0800 (PST) Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1510544501 1355 195.159.176.226 (13 Nov 2017 03:41:41 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 13 Nov 2017 03:41:41 +0000 (UTC) To: Stefan Monnier , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 13 04:41:37 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eE5cu-00007R-B9 for ged-emacs-devel@m.gmane.org; Mon, 13 Nov 2017 04:41:36 +0100 Original-Received: from localhost ([::1]:52296 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eE5d1-0005H1-Jo for ged-emacs-devel@m.gmane.org; Sun, 12 Nov 2017 22:41:43 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38537) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eE5cS-0005Gv-8f for emacs-devel@gnu.org; Sun, 12 Nov 2017 22:41:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eE5cN-0002fJ-Bx for emacs-devel@gnu.org; Sun, 12 Nov 2017 22:41:08 -0500 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:34394) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eE5cN-0002ep-5D for emacs-devel@gnu.org; Sun, 12 Nov 2017 22:41:03 -0500 Original-Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id vAD3f0co018782 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 13 Nov 2017 03:41:01 GMT Original-Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id vAD3f0cq014514 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 13 Nov 2017 03:41:00 GMT Original-Received: from abhmp0014.oracle.com (abhmp0014.oracle.com [141.146.116.20]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id vAD3f0aI009860; Mon, 13 Nov 2017 03:41:00 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4600.0 (x86)] X-Source-IP: userv0022.oracle.com [156.151.31.74] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] [fuzzy] X-Received-From: 141.146.126.69 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:220129 Archived-At: > > I just read up on how Drew's library `mouse3' solves the problem. If > > I understood it right, it redefines mouse-save-then-kill (mouse-3's > > normal binding) to respond differently to either a double-click of > > mouse-3 or two single-clicks of mouse-3 in the same spot. A > > double-click kills the region as it usually does, whereas two > > single-clicks pop up a contextual menu with menu items based on either > > the "thing at point" (if no region is selected) or the selected > > region. This also seems like o good solution. >=20 > FWIW, I think a better UI is to pop a menu for a "long press". ^^^^^^^^^^^ Why do you think so? > I.e. bind it to down-mouse-3 but wait a little and if there's not been > any "mouse-up" event with 1s or so, then pop up the contextual menu. The active region is not visible as such until `mouse-3' is released (the up event). So even if this could be made to provide a menu for acting on the region, the region would not be visible. A user could try to guess where its other end is, but why? The `mouse3.el' code intentionally provides for two menus: * One for actions on the active region, or actions that take it into account in some way. * One for other actions, unrelated to the region. This includes general actions and actions related to the click position - for example, action on a thing-at-point.