all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#18952: 24.4; delete weirdness in cua mode
@ 2014-11-05  7:11 Andy Grover
  2014-11-05 16:03 ` Eli Zaretskii
  0 siblings, 1 reply; 9+ messages in thread
From: Andy Grover @ 2014-11-05  7:11 UTC (permalink / raw)
  To: 18952


to reproduce:
1) hold down up or down-arrow while editing init.el then release
2) hit backspace

expected behavior: one character deleted

existing behavior: seemingly-random huge amount of stuff in the buffer
deleted

Thanks -- Andy



In GNU Emacs 24.4.1 (x86_64-redhat-linux-gnu, GTK+ Version 3.14.3)
 of 2014-10-27 on buildhw-05.phx2.fedoraproject.org
Windowing system distributor `Fedora Project', version 11.0.11601000
Configured using:
 `configure --build=x86_64-redhat-linux-gnu
 --host=x86_64-redhat-linux-gnu --program-prefix=
 --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr
 --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc
 --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64
 --libexecdir=/usr/libexec --localstatedir=/var
 --sharedstatedir=/var/lib --mandir=/usr/share/man
 --infodir=/usr/share/info --with-dbus --with-gif --with-jpeg --with-png
 --with-rsvg --with-tiff --with-xft --with-xpm --with-x-toolkit=gtk3
 --with-gpm=no build_alias=x86_64-redhat-linux-gnu
 host_alias=x86_64-redhat-linux-gnu 'CFLAGS=-DMAIL_USE_LOCKF -O2 -g
 -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2
 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4
 -grecord-gcc-switches -m64 -mtune=generic' 'LDFLAGS=-Wl,-z,relro ''

Important settings:
  value of $LANG: en_US.utf8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Emacs-Lisp

Minor modes in effect:
  superword-mode: t
  delete-selection-mode: t
  show-paren-mode: t
  desktop-save-mode: t
  cua-mode: t
  tooltip-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  global-prettify-symbols-mode: t
  prettify-symbols-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  size-indication-mode: t
  column-number-mode: t
  line-number-mode: t

Recent input:
C-s <up> <prior> <prior> <prior> <prior> <prior> <prior>
<next> <next> <down> <down> <down> <down> <down> <down>
<down> <down> <S-down> <S-down> <S-down> <S-down> <S-down>
<S-down> <S-down> <S-down> <S-down> <S-down> <S-down>
<S-down> C-c <timeout> <up> <up> <up> <up> <up> <right>
<up> <up> <right> <right> <right> <right> <right> <right>
<right> <right> <right> <right> <right> <right> <right>
<backspace> C-z <backspace> C-z <up> <up> <up> <up>
<up> <up> <down> <down> <down> <down> <down> <down>
<down> <down> <backspace> C-z C-SPC <up> <up> <right>
<right> <right> <right> <right> <backspace> C-z C-SPC
<backspace> C-z <up> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <up> <up> <up> <up> <up>
<up> <up> <up> <up> <up> <up> <up> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <up> <up>
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up>
<up> <up> <backspace> C-z <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <up> <up>
<up> <up> <up> <up> <up> <up> <up> <up> <up> <down-mouse-4>
<mouse-4> <double-down-mouse-4> <double-mouse-4> <triple-down-mouse-4>
<triple-mouse-4> <triple-down-mouse-4> <triple-mouse-4>
<triple-down-mouse-4> <triple-mouse-4> <triple-down-mouse-4>
<triple-mouse-4> <triple-down-mouse-4> <triple-mouse-4>
<down-mouse-4> <mouse-4> <double-down-mouse-4> <double-mouse-4>
<triple-down-mouse-4> <triple-mouse-4> <triple-down-mouse-4>
<triple-mouse-4> <triple-down-mouse-4> <triple-mouse-4>
<triple-down-mouse-4> <triple-mouse-4> <triple-down-mouse-4>
<triple-mouse-4> <triple-down-mouse-4> <triple-mouse-4>
<triple-down-mouse-4> <triple-mouse-4> <triple-down-mouse-4>
<triple-mouse-4> <triple-down-mouse-4> <triple-mouse-4>
<down-mouse-5> <mouse-5> <double-down-mouse-5> <double-mouse-5>
<triple-down-mouse-5> <triple-mouse-5> <triple-down-mouse-5>
<triple-mouse-5> <triple-down-mouse-5> <triple-mouse-5>
<triple-down-mouse-5> <triple-mouse-5> <triple-down-mouse-5>
<triple-mouse-5> <down-mouse-5> <mouse-5> <double-down-mouse-5>
<double-mouse-5> <triple-down-mouse-5> <triple-mouse-5>
<triple-down-mouse-5> <triple-mouse-5> <triple-down-mouse-5>
<triple-mouse-5> <down-mouse-4> <mouse-4> <double-down-mouse-4>
<double-mouse-4> <triple-down-mouse-4> <triple-mouse-4>
<triple-down-mouse-4> <triple-mouse-4> <triple-down-mouse-4>
<triple-mouse-4> <triple-down-mouse-4> <triple-mouse-4>
<triple-down-mouse-4> <triple-mouse-4> <triple-down-mouse-4>
<triple-mouse-4> <triple-down-mouse-4> <triple-mouse-4>
<triple-down-mouse-4> <triple-mouse-4> <triple-down-mouse-4>
<triple-mouse-4> <triple-down-mouse-4> <triple-mouse-4>
<triple-down-mouse-4> <triple-mouse-4> <triple-down-mouse-4>
<triple-mouse-4> <triple-down-mouse-4> <triple-mouse-4>
<triple-down-mouse-4> <triple-mouse-4> <triple-down-mouse-4>
<triple-mouse-4> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <menu-bar> <help-menu> <emacs-known-problems>
M-w <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <menu-bar> <help-menu>
<send-emacs-bug-report>

Recent messages:
cua-scroll-down: Beginning of buffer
Mark set
Undo! [3 times]
Mark cleared
Undo!
Mark cleared
Undo! [2 times]
byte-code: Beginning of buffer [20 times]
Note: file is write protected
View mode: type C-h for help, h for commands, q to quit.

Load-path shadows:
/home/agrover/.emacs.d/elpa/flymake-0.4.16/flymake hides
/usr/share/emacs/24.4/lisp/progmodes/flymake

Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util
help-fns mail-prsvr mail-utils goto-addr thingatpt noutline outline
easy-mmode view python json comint ring ansi-color vc-git flycheck
find-func help-mode rx pcase subr-x dash cc-styles cc-align cc-engine
cc-vars cc-defs midnight ido swbuff superword subword flymake-autoloads
info easymenu pkg-info-autoloads epl-autoloads rust-mode-autoloads
cm-mode-autoloads package epg-config saveplace delsel paren desktop
frameset cl-loaddefs cl-lib cua-base cus-start cus-load time-date
tooltip electric uniquify ediff-hook vc-hooks lisp-float-type mwheel
x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list
newcomment lisp-mode prog-mode register page menu-bar rfn-eshadow timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai
tai-viet lao korean japanese hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help
simple abbrev minibuffer nadvice loaddefs button faces cus-face macroexp
files text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
dbusbind gfilenotify dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)

Memory information:
((conses 16 146580 5509)
 (symbols 48 25089 0)
 (miscs 40 60 154)
 (strings 32 31826 5250)
 (string-bytes 1 941333)
 (vectors 16 16342)
 (vector-slots 8 451999 3474)
 (floats 8 99 375)
 (intervals 56 802 4)
 (buffers 960 14)
 (heap 1024 49667 1054))





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#18952: 24.4; delete weirdness in cua mode
  2014-11-05  7:11 bug#18952: 24.4; delete weirdness in cua mode Andy Grover
@ 2014-11-05 16:03 ` Eli Zaretskii
  2014-11-05 19:02   ` Andy Grover
  0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2014-11-05 16:03 UTC (permalink / raw)
  To: Andy Grover; +Cc: 18952

> Date: Tue, 04 Nov 2014 23:11:41 -0800
> From: Andy Grover <andy@groveronline.com>
> 
> 
> to reproduce:
> 1) hold down up or down-arrow while editing init.el then release
> 2) hit backspace
> 
> expected behavior: one character deleted
> 
> existing behavior: seemingly-random huge amount of stuff in the buffer
> deleted

Are you sure you didn't type S-<down> several times?  This:

> Recent input:
> C-s <up> <prior> <prior> <prior> <prior> <prior> <prior>
> <next> <next> <down> <down> <down> <down> <down> <down>
> <down> <down> <S-down> <S-down> <S-down> <S-down> <S-down>
> <S-down> <S-down> <S-down> <S-down> <S-down> <S-down>
> <S-down> C-c <timeout> <up> <up> <up> <up> <up> <right>
> <up> <up> <right> <right> <right> <right> <right> <right>
> <right> <right> <right> <right> <right> <right> <right>
> <backspace> C-z <backspace> C-z <up> <up> <up> <up>

says you did.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#18952: 24.4; delete weirdness in cua mode
  2014-11-05 16:03 ` Eli Zaretskii
@ 2014-11-05 19:02   ` Andy Grover
  2014-11-05 20:16     ` Stefan Monnier
  0 siblings, 1 reply; 9+ messages in thread
From: Andy Grover @ 2014-11-05 19:02 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 18952

On 11/05/2014 08:03 AM, Eli Zaretskii wrote:
>> Date: Tue, 04 Nov 2014 23:11:41 -0800
>> From: Andy Grover <andy@groveronline.com>
>>
>>
>> to reproduce:
>> 1) hold down up or down-arrow while editing init.el then release
>> 2) hit backspace
>>
>> expected behavior: one character deleted
>>
>> existing behavior: seemingly-random huge amount of stuff in the buffer
>> deleted
> 
> Are you sure you didn't type S-<down> several times?  This:
> 
>> Recent input:
>> C-s <up> <prior> <prior> <prior> <prior> <prior> <prior>
>> <next> <next> <down> <down> <down> <down> <down> <down>
>> <down> <down> <S-down> <S-down> <S-down> <S-down> <S-down>
>> <S-down> <S-down> <S-down> <S-down> <S-down> <S-down>
>> <S-down> C-c <timeout> <up> <up> <up> <up> <up> <right>
>> <up> <up> <right> <right> <right> <right> <right> <right>
>> <right> <right> <right> <right> <right> <right> <right>
>> <backspace> C-z <backspace> C-z <up> <up> <up> <up>
> 
> says you did.
> 

Yes exactly, define a region with shift-down, then arrow down (region
disappears) then hitting backspace deletes to start of region, instead
of a single character.

Setting transient-mark-mode makes the problem go away. But isn't
cua-mode supposed to work without transient-mark-mode?

-- Andy






^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#18952: 24.4; delete weirdness in cua mode
  2014-11-05 19:02   ` Andy Grover
@ 2014-11-05 20:16     ` Stefan Monnier
  2014-11-05 20:29       ` Andy Grover
  0 siblings, 1 reply; 9+ messages in thread
From: Stefan Monnier @ 2014-11-05 20:16 UTC (permalink / raw)
  To: Andy Grover; +Cc: 18952

> Setting transient-mark-mode makes the problem go away. But isn't
> cua-mode supposed to work without transient-mark-mode?

Yes, it works.  But clearly, some of the interactions haven't been
tested yet.

You could have mentioned earlier that you disabled transient-mark-mode.


        Stefan





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#18952: 24.4; delete weirdness in cua mode
  2014-11-05 20:16     ` Stefan Monnier
@ 2014-11-05 20:29       ` Andy Grover
  2014-11-05 22:45         ` Stefan Monnier
  2014-11-06  3:06         ` Stefan Monnier
  0 siblings, 2 replies; 9+ messages in thread
From: Andy Grover @ 2014-11-05 20:29 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 18952

On 11/05/2014 12:16 PM, Stefan Monnier wrote:
>> Setting transient-mark-mode makes the problem go away. But isn't
>> cua-mode supposed to work without transient-mark-mode?
>
> Yes, it works.  But clearly, some of the interactions haven't been
> tested yet.
>
> You could have mentioned earlier that you disabled transient-mark-mode.

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.

HTH -- Andy






^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#18952: 24.4; delete weirdness in cua mode
  2014-11-05 20:29       ` Andy Grover
@ 2014-11-05 22:45         ` Stefan Monnier
  2014-11-06  3:06         ` Stefan Monnier
  1 sibling, 0 replies; 9+ messages in thread
From: Stefan Monnier @ 2014-11-05 22:45 UTC (permalink / raw)
  To: Andy Grover; +Cc: 18952

> 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.

Ah, that's a more serious bug, then, thanks.


        Stefan





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#18952: 24.4; delete weirdness in cua mode
  2014-11-05 20:29       ` Andy Grover
  2014-11-05 22:45         ` Stefan Monnier
@ 2014-11-06  3:06         ` Stefan Monnier
  2014-11-06  6:41           ` Andy Grover
  1 sibling, 1 reply; 9+ messages in thread
From: Stefan Monnier @ 2014-11-06  3:06 UTC (permalink / raw)
  To: Andy Grover; +Cc: 18952

> 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.


        Stefan





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#18952: 24.4; delete weirdness in cua mode
  2014-11-06  3:06         ` Stefan Monnier
@ 2014-11-06  6:41           ` Andy Grover
  2014-11-07 19:56             ` Stefan Monnier
  0 siblings, 1 reply; 9+ messages in thread
From: Andy Grover @ 2014-11-06  6:41 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 18952

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





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#18952: 24.4; delete weirdness in cua mode
  2014-11-06  6:41           ` Andy Grover
@ 2014-11-07 19:56             ` Stefan Monnier
  0 siblings, 0 replies; 9+ messages in thread
From: Stefan Monnier @ 2014-11-07 19:56 UTC (permalink / raw)
  To: Andy Grover; +Cc: 18952-done

Version:24.5

> 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:

Ah, I see it now.  I installed the patch below, which seems to fix it.
Thanks,


        Stefan


=== modified file 'lisp/emulation/cua-base.el'
--- lisp/emulation/cua-base.el	2014-10-31 15:31:27 +0000
+++ lisp/emulation/cua-base.el	2014-11-07 19:51:19 +0000
@@ -1199,7 +1199,7 @@
 (defun cua--select-keymaps ()
   ;; Setup conditions for selecting the proper keymaps in cua--keymap-alist.
   (setq cua--ena-region-keymap
-	(and mark-active (not deactivate-mark)))
+	(and (region-active-p) (not deactivate-mark)))
   (setq cua--ena-prefix-override-keymap
 	(and cua--ena-region-keymap
 	     cua-enable-cua-keys






^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-11-07 19:56 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-05  7:11 bug#18952: 24.4; delete weirdness in cua mode Andy Grover
2014-11-05 16:03 ` Eli Zaretskii
2014-11-05 19:02   ` Andy Grover
2014-11-05 20:16     ` Stefan Monnier
2014-11-05 20:29       ` Andy Grover
2014-11-05 22:45         ` Stefan Monnier
2014-11-06  3:06         ` Stefan Monnier
2014-11-06  6:41           ` Andy Grover
2014-11-07 19:56             ` Stefan Monnier

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.