From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: delete-selection-mode Date: Thu, 18 Mar 2010 16:02:07 +0100 Organization: Organization?!? Message-ID: <8739zxzn9s.fsf@lola.goethe.zz> References: <87ocitw2dl.fsf@stupidchicken.com> <201003130001.o2D01FFQ003489@godzilla.ics.uci.edu> <87vdd1yqe4.fsf@stupidchicken.com> <87eijjzrkd.fsf_-_@mail.jurta.org> <20100317143519.GB4381@muc.de> <87vdcui6oh.fsf@uwakimon.sk.tsukuba.ac.jp> <20100318101223.GB2704@muc.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1268925552 5717 80.91.229.12 (18 Mar 2010 15:19:12 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 18 Mar 2010 15:19:12 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Mar 18 16:19:07 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 1NsHV4-0004eG-MJ for ged-emacs-devel@m.gmane.org; Thu, 18 Mar 2010 16:19:07 +0100 Original-Received: from localhost ([127.0.0.1]:58059 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NsHHg-000580-QB for ged-emacs-devel@m.gmane.org; Thu, 18 Mar 2010 11:05:16 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NsHF4-0002v3-JX for emacs-devel@gnu.org; Thu, 18 Mar 2010 11:02:34 -0400 Original-Received: from [140.186.70.92] (port=44684 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NsHF2-0002tV-Pc for emacs-devel@gnu.org; Thu, 18 Mar 2010 11:02:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NsHF0-00014H-Vv for emacs-devel@gnu.org; Thu, 18 Mar 2010 11:02:32 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:47695) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NsHF0-000140-KN for emacs-devel@gnu.org; Thu, 18 Mar 2010 11:02:30 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1NsHEs-0001x9-1b for emacs-devel@gnu.org; Thu, 18 Mar 2010 16:02:22 +0100 Original-Received: from p5b2c2262.dip.t-dialin.net ([91.44.34.98]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 18 Mar 2010 16:02:22 +0100 Original-Received: from dak by p5b2c2262.dip.t-dialin.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 18 Mar 2010 16:02:22 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 62 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: p5b2c2262.dip.t-dialin.net X-Face: 2FEFf>]>q>2iw=B6, xrUubRI>pR&Ml9=ao@P@i)L:\urd*t9M~y1^:+Y]'C0~{mAl`oQuAl \!3KEIp?*w`|bL5qr,H)LFO6Q=qx~iH4DN; i"; /yuIsqbLLCh/!U#X[S~(5eZ41to5f%E@'ELIi$t^ Vc\LWP@J5p^rst0+('>Er0=^1{]M9!p?&:\z]|;&=NP3AhB!B_bi^]Pfkw User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.92 (gnu/linux) Cancel-Lock: sha1:okxWA0NCXftq1I2gGE5tqUamPHs= 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:122171 Archived-At: Stefan Monnier writes: >> I also think that the distinction between kill-region and >> delete-region would be more confusing than helpful to a beginner. > > Indeed. > >> OK. The penalty for that convenience is having your region explode and >> disappear when you accidentally type a self-insert character (or arrow >> key). This might happen if you hit the x before the M in M-x, or >> something like that. Or, you might regionify a defun with C-M-h for some >> reason and accidentally lose it. > > These are very valid concerns, and even if we don't enable delsel by > default, I think we should try and come up with ways to reduce the > pain. E.g. making sure that you can revert the damage with `undo' > (e.g. the delsel behavior should only affect buffer where undo is > enabled; and maybe undoing a self-insert which also deleted the region > might undo the self-insert, undo the delete-region *and* re-activate > the region). I already mentioned the pattern C-y C-x C-x for inserting/modifying at the top of a yanked insertion. > delsel only applies to active regions, so it shouldn't affect users > when t-m-m is disabled. We have temporary transient mark mode, which is also turned on with mouse selections. > Many things have fallen into this category in the past: > - X11 (need to use -nw). > - menu-bar > - tool-bar > - scroll-bar > - fringes > - blinking-cursor > - t-m-m > - font-lock > - mouse-1-click-follows-link > - "prettification" of info buffers None of those destroy your text. >> Is there any evidence that delete-select-mode is instrinsically a >> good thing, disregarding the fact that it has become common? > > For DEL, I think it is very natural, yes. For self-insert, I'm not > really sure: I haven't been annoyed by it, but I haven't used it much > either. I think it is somewhat natural after mouse selections: after all, there would be little point in mouse-selecting a region only to insert at one end of the region. There is the possible use of double/triple-clicking in order to _move_ fast to beginning of word/line, but I don't think that people make use of that much. So something which extends mouse-region-delete-keys' functionality to self-insert would not bother me. -- David Kastrup