help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Selection region and delete


From: jpkotta
Subject: Re: Selection region and delete
Date: Mon, 23 Jul 2012 13:05:55 -0700 (PDT)
User-agent: G2/1.0

On Monday, July 23, 2012 10:52:47 AM UTC-5, Juha Nieminen wrote:
> Barry Margolin <barmar@alum.mit.edu> wrote:
> > In article <jujefg$ti$1@speranza.aioe.org>,
> > Juha Nieminen <nospam@thanks.invalid> wrote:
> > 
> >> In older versions of emacs (when running from X) it used to be that 
> if
> >> you had selected a region and pressed the delete key, it removed the
> >> selected region. Now it just works as if no selection had been made
> >> (ie. it just removes the character at the cursor).
> >> 
> >> I'm too accustomed to the old behavior. How to restore it?
> > 
> > Customize the variable delete-selection-mode.
> 
> To what? And how?
> 
> There's already a "'(delete-selection-mode t)" under the
> "(custom-set-variables" in my .emacs, and it has no effect on this.
> 
> If I do a M-x describe-variable delete-selection-mode, it says
> "It is void as a variable."
> 
> If I add the line "(setq delete-selection-mode t)" to my .emacs,
> then describe-variable says "Its value is t", and if I use nil 
> instead
> of t it says it's nil. In none of these cases does the delete key
> function properly.
> 
> If I select the region with the mouse, then the delete key removes the
> region. If I select the region with the keyboard (using shift) and press
> shift-del, then it removes the region. However, if I select the region
> using the keyboard and press just delete, it doesn't work.
> 
> The last one of those cases happens to be the most usual way I use to
> delete a region, and it used to work.
> 
> I have been searching for information on this for over an hour, and I cannot
> find the solution. Even gnu's own documentation says that by setting
> delete-selection-mode to 1 it should work, but it doesn't.

<delete> is bound to delete-forward-char by default.  The help for that command 
mentions the delete-active-region variable.  It only has an effect if transient 
mark mode is enabled, and it sounds like you want it set to t (t is the 
default).  I couldn't see the difference between activating and deactivating 
delete-selection-mode either.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]