emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why have you disable mouse on TTY builds?


From: Jared Finder
Subject: Re: Why have you disable mouse on TTY builds?
Date: Sun, 05 Jan 2025 09:35:59 -0800

On 2025-01-05 08:53, Eli Zaretskii wrote:
Date: Sun, 5 Jan 2025 13:12:43 +0100
Cc: emacs-devel@gnu.org
From: Angelo Graziosi <angelo.g0@libero.it>

> Can you tell more about the terminal you are using?  How do you start
> this terminal, and what program does it run?
>
> Also, does it set TERM to some value, and if so, to which value?

Windows Terminal is called in this way, it is
https://github.com/microsoft/terminal/releases/tag/v1.22.3232.0

and one gets

$ echo $TERM
xterm-256color

BTW, I reinstalled the previous TTY build (pure MSYS2),

GNU Emacs 31.0.50 (build 1, x86_64-pc-cygwin)
                                                 of 2024-12-20


and it works with mouse settings commented out in init.el

;;(require 'mouse)
     ;;(require 'mwheel)
     ;;(unless window-system
     ;;(xterm-mouse-mode t)
     ;;(mouse-wheel-mode t))

The same does not work with current master build for TTY.

So I guess this terminal somehow doesn't pass this test in xterm.el:

             ;; Only automatically enable xterm mouse on terminals
             ;; confirmed to still support all critical editing
             ;; workflows (bug#74833).
             (or (string-match-p xterm--auto-xt-mouse-allowed-types
                                 (tty-type (selected-frame)))
(and-let* ((name-and-version (xterm--query-name-and-version)))
                   (string-match-p xterm--auto-xt-mouse-allowed-names
                                   name-and-version))))

This is my expectation as well. Windows Terminal does properly support OSC52 and xterm mouse modes, but has no good way to detect it. Windows Terminal does uniquely set WT_SESSION, but that's not forwarded over SSH in a default configuration.

I filed a bug on Windows Terminal to have it support an XTVERSION query (https://github.com/microsoft/terminal/issues/18382) and I hope they are able to address quickly like on the previous Emacs uncovered xterm-related issue I filed.

  -- MJF



reply via email to

[Prev in Thread] Current Thread [Next in Thread]