From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: position on changing defaults? Date: Sat, 08 Mar 2008 21:32:35 -0500 Message-ID: References: <200803050637.m256bXL3008361@sallyv1.ics.uci.edu> <87hcfkdhqk.fsf@stupidchicken.com> <87pru8enjx.fsf@kfs-lx.rd.rdm> <87wsod2f2i.fsf@kfs-lx.rd.rdm> <87iqzw3hyd.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 1205029971 12849 80.91.229.12 (9 Mar 2008 02:32:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 9 Mar 2008 02:32:51 +0000 (UTC) Cc: Chong Yidong , emacs-devel@gnu.org To: storm@cua.dk (Kim F. Storm) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Mar 09 03:33:18 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 1JYBLh-0000N7-NK for ged-emacs-devel@m.gmane.org; Sun, 09 Mar 2008 03:33:18 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JYBL9-0004tm-NL for ged-emacs-devel@m.gmane.org; Sat, 08 Mar 2008 21:32:43 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JYBL6-0004tZ-5e for emacs-devel@gnu.org; Sat, 08 Mar 2008 21:32:40 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JYBL4-0004tN-LA for emacs-devel@gnu.org; Sat, 08 Mar 2008 21:32:38 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JYBL4-0004tK-GM for emacs-devel@gnu.org; Sat, 08 Mar 2008 21:32:38 -0500 Original-Received: from ironport2-out.pppoe.ca ([206.248.154.182]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JYBL4-0001ge-79 for emacs-devel@gnu.org; Sat, 08 Mar 2008 21:32:38 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmgCALLa0kfO+J2CdGdsb2JhbACQfQEwmQeBBw X-IronPort-AV: E=Sophos;i="4.25,468,1199682000"; d="scan'208";a="15752719" Original-Received: from smtp.pppoe.ca ([65.39.196.238]) by ironport2-out.pppoe.ca with ESMTP; 08 Mar 2008 21:32:37 -0500 Original-Received: from pastel.home ([206.248.157.130]) by smtp.pppoe.ca (Internet Mail Server v1.0) with ESMTP id PFP68737; Sat, 08 Mar 2008 21:32:37 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id CC4717FD4; Sat, 8 Mar 2008 21:32:35 -0500 (EST) In-Reply-To: <87iqzw3hyd.fsf@kfs-lx.rd.rdm> (Kim F. Storm's message of "Sun, 09 Mar 2008 00:38:02 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. 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:91839 Archived-At: >>>> 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. > Visually, this is much more pleasing than having the cursor > sometimes inside, sometimes outside the rectangle. Doesn't strike me as something particularly important. > 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. I don't understand how that's different whether zero-width rectangles are allowed. > Finally, CUA-rectangles are not limited by arbitrary line endings; Again, I don't see how that relates to whether or not zero-width rectangles are allowed. > you can expand a rectangle beyond the end of the current line. Yes, I understand the problems posed by TABs and end of lines when faced with rectangles, and yes I think the way CUA handles it is perfectly fine. > 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! I meant conceptually. To the user they should mostly behave "just like a non-rectangular region". But of course, there are some necessary differences. > I'm _definitely_ in favor of modifying basic commands to behave > correctly/sensibly if "rectangle-active-p". I think we all agree on this. > 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... Sounds like a good idea to me. >>> 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. Now, that is a very good point. Supporting highlighting of zero-width rectangles would probably require special-cased code. E.g. we could add a vertical line with overlay after-strings, tho that would tend to shift the rest of the text. Experimentation would be needed. > And transient-mark-mode is damn ugly as an indicator for standard > rectangles. Yes, I live with it, but there's no doubt that it's not a feature. >>> 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. Yes, I understand, but I'm not convinced it deserves so much importance. These are operations that might better be served by packages like picture-mode. >>> 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 :-) The problem is not just a question of number of key presses. C-x r t is good because with a single command I get to do most of the operations I usually need to do: insert-rectangle (when the rectangle is empty), delete-rectangle (when the inserted string is empty), and of course replacement of each line of the rectangle with a given string. Now I understand that C-x r t works fine with CUA rectangles, but I'm just not sure that having "active-rectangle" be a minor mode with special bindings is the way I want to go. Stefan