Subject: Re: bug#18952: 24.4; delete weirdness in cua mode

From: Andy Grover <[email-masked]>
Date: Wed, 05 Nov 2014 22:41:37 -0800

On 11/05/2014 07:06 PM, Stefan Monnier wrote:
>> Sorry, just a noob Emacser here :-) But I didn't disable
>> transient-mark-mode, setting cua-mode via the dropdown menu appears to
>> disable it.
> 
> It doesn't for me.  Could you provide a *precise* recipe?
> 
> I tried:
> 
>     emacs -Q
>     Options => Use CUA keys (Cut/Paste with C-x/C-c/C-v)
>     S-right S-right right right backspace
> 
> and the backspace only deleted one char.  And M-: transient-mark-mode RET
> tells me it's still enabled.
> 

Ah! ok, I also have cua-highlight-region-shift-only t in my Customize
section, so I hit this without trying? But here's a way to repro,
starting from emacs -Q:

emacs -Q
Set Options => Use CUA keys (Cut/Paste with C-x/C-c/C-v)
Unset Options => Use CUA keys (Cut/Paste with C-x/C-c/C-v)
M-x set-variable cua-highlight-region-shift-only t
Set Options => Use CUA keys (Cut/Paste with C-x/C-c/C-v)
<open a file>
S-down S-down down down backspace

or alternatively, use a .emacs containing just:

(custom-set-variables
 '(cua-highlight-region-shift-only t)
 '(cua-mode t nil (cua-base)))

HTH -- Andy