From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#21211: 24.4; Possible regression in xterm mouse handling with PuTTY client Date: Sun, 19 Sep 2021 15:29:54 -0700 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9103"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 21211@debbugs.gnu.org To: Neil Baylis Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Sep 20 00:32:28 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mS5MK-0002Fj-Ih for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 20 Sep 2021 00:32:28 +0200 Original-Received: from localhost ([::1]:39894 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mS5MJ-0005mC-9T for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 19 Sep 2021 18:32:27 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34000) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mS5K1-0004Wb-IC for bug-gnu-emacs@gnu.org; Sun, 19 Sep 2021 18:30:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:56896) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mS5K1-0004QV-9C for bug-gnu-emacs@gnu.org; Sun, 19 Sep 2021 18:30:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mS5K1-0003bY-3W for bug-gnu-emacs@gnu.org; Sun, 19 Sep 2021 18:30:05 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 19 Sep 2021 22:30:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21211 X-GNU-PR-Package: emacs Original-Received: via spool by 21211-submit@debbugs.gnu.org id=B21211.163209060313835 (code B ref 21211); Sun, 19 Sep 2021 22:30:04 +0000 Original-Received: (at 21211) by debbugs.gnu.org; 19 Sep 2021 22:30:03 +0000 Original-Received: from localhost ([127.0.0.1]:40204 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mS5Jy-0003aq-EB for submit@debbugs.gnu.org; Sun, 19 Sep 2021 18:30:03 -0400 Original-Received: from mail-pf1-f177.google.com ([209.85.210.177]:33532) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mS5Jx-0003Zz-0N for 21211@debbugs.gnu.org; Sun, 19 Sep 2021 18:30:01 -0400 Original-Received: by mail-pf1-f177.google.com with SMTP id s16so6216164pfk.0 for <21211@debbugs.gnu.org>; Sun, 19 Sep 2021 15:30:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:in-reply-to:references:user-agent :mime-version:date:message-id:subject:to:cc :content-transfer-encoding; bh=GLT4crZPZf4cUA/SL+/1x9pqJ36qQB/90Hzf9srJxX8=; b=fhNB6avhV9l/8mas4bk+PxGJCnfaLSzJkd9a3ZjlF9mm7howe8Ta6tn5o/ivyXTgzu XtdVeUttAM+SKpR+C29tbAtgWyl3w17IgpsgvtzFEg8hx6laztrsfXSFcUfN4/p4YbYH 8SVmm8uTtVHzOiPU/Cfm/gUlQ3jr7jCMh0NTA4P8oeW13uhbfD/y5xYAfT0H/kMgfMFY h3pf+y+oUPylVjot9a8qG7MRRjAAuA0OlVBKLYguoBmibEehsTbf4f/T1pQ3Rvf3UXf4 e6zYIBi8E1XlqgXKx+NXtzBUCt8hFOQEQVYVwg4apP2Zp8+uac3Y424cExnGDkkmB3Q+ B6wg== X-Gm-Message-State: AOAM533WM2x/aV1m3EhLiE/kGq1GhlvRYnYooSKLDNQduJD1R7QK+fi0 d7AIoF1yGzqkmFjE2rmSgF98JKCi8s/1joQ86FltO7Rg X-Google-Smtp-Source: ABdhPJwAkArtSETa1dvli6gw0Vf0pvRe3k7TNeH4yuQEGsrcMKVFewaO2S2zAag1Tjd2fCUMXrRrp/qkp3Q7VM3NVXM= X-Received: by 2002:a05:6a00:1586:b0:447:b30c:4a65 with SMTP id u6-20020a056a00158600b00447b30c4a65mr3055333pfk.0.1632090595317; Sun, 19 Sep 2021 15:29:55 -0700 (PDT) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sun, 19 Sep 2021 15:29:54 -0700 In-Reply-To: (Neil Baylis's message of "Fri, 7 Aug 2015 11:39:10 -0700") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:214797 Archived-At: Neil Baylis writes: > I think I'm seeing a slight regression in the behavior of the mouse wheel= with xterm-mouse-mode. This is when running in -nw mode, using > Windows PuTTY as a client, with ssh into a linux box where the emacs runs= . I've verified that it's nothing in my init.el or site-lisp files. I've > verified that the bad behavior described below does not happen when runni= ng on the same host with a real xterm. > > The problem seems to have begun with emacs 24.4. I verified with fresh bu= ilds from source that it works with 24.3, but not with 24.4 or > 24.5. > > The problem: > > When I scroll using the mouse wheel, the buffer scrolls as before, but t= here's also a screen flash, and a complaint in the mini buffer: "M-[ > m" is undefined". It seems that emacs is seeing this escape sequence afte= r each movement of the mouse wheel. I have PuTTY set to > report xterm mouse events, and I have xterm-mouse-mode turned on in emacs= . (That was 6 years ago.) Are you still seeing this issue on a recent version of Emacs, such as 27.1? > I can work around this by adding a global-set-key to recognize the escape= sequence and ignore it. As yet, I don't know if my workaround > breaks anything else. The escape sequence means "Turn off all special cha= racter attributes, e.g., blinking, bold, etc.". Here's the > workaround I'm using: > > (global-set-key (kbd "\e [ m") (lambda () (interactive) nil)) > > Here is the lossage output under various combinations of emacs version an= d client. I notice that with 24.4 the character \230 is displayed > differently than in 24.3, don't know if that relates to the problem. Thes= e are all started as emacs -q -nw. After emacs starts up, I enable > xterm-mouse-mode, and then do a single scroll down with the mouse wheel: > > This is emacs 24.3 with the PuTTY client. The bad behavior is not seen in= this case. > > > > ESC [ > 0 ; 1 3 6 ; 0 c ESC x x t e r m - m o u s e > > - m o d e RET ESC [ M a \230 % ESC [ M # \230 % C-h > > l > > > > > > > > This is emacs 24.3 with the genuine xterm client. The bad behavior is not= seen in this case. > > > > ESC [ > 0 ; 2 7 8 ; 0 c ESC ] 1 1 ; r g b : 0 0 0 0 > > / 0 0 0 0 / 0 0 0 0 ESC \ ESC x x t e r m - m o u s > > e - m o d e RET ESC [ < 6 5 ; 5 0 ; 1 3 M C-h l > > > > > > > > > > This is emacs 24.4 with the PuTTY client. The bad behavior is seen in thi= s case. > > > > ESC [ > 0 ; 1 3 6 ; 0 c ESC x x t e r m - m o u s e > > - m o d e RET ESC [ M a =C3=82 K ESC [ M # =C3=82 K C-h > > l > > > > > > > > This is emacs 24.4 with the genuine xterm client. The bad behavior is not= seen in this case. > > > > ESC [ > 0 ; 2 7 8 ; 0 c ESC ] 1 1 ; r g b : 0 0 0 0 > > / 0 0 0 0 / 0 0 0 0 ESC \ ESC x x t e r m - m o u s > > e - m o d e RET ESC [ < 6 5 ; 9 6 ; 4 2 M C-h l$ > > Pasted below is the output from M-x report-emacs-bug on the failing versi= on. I have also tried emacs 24.5 and found the same bad > behavior with the PuTTY client. > > In GNU Emacs 24.4.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.10) > > of 2015-07-30 on moes > > System Description: Debian GNU/Linux 7.7 (wheezy) > > > > Configured using: > > `configure --with-xpm=3Dno --with-gif=3Dno --with-tiff=3Dno' > > > > Important settings: > > value of $LANG: en_US.UTF-8 > > locale-coding-system: utf-8-unix > > > > Major mode: Fundamental > > > > Minor modes in effect: > > tooltip-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 > > auto-composition-mode: t > > auto-encryption-mode: t > > auto-compression-mode: t > > buffer-read-only: t > > line-number-mode: t > > transient-mark-mode: t > > > > Recent input: > > ESC [ > 0 ; 1 3 6 ; 0 c ESC x r e p o r t - e m a c > > s - b u g RET > > > > Recent messages: > > For information about GNU Emacs and the GNU system, type C-h C-a. > > > > Load-path shadows: > > None found. > > > > Features: > > (shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml > > easymenu 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 xterm 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 77501 7411) > > (symbols 48 17540 0) > > (miscs 40 70 113) > > (strings 32 9242 4336) > > (string-bytes 1 248382) > > (vectors 16 7099) > > (vector-slots 8 341403 33128) > > (floats 8 65 270) > > (intervals 56 155 0) > > (buffers 960 12) > > (heap 1024 7622 527))