From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: git@vladimir.panteleev.md Newsgroups: gmane.emacs.bugs Subject: bug#61022: 28.2.50; Mouse tracking of high coordinates not working in rxvt-unicode Date: Sun, 22 Jan 2023 19:36:50 +0000 Message-ID: <87sfg2nyy5.fsf@home.thecybershadow.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23367"; mail-complaints-to="usenet@ciao.gmane.io" To: 61022@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jan 23 06:53:40 2023 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 1pJplz-0005tr-PX for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 23 Jan 2023 06:53:40 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pJplT-0006Cm-3u; Mon, 23 Jan 2023 00:53:07 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pJplP-0006C6-B0 for bug-gnu-emacs@gnu.org; Mon, 23 Jan 2023 00:53:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pJplP-000706-3H for bug-gnu-emacs@gnu.org; Mon, 23 Jan 2023 00:53:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pJplO-0000R0-TP for bug-gnu-emacs@gnu.org; Mon, 23 Jan 2023 00:53:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: git@vladimir.panteleev.md Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 23 Jan 2023 05:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 61022 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.16744531451583 (code B ref -1); Mon, 23 Jan 2023 05:53:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 23 Jan 2023 05:52:25 +0000 Original-Received: from localhost ([127.0.0.1]:53063 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pJpkm-0000PR-NH for submit@debbugs.gnu.org; Mon, 23 Jan 2023 00:52:25 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:60436) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pJgOJ-00051S-8g for submit@debbugs.gnu.org; Sun, 22 Jan 2023 14:52:37 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pJgOI-0001If-7t for bug-gnu-emacs@gnu.org; Sun, 22 Jan 2023 14:52:34 -0500 Original-Received: from tunnel258969-pt.tunnel.tserv1.bud1.ipv6.he.net ([2001:470:1f1a:172::2] helo=home.thecybershadow.net) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pJgOE-0001W8-E0 for bug-gnu-emacs@gnu.org; Sun, 22 Jan 2023 14:52:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=home.thecybershadow.net; s=home; h=Sender:Content-Type:MIME-Version: Message-ID:Date:Subject:To:From:Reply-To:Cc:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=vmMAe14KTSr4c0UtgeOoLG6nzY2ThHdC5tirD3kD8N0=; b=cuxwpuF/gBGICfvoKqHfgsIfZC 6fPsK1vrhhO8ofJSdYA3dBjh598cexXYMU18DnAo5ZfklkzBbdqSDnBUYBBviFqjCzvQlTCV68e9x swPmWqiEDpQBX8TNDhRqCoCON2K/tIYC2d2jCDW4yfNjoaOwIYbJVIxMm9Tuk58R4Y10=; Original-Received: from vladimir by home.thecybershadow.net with local (Exim 4.96) (envelope-from ) id 1pJg94-004ZMc-2L for bug-gnu-emacs@gnu.org; Sun, 22 Jan 2023 19:36:50 +0000 Received-SPF: pass client-ip=2001:470:1f1a:172::2; envelope-from=vladimir@home.thecybershadow.net; helo=home.thecybershadow.net X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Mon, 23 Jan 2023 00:52:20 -0500 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:253976 Archived-At: Hi, For some reason, xt-mouse with xterm-mouse-utf-8 on isn't working for me under rxvt-unicode. I assume it worked at some point, but it's not working now. I investigated it a little and it looks like the (read-char nil nil 0.1) call is no longer reading an entire UTF-8 character unless the inherit-input-method argument is non-nil. I don't know why that is. But, in any case, this patch fixes it for me: ---------------------------------------------------------------------- >From 32e4b5ab67006ed08c853396686315ed373691be Mon Sep 17 00:00:00 2001 From: Vladimir Panteleev Date: Sun, 22 Jan 2023 18:54:05 +0000 Subject: [PATCH] Fix xterm mouse tracking of high coordinates with xterm-mouse-utf-8 read-char now needs inherit-input-method to be non-nil for it to read a whole UTF-8 code point, even with set-keyboard-coding-system. * lisp/xt-mouse.el (xterm-mouse--read-coordinate): Call read-char with inherit-input-method as t. --- lisp/xt-mouse.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/xt-mouse.el b/lisp/xt-mouse.el index adfa480bc0f..2b6b448305e 100644 --- a/lisp/xt-mouse.el +++ b/lisp/xt-mouse.el @@ -160,7 +160,7 @@ xterm-mouse--read-coordinate 'no-conversion)) ;; Wait only a little; we assume that the entire escape sequence ;; has already been sent when this function is called. - (read-char nil nil 0.1)) + (read-char nil t 0.1)) (set-keyboard-coding-system previous-keyboard-coding-system)))) ;; In default mode, each numeric parameter of XTerm's mouse report is -- 2.38.1 ---------------------------------------------------------------------- Reproducer: - Run urxvt - In it, run emacs -Q -nw - M-: (require 'xt-mouse) - M-: (setq xterm-mouse-utf-8 t) - M-x xterm-mouse-mode - Make sure the window is wider than 96 lines or columns - Move the mouse around past the 96th line or column Hope this helps. In GNU Emacs 28.2.50 (build 1, x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of 2022-10-03 built on home.thecybershadow.net Repository revision: 992611b10a2ef4621b5c936d80cf31644ca3653d Repository branch: makepkg System Description: Arch Linux Configured using: 'configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib --localstatedir=/var --mandir=/usr/share/man --with-gameuser=:games --with-modules --without-libotf --without-m17n-flt --without-gconf --without-gsettings --enable-link-time-optimization --with-xinput2 --with-native-compilation --with-x-toolkit=lucid --with-xft --with-xaw3d --without-cairo --with-sound=alsa --without-compress-install '--program-transform-name=s/\([ec]tags\)/\1.emacs/' 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fuse-ld=gold -fuse-ld=gold' LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now' Configured features: ACL DBUS FREETYPE GIF GLIB GMP GNUTLS GPM HARFBUZZ JPEG JSON LCMS2 LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XAW3D XDBE XFT XIM XPM LUCID ZLIB Important settings: value of $LC_TIME: en_DK.UTF-8 value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Magit Minor modes in effect: diff-hl-margin-mode: t xterm-mouse-mode: t which-key-mode: t global-undo-tree-mode: t undo-tree-mode: t term-title-mode: t term-keys-mode: t term-cursor-color-mode: t save-place-mode: t savehist-mode: t projectile-mode: t delete-selection-mode: t cua-mode: t helm-mode: t helm-minibuffer-history-mode: t recentf-mode: t async-bytecomp-package-mode: t global-diff-hl-mode: t global-company-mode: t company-mode: t global-git-commit-mode: t magit-auto-revert-mode: t shell-dirtrack-mode: t global-flycheck-mode: t override-global-mode: t straight-use-package-mode: t straight-package-neutering-mode: t tooltip-mode: t global-eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t buffer-read-only: t column-number-mode: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t Load-path shadows: /home/vladimir/.emacs.d/straight/build/cmake-mode/cmake-mode hides /usr/share/emacs/site-lisp/cmake-mode /home/vladimir/work/extern/notmuch/emacs/notmuch hides /usr/share/emacs/site-lisp/notmuch /home/vladimir/work/extern/notmuch/emacs/notmuch-wash hides /usr/share/emacs/site-lisp/notmuch-wash /home/vladimir/work/extern/notmuch/emacs/notmuch-version hides /usr/share/emacs/site-lisp/notmuch-version /home/vladimir/work/extern/notmuch/emacs/notmuch-tree hides /usr/share/emacs/site-lisp/notmuch-tree /home/vladimir/work/extern/notmuch/emacs/notmuch-tag hides /usr/share/emacs/site-lisp/notmuch-tag /home/vladimir/work/extern/notmuch/emacs/notmuch-show hides /usr/share/emacs/site-lisp/notmuch-show /home/vladimir/work/extern/notmuch/emacs/notmuch-query hides /usr/share/emacs/site-lisp/notmuch-query /home/vladimir/work/extern/notmuch/emacs/notmuch-print hides /usr/share/emacs/site-lisp/notmuch-print /home/vladimir/work/extern/notmuch/emacs/notmuch-parser hides /usr/share/emacs/site-lisp/notmuch-parser /home/vladimir/work/extern/notmuch/emacs/notmuch-mua hides /usr/share/emacs/site-lisp/notmuch-mua /home/vladimir/work/extern/notmuch/emacs/notmuch-message hides /usr/share/emacs/site-lisp/notmuch-message /home/vladimir/work/extern/notmuch/emacs/notmuch-maildir-fcc hides /usr/share/emacs/site-lisp/notmuch-maildir-fcc /home/vladimir/work/extern/notmuch/emacs/notmuch-lib hides /usr/share/emacs/site-lisp/notmuch-lib /home/vladimir/work/extern/notmuch/emacs/notmuch-jump hides /usr/share/emacs/site-lisp/notmuch-jump /home/vladimir/work/extern/notmuch/emacs/notmuch-hello hides /usr/share/emacs/site-lisp/notmuch-hello /home/vladimir/work/extern/notmuch/emacs/notmuch-draft hides /usr/share/emacs/site-lisp/notmuch-draft /home/vladimir/work/extern/notmuch/emacs/notmuch-crypto hides /usr/share/emacs/site-lisp/notmuch-crypto /home/vladimir/work/extern/notmuch/emacs/notmuch-compat hides /usr/share/emacs/site-lisp/notmuch-compat /home/vladimir/work/extern/notmuch/emacs/notmuch-company hides /usr/share/emacs/site-lisp/notmuch-company /home/vladimir/work/extern/notmuch/emacs/notmuch-address hides /usr/share/emacs/site-lisp/notmuch-address /home/vladimir/work/extern/notmuch/emacs/coolj hides /usr/share/emacs/site-lisp/coolj /home/vladimir/.emacs.d/straight/build/transient/transient hides /usr/share/emacs/28.2.50/lisp/transient /home/vladimir/.emacs.d/straight/build/jsonrpc/jsonrpc hides /usr/share/emacs/28.2.50/lisp/jsonrpc /home/vladimir/.emacs.d/straight/build/xref/xref hides /usr/share/emacs/28.2.50/lisp/progmodes/xref /home/vladimir/.emacs.d/straight/build/project/project hides /usr/share/emacs/28.2.50/lisp/progmodes/project /home/vladimir/.emacs.d/straight/build/flymake/flymake hides /usr/share/emacs/28.2.50/lisp/progmodes/flymake /home/vladimir/.emacs.d/straight/build/let-alist/let-alist hides /usr/share/emacs/28.2.50/lisp/emacs-lisp/let-alist /home/vladimir/.emacs.d/straight/build/eldoc/eldoc hides /usr/share/emacs/28.2.50/lisp/emacs-lisp/eldoc Memory information: ((conses 16 752116 488420) (symbols 48 78701 92) (strings 32 328620 30949) (string-bytes 1 8451232) (vectors 16 105736) (vector-slots 8 3130938 240432) (floats 8 458 3116) (intervals 56 3490 2630) (buffers 992 30))