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: delete-selection-mode (was: Put scroll-bar on right by defaultonUNIX.) Date: Thu, 18 Mar 2010 14:54:29 -0700 Message-ID: References: <20100318101223.GB2704@muc.de><400FB8EA6FB8499AB34297A77E9DCB49@us.oracle.com> <20100318185435.GB1522@muc.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1268949514 3133 80.91.229.12 (18 Mar 2010 21:58:34 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 18 Mar 2010 21:58:34 +0000 (UTC) Cc: 'Juri Linkov' , "'Stephen J. Turnbull'" , 'Dan Nicolaescu' , 'Chong Yidong' , emacs-devel@gnu.org To: "'Alan Mackenzie'" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Mar 18 22:58:28 2010 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.69) (envelope-from ) id 1NsNjM-00079L-BL for ged-emacs-devel@m.gmane.org; Thu, 18 Mar 2010 22:58:16 +0100 Original-Received: from localhost ([127.0.0.1]:33709 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NsNjL-00013Z-LC for ged-emacs-devel@m.gmane.org; Thu, 18 Mar 2010 17:58:15 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NsNhc-0007el-5U for emacs-devel@gnu.org; Thu, 18 Mar 2010 17:56:28 -0400 Original-Received: from [140.186.70.92] (port=57240 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NsNhY-0007Zr-OH for emacs-devel@gnu.org; Thu, 18 Mar 2010 17:56:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NsNhW-0003a3-7k for emacs-devel@gnu.org; Thu, 18 Mar 2010 17:56:24 -0400 Original-Received: from rcsinet11.oracle.com ([148.87.113.123]:41792) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NsNhV-0003Zz-Tc for emacs-devel@gnu.org; Thu, 18 Mar 2010 17:56:22 -0400 Original-Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by rcsinet11.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id o2ILuJ8p018020 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 18 Mar 2010 21:56:20 GMT Original-Received: from acsmt354.oracle.com (acsmt354.oracle.com [141.146.40.154]) by acsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o2IIbxBc024273; Thu, 18 Mar 2010 21:56:18 GMT Original-Received: from abhmt010.oracle.com by acsmt355.oracle.com with ESMTP id 98191961268949269; Thu, 18 Mar 2010 14:54:29 -0700 Original-Received: from dradamslap1 (/130.35.178.194) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 18 Mar 2010 14:54:28 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <20100318185435.GB1522@muc.de> Thread-Index: AcrGy1koVgDBCB/bQ22cDH775NHNJAADOj0g X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-Source-IP: acsmt354.oracle.com [141.146.40.154] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090206.4BA2A182.01AA:SCFMA4539814,ss=1,fgs=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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:122229 Archived-At: > I am by no means unique - there will > certainly be lots of other people who suffer this feature likewise; > there're another one or two on this mailing list. The degree of > suffering d-s-m inflicts on us far outweighs the slight increase in > convenience for you. Just say no. Just turn it off. The discussion is about the _default_ behavior. Are you suggesting (a) = that *most* new users already suffer from this problem outside Emacs and (b) = they therefore need the Emacs default to be different from the outside = behavior? > > 99.999% (no, no proof; just a guess) of computer users out there use > > this "risky" behavior everyday, all day long, without exploding (and > > without Emac's powerful undo as a remedy). >=20 > We do not know, since these users are forced into it without having a > choice. Should we assume that they are exploding all over the place? Don't you = think this would be common knowledge by now? > > I submit that you see it as a problem simply because you=20 > > are not used to it. If you don't treat the active region as, > > well, active, then yes, you'll probably step on your own toes > > a few times. >=20 > I use Emacs because it is (or rather, was) a stateless editor, Huh? I don't think so. > as contrasted to vi. Yes, OK, it is less modal than vi. More precisely, it has modes all over = the place, instead of just 2 (or is it 3) modes. But Emacs is far from = stateless. > d-s-m adds in yet one more frivolous state-dependent behaviour. Why frivolous? >From the moment that you have t-m-mode, you have active regions, hence state-dependent behavior. In fact, from the moment that you have a mark = (!) you have state-dependent behavior. And long before that even... > Even with transient-mark-mode, you can still (currently) depend > on `self-insert-command' to just work. With d-s-m you can't. Sure you can. `self-insert-command' works fine with d-s-mode. You can = depend on things acting the way they are documented, in a consistent way. That way = is *different* from when d-s-mode is not enabled, but it is no less = dependable. > However, with simple transient-mark-mode, the problem doesn't exist. > Even a naive newbie would very quickly learn to hit the key = if > d-s-m weren't enabled. But a newbie wouldn't easily find out how to get the type-to-replace = behavior that s?he knows and loves - or even find out that it is possible. ;-) That's part of the problem we're trying to solve. No one has said that = newbies can't figure out how to delete selected text with just t-m-mode. The = point is that they don't know that they do not *have* to delete it first, to = replace it. They don't know that they can easily get the behavior they expect and = are used to. > > > It's "obviously" useful to be able to type extra text=20 > > > into an already "existing" region. The region is used > > > for many things other than just being deleted. >=20 > > Not a problem. It is only when the region is *active* that typing > > replaces it. Emacs gives you the best of both worlds: the=20 > > region can be active or inactive. >=20 > Stop playing with my words, please. I don't think I am. Your point was that in Emacs we use the region for = lots of things besides replacing its text, and in particular we sometimes want = to add additional text to the region text. Right? I agree. My reply points out that those uses of the region are still = available with d-s-mode - you need only deactivate the region. You're not losing = those other region features by using d-s-mode. That was my point. d-s-mode gives you a replace feature when the region is active, but it = doesn't prevent you from having an inactive region and using it in other ways. > > > we should never make something default in Emacs if it's likely to > > > provoke the angry reaction "How do I disable this *!=A3$ing = thing?". > > > delete-select-mode falls into this latter category. So does > > > transient-mark-mode. >=20 > > So we should remove t-m-mode as the default? >=20 > I would say yes, but that argument was settled some while ago. It > wouldn't be a good idea to reopen it. Agreed; we should not reopen it. (And it was a good change.) > > > Is there any evidence that delete-select-mode is=20 > > > instrinsically a good thing, disregarding the fact that > > > it has become common? >=20 > > Which do you do more often: (a) replace the text in the=20 > > region or (b) set mark, move somewhere else, and insert text? >=20 > How about addressing the question as put? Is there any evidence > whatsoever for the intrinsic goodness of d-s-m? I did answer it more directly in other posts (including text you cited = in your reply). But I'll repeat some of it: Using d-s-mode and not using it are about the same in terms of advantage/disadvantage, other things being equal: you need to hit an = extra key in each to be able to get the behavior that the other gives you = directly. With d-s-mode, the extra key is C-g (or C-u to prevent); without d-s-mode, = the extra key is C-w (or `delete-region'/DEL). From this point of view, it's a = toss-up. But other things are not equal, so it's not a toss-up: 1. The answer to my question above is #a, I think. People, including = Emacs users, more often replace the region text than they set mark, move, and = insert text. 2. Outside Emacs (Yes, Virginia, there is a world outside Emacs), type-to-replace is the rule for selections. Using the same rule as the = default in Emacs helps both old users (only one behavior) and, especially, new = users. > My personal answer to your question is (c) something else. I NEVER > "replace the text in the region". I frequently do (b), though I don't > think of it in those terms. I see. In that case, you would definitely want to disable d-s-mode, I = expect. But do you think that is typical of most Emacs users? Do you think it is = typical of non-Emacs users? FWIW, I frequently do #a (as should be obvious by now). One particular = use case is yanking the secondary selection to replace the region. (Yes, I bind a secondary-sel yank to a keyboard key. Dunno why vanilla Emacs relegates = it to the mouse.) > > With d-s-mode, the former is simple and the latter requires that you > > hit C-g (to deactivate the region). Without d-s-mode, the latter is > > simple and the former requires that you hit C-w (or = DEL/delete-region). >=20 > Yes. Hitting C-g repeatedly is a horrible experience - it=20 > makes a noise. I don't hear a thing. But I've silenced `ding'. > Hitting C-w is simple, hitting is obvious even to newbies, and > doesn't make any noise. If the bell is the problem, we could perhaps silence it for this use. And there's nothing magical about having chosen C-g as the key to = deactivate. I suppose another key could have been chosen. C-g was presumably picked by someone who either doesn't use it (!) or = doesn't care about the bell (or doesn't hear it). I didn't choose it. > > > One reason people might have come to Emacs is to escape=20 > > > the (to them) deity-awful key sequences they've been forced > > > to use up to now. >=20 > > That's an amazing statement, Alan. I've never heard anyone=20 > > claim that people come to Emacs because the key sequences > > they use elsewhere are too difficult. >=20 > Not "too difficult" but "deity-awful". You do understand that > distinction, I hope? No. What did you mean exactly? What is the salient characteristic of the = keys outside Emacs that you think people complain about? "God-awful" might = mean something concrete to you here, but it doesn't to me. Just which keys do = you think they complain about? What God-awful keys outside Emacs make them = come running inside? > > You've been inside Emacs so long that it's second nature to=20 > > you. Take a look outside the window, and imagine that you're > > out there looking in at Emacs. This is about setting the > > default value. In particular, it's about picking a default > > that is helpful to new users but is also useful in general. >=20 > I remember learning Emacs well. It was difficult and frustrating. > Slight variations on Emacs's default would not have changed that one > iota. Did you happen to learn Emacs after using computers all day long for = years, selecting and typing text to replace the selection? That's the case for = folks nowadays. This is not 1985 or even 1995. IIRC, you don't use a mouse (much, if at all), correct? And I'd guess = you didn't use a mouse before you came to Emacs either. That is so different from 99.999999% of the world nowadays that it makes you miss the point, I = fear, about _their_ learning Emacs. It's not about you, Alan. And it's not about me. I turned on d-s-mode = decades ago. I don't want the default change for myself. I want it for newbies, = in particular. I also think that some other oldbies will find it useful if they give it = a chance. I'm struck by the number of oldbies, including RMS, who've made = it clear in this very thread that they are not really familiar with d-s-mode. To = any who are open, I say, "Try it; you might like it."