From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sebastian Rose Newsgroups: gmane.emacs.devel Subject: Re: C-d deleting region considered harmful Date: Sat, 18 Sep 2010 22:22:10 +0200 Message-ID: <87ocbudcp9.fsf@gmx.de> References: <87eicrx1ls.fsf@catnip.gol.com> <83lj6zz9o0.fsf@gnu.org> <4C94ED16.8010100@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1284841356 23175 80.91.229.12 (18 Sep 2010 20:22:36 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 18 Sep 2010 20:22:36 +0000 (UTC) Cc: drew.adams@oracle.com, emacs-devel@gnu.org To: Christoph Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Sep 18 22:22:35 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 1Ox3vd-0002S2-Ld for ged-emacs-devel@m.gmane.org; Sat, 18 Sep 2010 22:22:34 +0200 Original-Received: from localhost ([127.0.0.1]:59877 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ox3vX-0002b6-Fm for ged-emacs-devel@m.gmane.org; Sat, 18 Sep 2010 16:22:27 -0400 Original-Received: from [140.186.70.92] (port=43790 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ox3vR-0002ab-0j for emacs-devel@gnu.org; Sat, 18 Sep 2010 16:22:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Ox3vP-0000WR-Mq for emacs-devel@gnu.org; Sat, 18 Sep 2010 16:22:20 -0400 Original-Received: from mailout-de.gmx.net ([213.165.64.22]:55894 helo=mail.gmx.net) by eggs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1Ox3vP-0000WL-Bq for emacs-devel@gnu.org; Sat, 18 Sep 2010 16:22:19 -0400 Original-Received: (qmail invoked by alias); 18 Sep 2010 20:22:15 -0000 Original-Received: from df01ppp166.eplus-online.de (EHLO beteigeuze.gmx.de) [212.23.104.166] by mail.gmx.net (mp066) with SMTP; 18 Sep 2010 22:22:15 +0200 X-Authenticated: #8529601 X-Provags-ID: V01U2FsdGVkX1+pBOUBAsupLJqCTEWT9llgbiXh4lw61EytbpCRGY v8oPSXAfDsJP5j In-Reply-To: <4C94ED16.8010100@gmail.com> (Christoph's message of "Sat, 18 Sep 2010 10:47:18 -0600") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-Y-GMX-Trusted: 0 X-detected-operating-system: by eggs.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:130454 Archived-At: Christoph writes: > On 9/18/2010 9:05 AM, Drew Adams wrote: > >> No. Both and C-d, whether mapped together or not, should do what they >> have always done in Emacs: delete the next char. Whether the region is active or >> not. > > As for C-d and its command delete-forward-char, the documentation states: > > To disable this, set `delete-active-region' to nil. > > Imho, the default behavior is more consistent than the old behavior. C-d > without an active region deletes the character, with an active region deletes > the region. Makes sense to me. Consistent with what??? The old behaviour was _clever_ ! Imagine you have created an active region. Once you have done that, you need to be really carefull how to proceed (slow down). If you now decide to keep the region, you cannot go on with the next natural editing command. Instead, you must deactivate the region first, or the text is gone (not for good, but see below). (extra key press, extra slot for remembering the region => slow down) In those oh soo good "normal" applications you want Emacs to be consistent with, any editing command will now replace the region. Wich is the course Emacs is going, obviously. C-d does this already and the rest will follow, since the newbies seem to tell Emacs what to do (to find new users... bad intention --- this will make Emacs more "normal", not better). Note, that deliting just one character is a simple editing command, just as adding one character. Any of these simple editing commands can delete a whole bunch of text in "normal" applications. You might be used to that behaviour because it's "normal", but I'm sure it caused you some headache from time to time :) In Emacs, if you decide to delete the region, it's just pressing a `w' instead of a `d' (or any other simple editing command). In neither case, the region will be lost --- in Emacs. Simple, isn't it? Now imagine, for some reason, you have deleted the region. A few minutes later you recognize, it was a mistake. Now, in "normal" apps, you press "UNDO" many many times, until you get your region back. You lose all the work done from deleting the region onwards until this point in time. This slows down editing again. This is stupid. This is anoying even. That's why we need to distinguish between commands that act on region (e.g. `C-w') and ALL other simple editing commands, including `C-d'. As most people here, I rarely use backspace or delete. They're awkward to type. But defining them differently is a surprise, true enough. This means the decision made was a mistake. Sebastian