From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Gabriel TEIXEIRA Newsgroups: gmane.emacs.help Subject: Re: Text selection can't be erased by pressing delete Date: Fri, 20 Aug 2010 19:35:41 +0200 Message-ID: <4C6EBCED.5070302@sdesigns.eu> References: <4C6E7059.5040805@sdesigns.eu> <20100820164238.GA3146@dementia.proulx.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1282326824 23925 80.91.229.12 (20 Aug 2010 17:53:44 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 20 Aug 2010 17:53:44 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Aug 20 19:53:43 2010 Return-path: Envelope-to: geh-help-gnu-emacs@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 1OmVmf-00072O-TM for geh-help-gnu-emacs@m.gmane.org; Fri, 20 Aug 2010 19:53:42 +0200 Original-Received: from localhost ([127.0.0.1]:38229 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OmVmf-00074e-CH for geh-help-gnu-emacs@m.gmane.org; Fri, 20 Aug 2010 13:53:41 -0400 Original-Received: from [140.186.70.92] (port=51995 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OmVm8-00073Y-0m for help-gnu-emacs@gnu.org; Fri, 20 Aug 2010 13:53:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OmVm6-0001ag-GN for help-gnu-emacs@gnu.org; Fri, 20 Aug 2010 13:53:07 -0400 Original-Received: from a.mx.sdesigns.eu ([78.31.43.6]:29172) by eggs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1OmVlw-0001YM-B8 for help-gnu-emacs@gnu.org; Fri, 20 Aug 2010 13:53:06 -0400 Original-Received: from [172.27.0.213] (kobe.france.sdesigns.com [172.27.0.213]) by mailhost.france.sdesigns.com (Postfix) with ESMTP id 8DDED164074 for ; Fri, 20 Aug 2010 19:35:41 +0200 (CEST) User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.11) Gecko/20100713 Thunderbird/3.0.6 In-Reply-To: <20100820164238.GA3146@dementia.proulx.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:74752 Archived-At: On 20/08/2010 18:42, Bob Proulx wrote: > Gabriel TEIXEIRA wrote: > >> I've been working with three simultaneous emacs windows, each one >> containing a diferent project, and I noticed that two of those three are >> presenting a weird behaviour. >> > On what system are you running emacs? Is this GNU/Unix, Cygwin, MSYS, > other? Running in a terminal window, or under a X11, or other native > graphics? > > It is under Ubuntu Linux 10.04 x64 in the graphics mode. >> When I select a text in those windows (like by pushing Shift and >> then the arrow keys), and then I push the key Delete, I expect that >> the selected/highlighted text be erased, but instead, it erases a >> single character to the left of the cursor (like would happen >> without the selection) and the selection disappears (although the >> same operation works with Backspace or Shift+Delete normally). It >> seems that the Delete key is not anymore aware of the text >> selection. >> > That would be the "normal" traditional behavior of Emacs on Unix > machines for all of time prior to the recent introduction of Microsoft > key bindings. > > Which I think is a good behaviour since the delete key is just above the arrow keys in my keyboard while the backspace is a little further. Since I do selections using Shift + arrows, the delete lies just within the range of my middle finger, while the backspace would need to elevate the entire hand up to there, so I prefer use the delete. Besides the fact that I can just select the text and overwrite it directly. >> It is even more weird the fact that this doesn't happen with the >> window that I opened the last and the other windows that I opened >> after to check the behaviour. I seems that emacs "wears" after some >> time opened. >> > That does seem strange that it would change behavior depending upon > whether you have launched subsequent emacs processes. > > As I told already, maybe I mistyped something that led to this behaviour. Those instances are opened for weeks and the behaviour appeared after some days. I would like to know how to resolve this without doing the Microsoft solution (restarting emacs), which works, but lose all the layout of windows and the undo history. >> Anyone have any idea of what's this? Is this a bug or I typed >> accidentaly any command that triggers this behaviour? >> > I do not use CUA mode but the behavior makes me wonder if something is > causing it to be enabled and then disabled somehow. > > http://www.emacswiki.org/CuaMode > > What is the behavior when using emacs without customizations? > > emacs -q > > It behaves in the "normal" mode, no deletion with delete > And without any initialization? > > emacs -Q > > The same, 'course. > Thinking that there must be something in the initialization that is > behaving undesirably. > More likely to be any crazy (or lazy) finger of mine, but I leave the hypotesys of "time wear", like a bug caused by any memory leak, overflowed counter or command that is disabling the mode unexpectedly (which I think is very unlikely). > Bob > > Thanks for the advice about the cua-mode. I gave a read to the page and when I did M-x cua-mode, it got back to my favourite mode! Now I must figure out which command sequence is disabling the cua-mode in order that I don't do this anymore. I think that ad infinitum I will stop doing those mistakes. I noticed that emacs commands are easy to mistake one for another while typing, like, in an AZERTY kb, the C-x (one of the most used) for the C-w (after I deleted 100 lines of c code and saved the file unaware of that. By luck, I had a copy in the CVS). Gabriel Teixeira