From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#68796: xterm.c: Convert mouse-4/5/6/7 to wheel-up/down/left/right Date: Sat, 10 Feb 2024 09:22:02 -0500 Message-ID: References: <871q9zh972.fsf@yahoo.com> <87r0hzfpd5.fsf@yahoo.com> <86cyt4vi9r.fsf@gnu.org> <87y1bs1y9x.fsf@yahoo.com> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37864"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , 68796@debbugs.gnu.org To: Po Lu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Feb 10 15:23:21 2024 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 1rYoGH-0009cc-0U for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 10 Feb 2024 15:23:21 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rYoFj-0007XE-TW; Sat, 10 Feb 2024 09:22:47 -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 1rYoFi-0007Ws-HE for bug-gnu-emacs@gnu.org; Sat, 10 Feb 2024 09:22:46 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rYoFi-0005t9-9M for bug-gnu-emacs@gnu.org; Sat, 10 Feb 2024 09:22:46 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rYoFx-0002Ln-Ja for bug-gnu-emacs@gnu.org; Sat, 10 Feb 2024 09:23:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 10 Feb 2024 14:23:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68796 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 68796-submit@debbugs.gnu.org id=B68796.17075749498969 (code B ref 68796); Sat, 10 Feb 2024 14:23:01 +0000 Original-Received: (at 68796) by debbugs.gnu.org; 10 Feb 2024 14:22:29 +0000 Original-Received: from localhost ([127.0.0.1]:43872 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rYoFQ-0002KZ-JV for submit@debbugs.gnu.org; Sat, 10 Feb 2024 09:22:28 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:33087) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rYoFO-0002K9-IK for 68796@debbugs.gnu.org; Sat, 10 Feb 2024 09:22:27 -0500 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 34791442CC3; Sat, 10 Feb 2024 09:22:05 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1707574923; bh=U3PieQLpGbahdazXdEz1t64NhRpLrPBrH/ipbA0o9RE=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=MF8r8IoJ7+PNWN7vXOfEDFZbEwpuhbf7m6w/ZgqJ/o5E6WwqCVMtAQlqCOBq5Iwst TtCM+ZnHvtKBbCMz6guaWZlmPf8pog3NCu5lxRgB7j4OfiGbARek+7B7ka4zylLXmw R9kllBVPpws9s2XUNWcu0s5qnlRCdk/lsNd4B3gwlnE9WAqPJ3BLlmucUcNFUlckdu tgzM21FwprfyP4R4FU6aeaP/U1uq01N/MCPCh5B06gBjVAMtbJ3blOVpSCCgwLjL9g zuOzeLiOEjUyrr8pFdt9wc5Vlhy5iMDgFpPCehXlpKOy23sFab0cG4SeRiLs1VQVvJ jPMsOvfqBok7w== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id D24E7442CB4; Sat, 10 Feb 2024 09:22:03 -0500 (EST) Original-Received: from pastel (unknown [104.247.238.113]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id A7A1F12021A; Sat, 10 Feb 2024 09:22:03 -0500 (EST) In-Reply-To: <87y1bs1y9x.fsf@yahoo.com> (Po Lu's message of "Sat, 10 Feb 2024 17:09:14 +0800") 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:279753 Archived-At: Po Lu [2024-02-10 17:09:14] wrote: > Eli Zaretskii writes: >> Ping! Can we make some progress here? > I converted most of the Lisp code at my organization (where X servers > are configured with the input extension disabled) to use wheel events > under Emacs 30 and arranged for a modified version of Stefan's patch to > be built. Which was incidentally not straightforward to do cleanly, as > the code in question assumed that events it received would be pairs of > button press and release events, and was very much designed around that > assumption. Fascinating. Is there any way I could get to peek at that code? Also interested in the backstory about why your X11 servers are configured without XInput2. Maybe we should provide a better "reverse" story: with the current patch users can recover their old `mouse-4/5/6/7` events by setting `mouse-wheel-*-event` to nil, but then they lose mwheel-based scrolling (plus a few other bindings, mostly one in completion-preview and one in flymake), so the etc/NEWS entry should describe how to recover that scrolling behavior. Or maybe we should keep `mouse-wheel-*-event` untouched (tho, maybe mark them obsolete) and instead introduce a new set of variables that control the remapping of `mouse-4/5/6/7` to `wheel-*` events. That would provide a smoother transition: users can set those new vars to nil to recover the old behavior. Another benefit is that the new var(s) could hold just the button numbers (i.e. an integer) instead of a symbol, which should simplify the remapping code (both in the `xterm.c` and the `xt-mouse.el` cases). Stefan