From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: Default Emacs keybindings (was: Re: Menu suggestion) Date: 26 Apr 2004 23:36:06 +0200 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1083015669 5570 80.91.224.253 (26 Apr 2004 21:41:09 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 26 Apr 2004 21:41:09 +0000 (UTC) Cc: Alan Mackenzie , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Mon Apr 26 23:40:57 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BIDqT-0008FL-00 for ; Mon, 26 Apr 2004 23:40:57 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BIDqS-0000MB-00 for ; Mon, 26 Apr 2004 23:40:57 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1BIDmo-0000Qh-4V for emacs-devel@quimby.gnus.org; Mon, 26 Apr 2004 17:37:10 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1BIDmL-0000QG-P4 for emacs-devel@gnu.org; Mon, 26 Apr 2004 17:36:41 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1BIDlp-0000I6-Dk for emacs-devel@gnu.org; Mon, 26 Apr 2004 17:36:40 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1BIDlp-0000Hy-7e for emacs-devel@gnu.org; Mon, 26 Apr 2004 17:36:09 -0400 Original-Received: from fencepost.gnu.org ([127.0.0.1] helo=lola.goethe.zz) by fencepost.gnu.org with esmtp (Exim 4.24) id 1BIDjt-0003vQ-Lq; Mon, 26 Apr 2004 17:34:10 -0400 Original-To: storm@cua.dk (Kim F. Storm) In-Reply-To: Original-Lines: 106 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:22194 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:22194 storm@cua.dk (Kim F. Storm) writes: > David Kastrup writes: > > > Me neither. If we have a need for a separate significantly different > > traditional mode, we lose most of our advantage. CUA-mode, IIRC, > > assigns special meaning to its characters only when there is an active > > selection. > > Right. > > > It is a compromise, of course. (I think we still are > > not there with regard to consistent selection behavior where we > > should be, but that's a somewhat different problem). > > Can you emphasize on what's missing... If transient-mark-mode is active, the region lights up at inconvenient times. Also there are moments when the region becomes inactive at inconvenient times, and having to reactivate it with C-x C-x based on the presence or absence of visual feedback is a nuisance. Temporary transient mark mode (C-SPC C-SPC or C-u C-x C-x) is a real life-saver, but the choice of keybindings for it clearly indicates that we are talking about a kludge for experts here instead of functionality intended for "ordinary" users, and I don't think that the tutorial even mentions it or its obtuse keybindings. Also when explicitly marking a region with the mouse (dragging mouse-1 or clicking mouse-3), temporary transient mark mode should be enabled: it is a safe bet that if the user marks out a _region_ for a command, that he wants the command to be applied to the region instead of just operating at point. _If_ the command has special behavior for active regions. For the ordinary user that likes marking out stuff with a mouse, this would go a lot towards making Emacs behave in a rational manner even without one of the half-dozen modes fiddling around with various amounts of transientness of the mark. > > If what I think I understood from the CUA descriptions is correct, > > no key sequences starting with C-c or C-x can be used with an > > active selection. For example, selecting an active region and > > using C-c C-e in AUCTeX (inserts environment around an active > > region, if there is one) would not work in CUA mode, ever. > > That's completely untrue!! > > There are actually three ways to enter C-c C-e even when the region is > active: > > 1) Type the C-c C-e very quickly (the quicklyness is configurable). > 2) Type C-c C-c quickly, followed by C-e > 3) Type S-C-c C-e > > 1 can be used for a sequence of control characters (i.e. where you hold > down CTRL during the whole sequence). > > 2 can be used generally, typing C-c C-c (or C-x C-x) very quickly is > trivial, Unless you happen to be handicapped and use something like sticky key modifiers to enter such sequences. > then you can complete the rest of the sequence at your own pace. > > 3 can be used generally, at any pace. So if I have a busy computer or a slow connection or accessibility problems or slow typing, the only way to reliably compile a document in AUCTeX (C-c C-c) is to use S-C-c C-c which is not the most friendly keysequence to type. Also, the meaning and/or naming of commands changes depending on whether the region is active or not. The total behavior is much more complex than I'd care to explain within the scope of a tutorial. It's a rather expensive compromise, I feel. > The current thread of emacs users who have never used CUA discuss > whether it is useful or not seems like a waste of time... Why? All will be concerned with changes. And CUA mode is an expert mode to enable "conventional" bindings. It changes the behavior of standard commands in undocumented ways with regard to Emacs' self-documentation commands (commands like C-h w, C-h k, menus and so on all talk about one set of keybindings that silently is replaced by something different when a region is active). Explaining Emacs' behavior with CUA-mode is quite more complicated than it is without it. So there is a non-zero cost associated with CUA-mode. One way to make it less costly would be to change all keybindings involving C-c and C-x. Another would be to offer a pseudo-CUA mode where instead s-c, s-x, s-v and s-z would be affected: most PC-keyboards nowadays offer a "Windows" key, not unrarely mapped to the Super modifier. As those bindings are on the "Apple" key on Macs, this would not be as wildly crazy as it may sound. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum