all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#42350: 26.3; C-c C-c in R console buffer causes Control key to get "stuck"
@ 2020-07-14  2:26 Mark Seeto
  2020-07-14 14:49 ` Eli Zaretskii
  0 siblings, 1 reply; 9+ messages in thread
From: Mark Seeto @ 2020-07-14  2:26 UTC (permalink / raw)
  To: 42350

[-- Attachment #1: Type: text/plain, Size: 5744 bytes --]

I'm running R using the ESS package (version 18.10.2, installed using
package-list-packages) in Emacs 26.3 in MS Windows 10.

When I'm in an R console window (Emacs buffer named "*R*" where R is
running) and I press C-c C-c using the right (not left) Control key, Emacs
starts acting as though the Control key is being held down. For example, if
I press C-c C-c <return> in the R console buffer using the right Control
key, I get the message "<C-return> is undefined", and it keeps happening
with further key presses (e.g. pressing p moves to the previous line). The
problem doesn't happen if I press C-c C-c in the R console buffer using the
left Control key. Even other programs (e.g. Notepad, Firefox) start acting
as though Control is being pressed.

The "stuck" Control key can be "released" by pressing the left Control key.

The problem doesn't happen if I press C-c C-c (using either Control key) in
an Emacs buffer with a .R file.

I normally use Vincent Goulet's modified version of Emacs, but the problem
also happens with "ordinary" unmodified Emacs. In the steps below, I'm
using the unmodified Emacs.

Steps to make the problem happen:

At the Windows command prompt, in the Emacs bin directory:
emacs -Q <return>

Type or copy the following into the *scratch* buffer:
(package-initialize)
(setq inferior-R-program-name "C:/Program
Files/R/R-3.6.1/bin/x64/Rterm.exe")

Run the code in the *scratch* buffer:
M-x eval-buffer <return>

Start R:
M-x R <return> <return>

(This opens an R console buffer and takes you to it.)

Using the right Control key:
C-c C-c <return>

This gives the message "<C-return> is undefined", which shouldn't happen
(it doesn't happen if the C-c C-c <return> is pressed using the left
Control key).

Further key presses are treated as though Control is being held down. For
example, pressing p acts like C-p.

Press the left Control key to go back to normal.


Additional information:
- The problem doesn't happen with Emacs 25.3.1 (with the same version of
ESS).
- The problem also happens with the latest version of R (4.0.2).
- The problem also happens if inferior-ess-r-program is used in place of
inferior-R-program-name in the steps above.
- I tried a different keyboard on the same computer, and the same thing
happened. I also tried it on a different Windows 10 computer and the same
thing happened.

Copied from M-x report-emacs-bug:

In GNU Emacs 26.3 (build 1, x86_64-w64-mingw32)
 of 2019-08-29 built on CIRROCUMULUS
Repository revision: 96dd0196c28bc36779584e47fffcca433c9309cd
Windowing system distributor 'Microsoft Corp.', version 10.0.18363
Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Mark set
Type C-h m for help on ESS version 18.10.2
ess-tracebug mode enabled
<C-return> is undefined

Configured using:
 'configure --without-dbus --host=x86_64-w64-mingw32
 --without-compress-install 'CFLAGS=-O2 -static -g3''

Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY ACL GNUTLS LIBXML2 ZLIB
TOOLKIT_SCROLL_BARS THREADS LCMS2

Important settings:
  value of $LANG: ENA
  locale-coding-system: cp1252

Major mode: iESS

Minor modes in effect:
  shell-dirtrack-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-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
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
rfc822 mml mml-sec epa derived epg gnus-util rmail rmail-loaddefs
mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils
mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr
mail-utils cl-extra help-mode ess-r-mode ess-r-flymake flymake-proc
flymake warnings thingatpt ess-r-xref xref project subr-x ess-trns
ess-r-package shell pcomplete ess-r-syntax ess-r-completion ess-roxy
ess-rd essddr noutline outline easy-mmode hideshow ess-s-lang ess-help
ess-mode ess ess-noweb-mode ess-inf ess-tracebug advice format-spec
ess-utils ido ess-custom executable compile comint ansi-color ring
finder-inf ess-generics info package easymenu epg-config url-handlers
url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs
password-cache url-vars seq byte-opt gv bytecomp byte-compile cconv
cl-loaddefs cl-lib elec-pair time-date mule-util tooltip eldoc electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel dos-w32 ls-lisp
disp-table term/w32-win w32-win w32-vars term/common-win tool-bar dnd
fontset image regexp-opt fringe tabulated-list replace newcomment
text-mode elisp-mode lisp-mode prog-mode register page menu-bar
rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core term/tty-colors frame cl-generic cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese composite charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer
cl-preloaded 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 threads w32notify w32
lcms2 multi-tty make-network-process emacs)

Memory information:
((conses 16 156874 9057)
 (symbols 48 26904 2)
 (miscs 40 73 170)
 (strings 32 50752 1452)
 (string-bytes 1 1386755)
 (vectors 16 22886)
 (vector-slots 8 595421 10002)
 (floats 8 90 266)
 (intervals 56 303 14)
 (buffers 992 16))


Thanks,
Mark Seeto
--

[-- Attachment #2: Type: text/html, Size: 6467 bytes --]

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

* bug#42350: 26.3; C-c C-c in R console buffer causes Control key to get "stuck"
  2020-07-14  2:26 bug#42350: 26.3; C-c C-c in R console buffer causes Control key to get "stuck" Mark Seeto
@ 2020-07-14 14:49 ` Eli Zaretskii
  2020-07-15  1:39   ` Mark Seeto
  0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2020-07-14 14:49 UTC (permalink / raw)
  To: Mark Seeto; +Cc: 42350

> From: Mark Seeto <markseeto@gmail.com>
> Date: Tue, 14 Jul 2020 12:26:26 +1000
> 
> I'm running R using the ESS package (version 18.10.2, installed using package-list-packages) in Emacs
> 26.3 in MS Windows 10.
> 
> When I'm in an R console window (Emacs buffer named "*R*" where R is running) and I press C-c C-c
> using the right (not left) Control key, Emacs starts acting as though the Control key is being held down. For
> example, if I press C-c C-c <return> in the R console buffer using the right Control key, I get the message
> "<C-return> is undefined", and it keeps happening with further key presses (e.g. pressing p moves to the
> previous line). The problem doesn't happen if I press C-c C-c in the R console buffer using the left Control
> key. Even other programs (e.g. Notepad, Firefox) start acting as though Control is being pressed.
> 
> The "stuck" Control key can be "released" by pressing the left Control key.

I suspect this is something specific to your Windows system setup,
perhaps in combination with what R does.  Because I tried to reproduce
what you say on a Windows 10 system without R, and couldn't.  It
sounds like some "sticky key" feature or something similar.

I very much doubt this is an Emacs problem.





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

* bug#42350: 26.3; C-c C-c in R console buffer causes Control key to get "stuck"
  2020-07-14 14:49 ` Eli Zaretskii
@ 2020-07-15  1:39   ` Mark Seeto
  2020-07-15 15:03     ` Eli Zaretskii
  0 siblings, 1 reply; 9+ messages in thread
From: Mark Seeto @ 2020-07-15  1:39 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 42350

On Wed, Jul 15, 2020 at 12:49 AM Eli Zaretskii <eliz@gnu.org> wrote:
>
> I suspect this is something specific to your Windows system setup,
> perhaps in combination with what R does.  Because I tried to reproduce
> what you say on a Windows 10 system without R, and couldn't.  It
> sounds like some "sticky key" feature or something similar.
>
> I very much doubt this is an Emacs problem.

Thanks for your reply Eli, and thanks for your work on Emacs.

The reason I thought it was an Emacs problem was that the problem
happens consistently in Emacs 26.3 but not in Emacs 25.3.1. But I
don't have a lot of knowledge about Emacs, so there could be something
I'm overlooking.

I wouldn't expect that you could reproduce it on a system without R,
because it only happens (as far as I know) if C-c C-c is pressed with
the right Control key in an R console buffer. It doesn't happen if I
press C-c C-c in a different buffer.

Mark





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

* bug#42350: 26.3; C-c C-c in R console buffer causes Control key to get "stuck"
  2020-07-15  1:39   ` Mark Seeto
@ 2020-07-15 15:03     ` Eli Zaretskii
  2020-07-16  6:48       ` Mark Seeto
  0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2020-07-15 15:03 UTC (permalink / raw)
  To: Mark Seeto; +Cc: 42350

> From: Mark Seeto <markseeto@gmail.com>
> Date: Wed, 15 Jul 2020 11:39:49 +1000
> Cc: 42350@debbugs.gnu.org
> 
> The reason I thought it was an Emacs problem was that the problem
> happens consistently in Emacs 26.3 but not in Emacs 25.3.1. But I
> don't have a lot of knowledge about Emacs, so there could be something
> I'm overlooking.

Emacs 26 changed the way it reads keyboard input on MS-Windows, but
this is the first time I hear a complaint about such "sticky"
behavior, so it must be somehow related to R.

> I wouldn't expect that you could reproduce it on a system without R,
> because it only happens (as far as I know) if C-c C-c is pressed with
> the right Control key in an R console buffer. It doesn't happen if I
> press C-c C-c in a different buffer.

Did you try asking on R forums about this problem?





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

* bug#42350: 26.3; C-c C-c in R console buffer causes Control key to get "stuck"
  2020-07-15 15:03     ` Eli Zaretskii
@ 2020-07-16  6:48       ` Mark Seeto
  2020-07-16  8:30         ` Eli Zaretskii
  0 siblings, 1 reply; 9+ messages in thread
From: Mark Seeto @ 2020-07-16  6:48 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 42350

On Thu, Jul 16, 2020 at 1:03 AM Eli Zaretskii <eliz@gnu.org> wrote:
> Emacs 26 changed the way it reads keyboard input on MS-Windows, but
> this is the first time I hear a complaint about such "sticky"
> behavior, so it must be somehow related to R.
>
> Did you try asking on R forums about this problem?

Thanks for your reply.

I haven't asked on R forums but I asked on the Emacs Speaks Statistics
help mailing list because my first thought was that the problem was
probably caused by a change in a recent version of the ESS package.
After I sent an update with some results suggesting that it wasn't
caused by a change in ESS, someone replied to me saying that he had
the same problem, and he suggested that I send an Emacs bug report.

I've turned off all the Windows "sticky keys" and similar options I
could find (they were already turned off).

I just tried C-c C-c in a Python (Jupyter) console buffer (elpy
package), and the same problem happened in Emacs 26.3 but not in Emacs
25.2.





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

* bug#42350: 26.3; C-c C-c in R console buffer causes Control key to get "stuck"
  2020-07-16  6:48       ` Mark Seeto
@ 2020-07-16  8:30         ` Eli Zaretskii
  2020-07-16  9:45           ` Mark Seeto
  0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2020-07-16  8:30 UTC (permalink / raw)
  To: Mark Seeto; +Cc: 42350

On July 16, 2020 9:48:29 AM GMT+03:00, Mark Seeto <markseeto@gmail.com> wrote:
> 
> I just tried C-c C-c in a Python (Jupyter) console buffer (elpy
> package), and the same problem happened in Emacs 26.3 but not in Emacs
> 25.2.

Can you please send detailed instructions for how to reproduce this with Python?  I have Python installed, but I don't use it interactively, so I will need detailed step by step instructions.  Including, if needed, installation of add ons.

Thanks.





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

* bug#42350: 26.3; C-c C-c in R console buffer causes Control key to get "stuck"
  2020-07-16  8:30         ` Eli Zaretskii
@ 2020-07-16  9:45           ` Mark Seeto
  2020-07-16 16:53             ` Eli Zaretskii
  0 siblings, 1 reply; 9+ messages in thread
From: Mark Seeto @ 2020-07-16  9:45 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 42350

On Thu, Jul 16, 2020 at 6:30 PM Eli Zaretskii <eliz@gnu.org> wrote:
> Can you please send detailed instructions for how to reproduce this with Python?  I have Python installed, but I don't use it interactively, so I will need detailed step by step instructions.  Including, if needed, installation of add ons.

For this to work I think you need to have your Python directory in
your Windows path. I have the elpy package installed but as far as I
know, the instructions below don't depend on it.

At the Windows command prompt in the Emacs 26.3 bin directory:
emacs -Q <return>

Start Python:
M-x run-python <return>

Go to the Python console buffer:
C-x o

Using the right Control key:
C-c C-c <return>

For me, this produces the message "<C-return> is undefined", which
doesn't happen if the C-c C-c <return> is entered using the left
Control key. If further keys are pressed, the result is as though a
Control key is being held down.

Press the left Control key to go back to normal.

In Emacs 25.3.1, M-x run-python produces a warning, but once I go to
the Python console buffer, the problem described above doesn't happen.

Thanks.





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

* bug#42350: 26.3; C-c C-c in R console buffer causes Control key to get "stuck"
  2020-07-16  9:45           ` Mark Seeto
@ 2020-07-16 16:53             ` Eli Zaretskii
  2020-07-16 19:41               ` Mark Seeto
  0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2020-07-16 16:53 UTC (permalink / raw)
  To: Mark Seeto; +Cc: 42350-done

> From: Mark Seeto <markseeto@gmail.com>
> Date: Thu, 16 Jul 2020 19:45:23 +1000
> Cc: 42350@debbugs.gnu.org
> 
> Start Python:
> M-x run-python <return>
> 
> Go to the Python console buffer:
> C-x o
> 
> Using the right Control key:
> C-c C-c <return>

Thanks.  It turned out you don't need Python or R to reproduce this:
any process run via comint.el will cause the same problem, for example
"M-x gdb".  The problem was in how we restored the status of the Ctrl
key after interrupting a subprocess; I've now fixed that on the
emacs-27 branch.





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

* bug#42350: 26.3; C-c C-c in R console buffer causes Control key to get "stuck"
  2020-07-16 16:53             ` Eli Zaretskii
@ 2020-07-16 19:41               ` Mark Seeto
  0 siblings, 0 replies; 9+ messages in thread
From: Mark Seeto @ 2020-07-16 19:41 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 42350-done

On Fri, Jul 17, 2020 at 2:53 AM Eli Zaretskii <eliz@gnu.org> wrote:
> Thanks.  It turned out you don't need Python or R to reproduce this:
> any process run via comint.el will cause the same problem, for example
> "M-x gdb".  The problem was in how we restored the status of the Ctrl
> key after interrupting a subprocess; I've now fixed that on the
> emacs-27 branch.

Thanks Eli.





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

end of thread, other threads:[~2020-07-16 19:41 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-14  2:26 bug#42350: 26.3; C-c C-c in R console buffer causes Control key to get "stuck" Mark Seeto
2020-07-14 14:49 ` Eli Zaretskii
2020-07-15  1:39   ` Mark Seeto
2020-07-15 15:03     ` Eli Zaretskii
2020-07-16  6:48       ` Mark Seeto
2020-07-16  8:30         ` Eli Zaretskii
2020-07-16  9:45           ` Mark Seeto
2020-07-16 16:53             ` Eli Zaretskii
2020-07-16 19:41               ` Mark Seeto

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.