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: Mon, 13 Nov 2017 13:56:07 -0800 (PST) Message-ID: References: <0ad9af94-11cc-4dae-841f-f2918342d1bf@default> <7f5a496c-1ea7-4f0c-a2f5-4e5307d7ee82@default> 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 1510610187 11920 195.159.176.226 (13 Nov 2017 21:56:27 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 13 Nov 2017 21:56:27 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 13 22:56:24 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 1eEMiM-0002mE-06 for ged-emacs-devel@m.gmane.org; Mon, 13 Nov 2017 22:56:22 +0100 Original-Received: from localhost ([::1]:56487 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eEMiS-00039H-Up for ged-emacs-devel@m.gmane.org; Mon, 13 Nov 2017 16:56:28 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40627) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eEMiJ-000391-LD for emacs-devel@gnu.org; Mon, 13 Nov 2017 16:56:20 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eEMiF-0003P9-NH for emacs-devel@gnu.org; Mon, 13 Nov 2017 16:56:19 -0500 Original-Received: from userp1040.oracle.com ([156.151.31.81]:34831) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eEMiF-0003Oz-Ey for emacs-devel@gnu.org; Mon, 13 Nov 2017 16:56:15 -0500 Original-Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id vADLuDvQ029337 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 13 Nov 2017 21:56:13 GMT Original-Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id vADLuBDq013160 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 13 Nov 2017 21:56:13 GMT Original-Received: from abhmp0015.oracle.com (abhmp0015.oracle.com [141.146.116.21]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id vADLu9k1010416; Mon, 13 Nov 2017 21:56:11 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: 156.151.31.81 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:220161 Archived-At: > > AFAICT, it's the only way, with your approach, to see > > the region you will act on get highlighted. Are you > > relegating your approach to menus that don't have items > > that act on the region? >=20 > My suggestion is for a context menu. I.e. a menu of things to apply > locally. Nothing specifically to do with the region. The region is but > one particular kind of "local" thing (and the down-mouse-3 event is not > necessarily placed near the region). I don't expect that the region > would/will be the main use of this functionality. I don't think acting on the region should be the _only_ use of a mouse-3 contextual menu, by any means. That's why mouse3.el, by default, gives you a non-region-oriented menu if the region is not active and non-empty. And you can use any menus whatsoever - the menu to use in any given context need not have anything to do with the region. If option `mouse3-popup-include-global-menus-flag' is non-nil, which it is by default, the mouse-3 menu starts with the major-mode menu (or the `Menu Bar' menus if the menu-bar is not visible). And that comes first in the mouse-3 menu. So clearly there is nothing that requires the menus to be related to the region. But the general use of mouse-3 in Emacs is to act on the region (extend, restrict, cut). It makes sense, I think, to at least provide for acting on the active region, and be able to see it highlighted before doing so. With mouse3.el, the menu that pops up when the region is active is titled `Region', to point out that the current context is one where the region is active. Menu items that make sense when the region is active are in general natural candidates for that context. When the region is empty or inactive, the menu title is `No Region'. But it is trivial to make these menu titles customizable or to have only one mouse-3 menu in any given context, regardless of whether the region is active.