From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: poplife-mode Date: Sun, 12 Nov 2017 11:46:50 -0500 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1510505230 6518 195.159.176.226 (12 Nov 2017 16:47:10 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 12 Nov 2017 16:47:10 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Nov 12 17:47:06 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 1eDvPV-0001Oo-2c for ged-emacs-devel@m.gmane.org; Sun, 12 Nov 2017 17:47:05 +0100 Original-Received: from localhost ([::1]:50608 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eDvPc-0002eg-JW for ged-emacs-devel@m.gmane.org; Sun, 12 Nov 2017 11:47:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49609) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eDvPW-0002du-GO for emacs-devel@gnu.org; Sun, 12 Nov 2017 11:47:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eDvPR-0002Q7-Lq for emacs-devel@gnu.org; Sun, 12 Nov 2017 11:47:06 -0500 Original-Received: from [195.159.176.226] (port=51476 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eDvPR-0002Oj-E9 for emacs-devel@gnu.org; Sun, 12 Nov 2017 11:47:01 -0500 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1eDvPF-0000bt-IE for emacs-devel@gnu.org; Sun, 12 Nov 2017 17:46:49 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 20 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:npTsYZaVc8Qh/ZCrYdrPnXr5074= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 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:220096 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. FWIW, I think a better UI is to pop a menu for a "long press". 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. I think this should actually be provided in core: down-mouse-3 should be bound to a command implementing this, with some standardized way to find a contextual menu (looking at local char-properties, and if not found, buffer-local variable). Stefan