From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.devel Subject: RE: Rectangular regions Date: Tue, 5 Nov 2013 11:31:54 -0800 (PST) Message-ID: <72064baf-42e4-4c66-bc65-12b6351d1c40@default> References: <87a9hq8h7p.fsf@bzg.ath.cx> <87ppql7iig.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1383679964 9082 80.91.229.3 (5 Nov 2013 19:32:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 5 Nov 2013 19:32:44 +0000 (UTC) Cc: Bastien , Eli Zaretskii , dancol@dancol.org, sdl.web@gmail.com, emacs-devel@gnu.org To: Stefan Monnier , jemarch@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 05 20:32:47 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VdmMo-000886-59 for ged-emacs-devel@m.gmane.org; Tue, 05 Nov 2013 20:32:46 +0100 Original-Received: from localhost ([::1]:58151 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VdmMn-0004YT-Om for ged-emacs-devel@m.gmane.org; Tue, 05 Nov 2013 14:32:45 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37814) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VdmMc-0004X0-B7 for emacs-devel@gnu.org; Tue, 05 Nov 2013 14:32:42 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VdmMT-0007hp-Jz for emacs-devel@gnu.org; Tue, 05 Nov 2013 14:32:34 -0500 Original-Received: from userp1040.oracle.com ([156.151.31.81]:37818) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VdmMB-0007b7-3V; Tue, 05 Nov 2013 14:32:07 -0500 Original-Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by userp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id rA5JVutv013693 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 5 Nov 2013 19:31:57 GMT Original-Received: from aserz7021.oracle.com (aserz7021.oracle.com [141.146.126.230]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id rA5JVtAi015675 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 5 Nov 2013 19:31:56 GMT Original-Received: from abhmt113.oracle.com (abhmt113.oracle.com [141.146.116.65]) by aserz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id rA5JVt15015670; Tue, 5 Nov 2013 19:31:55 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6680.5000 (x86)] X-Source-IP: acsinet21.oracle.com [141.146.126.237] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 156.151.31.81 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:164976 Archived-At: > A possible alternative would be to use a binding that's only active > when the region is highlighted. > > Not sure which key would be appropriate, but restricting this use to > the "active region case" opens up the possibility of choosing a key > that's in common use, tho not when the region is active. >=20 > A mnemonic key would be C-r, except that C-r already has a useful > meaning when the region is active. It's a good idea. It would be ideal if it could somehow be limited even more: not whenever the region is active, but whenever it is active and being used as a rectangle. Alas, that is presumably impossible (since it is this command that is deciding to treat the region as a rectangle). That's OK. But it means that whatever key is chosen should not be a key that one might want to use to act otherwise on the active region. In particular, it (again) should not be a simple repeatable key, as those are likely to be useful for acting incrementally on the region. And this applies even to future operations on the region when it is interpreted as a rectangle - some of those might need to be easily repeatable too. So `C-SPC' is (again) not a good choice for the key, even when the context is limited to the active region. Likewise, `C-r' (even aside from not being available because taken for Isearch). +1 for the general idea. But let's not waste an easily repeatable key for this. Future commands that operate on the region-as-rectangle would presumably know that the region is being interpreted as a rectangle. The keys for those commands, at least, could presumably be bound for just that context, i.e., not bound whenever the region is active, but only when the active region is being used as a rectangle.