From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: position on changing defaults? Date: Sun, 09 Mar 2008 00:38:02 +0100 Message-ID: <87iqzw3hyd.fsf@kfs-lx.rd.rdm> References: <200803050637.m256bXL3008361@sallyv1.ics.uci.edu> <87hcfkdhqk.fsf@stupidchicken.com> <87pru8enjx.fsf@kfs-lx.rd.rdm> <87wsod2f2i.fsf@kfs-lx.rd.rdm> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1205019502 20573 80.91.229.12 (8 Mar 2008 23:38:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 8 Mar 2008 23:38:22 +0000 (UTC) Cc: Chong Yidong , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Mar 09 00:38:49 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JY8cp-000262-0n for ged-emacs-devel@m.gmane.org; Sun, 09 Mar 2008 00:38:47 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JY8cH-0000zG-9R for ged-emacs-devel@m.gmane.org; Sat, 08 Mar 2008 18:38:13 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JY8cC-0000yW-7y for emacs-devel@gnu.org; Sat, 08 Mar 2008 18:38:08 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JY8cA-0000yG-Dq for emacs-devel@gnu.org; Sat, 08 Mar 2008 18:38:06 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JY8cA-0000yB-8F for emacs-devel@gnu.org; Sat, 08 Mar 2008 18:38:06 -0500 Original-Received: from mail-relay.sonofon.dk ([212.88.64.25]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1JY8c9-0005wu-N9 for emacs-devel@gnu.org; Sat, 08 Mar 2008 18:38:06 -0500 Original-Received: (qmail 52702 invoked from network); 8 Mar 2008 23:38:03 -0000 Original-Received: from unknown (HELO kfs-lx.rd.rdm.cua.dk) (213.83.150.21) by 0 with SMTP; 8 Mar 2008 23:38:03 -0000 In-Reply-To: (Stefan Monnier's message of "Sat\, 08 Mar 2008 15\:38\:42 -0500") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.91 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: FreeBSD 4.6-4.9 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:91802 Archived-At: Stefan Monnier writes: >>> should be allowed to have 0-width). >> Why? > > Because that's how the region behaves and that's how Emacs rectangles > behave, so it's more consistent. Well, I've never had a use for them in practice - and one of the features of CUA rectangles is that the cursor is INSIDE one of the rectangle corners -- namely the corner which you expand by moving the cursor. Visually, this is much more pleasing than having the cursor sometimes inside, sometimes outside the rectangle. Also, with CUA-rectangles, the cursor can be at any of the four corners of the rectangle. So having zero size rectangle breaks this - which is the main reason I didn't insist on having them. Finally, CUA-rectangles are not limited by arbitrary line endings; you can expand a rectangle beyond the end of the current line. For example, with standard rectangles, how can you mark the text marked with X'es in the following sample: ............... ........XXXXX.... ........XXX ........XXXXX.. ........X ............ ? With CUA rectangles, you simply place the cursor at the top-left X, and hit C-RET, down x 4, right x 4. Try it! So *I* don't want rectangles to work just like the region - I want the rectangles to work better than that - also in the presense of tabs in the middle of lines! >>> Also I'm not convinced by the special M-foo bindings >> Some or all of them? > > All of them. > >> What's the alternative? > > What do you mean? I've never used any of them, yet managed to edit my > texts just fine ;-) > > Basically, I want rectangle regions to behave pretty much *exactly* like > normal regions (the only difference is that it sets a var > `region-is-rectangle' and for that reason it is displayed differently) > and then some commands (like C-w ...) behave differently depending on > whether the region was rectangle or not, and other commands only work > with one of the two kinds of regions. I'm _definitely_ in favor of modifying basic commands to behave correctly/sensibly if "rectangle-active-p". BTW, shouldn't a command like upcase-region be merged into upcase-word so that marking the region (transient-mark-mode active) so that M-u will upcase the region instead of the word following the region... >> The self-insert-char feature inserts OUTSIDE the rectangle, so >> I don' see how it compares to C-x r t? > > If the rectangle has 0-width, C-x r t also inserts "outside". Ok, but you don't an iota of visible clue as to where the rectangle is. And transient-mark-mode is damn ugly as an indicator for standard rectangles. > >> E.g. to put ( ) around all lines of a rectangle, just mark >> the rectangle (top-down), and enter ) RET ( . Can you do that >> faster with C-x r t ? > > No. But then, I never put (...) around all lines of a rectangle. I don't do that often either, but take it as an illustration of the principle of inserting on the "active" side of the rectangle. And moving the active corner with RET. >> BTW, M-s is equivalent to C-x r t (I believe). > > Except that it applies to one more column, so it can't be used as a form > of insert-rectangle, contrary to C-x r t. > ... but restricting it to self-insert-char is problematic. Just use M-o M-s for that ... It's still shorter than C-x r t :-) -- Kim F. Storm http://www.cua.dk