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 15:38:42 -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> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1205008794 21901 80.91.229.12 (8 Mar 2008 20:39:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 8 Mar 2008 20:39:54 +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 Sat Mar 08 21:40:21 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 1JY5q3-0005YN-Gw for ged-emacs-devel@m.gmane.org; Sat, 08 Mar 2008 21:40:15 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JY5pV-0008Vr-JC for ged-emacs-devel@m.gmane.org; Sat, 08 Mar 2008 15:39:41 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JY5og-0007Vm-Fx for emacs-devel@gnu.org; Sat, 08 Mar 2008 15:38:50 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JY5oa-0007PU-S6 for emacs-devel@gnu.org; Sat, 08 Mar 2008 15:38:50 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JY5oa-0007Oy-Jb for emacs-devel@gnu.org; Sat, 08 Mar 2008 15:38:44 -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 1JY5oa-0008CP-9Z for emacs-devel@gnu.org; Sat, 08 Mar 2008 15:38:44 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArcCAJiH0kfO+J2CdGdsb2JhbACQfQEwmRuBBw X-IronPort-AV: E=Sophos;i="4.25,467,1199682000"; d="scan'208";a="15746513" Original-Received: from smtp.pppoe.ca ([65.39.196.238]) by ironport2-out.pppoe.ca with ESMTP; 08 Mar 2008 15:38:43 -0500 Original-Received: from pastel.home ([206.248.157.130]) by smtp.pppoe.ca (Internet Mail Server v1.0) with ESMTP id OXU30743; Sat, 08 Mar 2008 15:38:43 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id D91E57F60; Sat, 8 Mar 2008 15:38:42 -0500 (EST) In-Reply-To: <87wsod2f2i.fsf@kfs-lx.rd.rdm> (Kim F. Storm's message of "Sat, 08 Mar 2008 20:25:41 +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:91770 Archived-At: >>> It also gives you the rectangle highlighting (which I think most >>> users would agree is quite useful) combined with the ability to >>> use the normal region kill, copy and yank keys also for rectangles. >>> So there's no need to learn a different command set for rectangles! >> >> Actually, I think the rectangle support is good, although I'd like it to >> be a bit more like the normal region highlighting (e.g. same color, > That would be ok with me (as the default for a new `rectangle' face). >> C-g should deactivate it, > It does! If not, you've found a bug. Please tell me how to repeat it. Hmm... now it seems to work indeed. Good. I'll have to investigate some more to try and reproduce the problem. Oh... I see, I have C-g bound to sm-keyboard-quit which does: (defun sm-keyboard-quit () (interactive) (sm-special-frames-auto-iconify) (keyboard-quit)) I tried replacing the last call by (call-interactively 'keyboard-quit) but it didn't help. I think deactivate-mark should do the trick. >> 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. >> The C-g part is important: I found it difficult to figure out how to >> "exit" from the "rectangle-mode". >> 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. >> and the special treatment of self-insert-command. > I find it extremely useful - but of course, it could be an advanced option. >> Maybe it's just that I'm used to it, but I find C-x r t to work at >> least as well if not better (e.g. it's not limited to self-inserting >> keys). > 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". > 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. If someone needs such a feature, maybe we could add some kind of escape mechanism so C-x r t could accept "(\0)" kind of like a replace-regexp. Not sure it's worth the trouble, tho. > 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. About half of my uses of C-x r t is as a form of insert-rectangle. I understand that you can use the self-insert-char feature to get the same effect and it's a neat idea, but restricting it to self-insert-char is problematic. Stefan