From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Why have you disable mouse on TTY builds? Date: Sun, 05 Jan 2025 18:53:54 +0200 Message-ID: <86sepx6w2l.fsf@gnu.org> References: <5c8854f9-53ec-43c7-b82a-e040ba246ccf@libero.it> <868qrpaf7r.fsf@gnu.org> <6437ff4e-1594-426a-8502-f7a6bec82808@libero.it> <86msg58qik.fsf@gnu.org> <8d232192-85d3-49f9-b2fb-5ef140bfee67@libero.it> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31026"; mail-complaints-to="usenet@ciao.gmane.io" Cc: jared@finder.org, emacs-devel@gnu.org To: Angelo Graziosi Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Jan 05 17:54:46 2025 Return-path: Envelope-to: ged-emacs-devel@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 1tUTtm-0007x2-Mw for ged-emacs-devel@m.gmane-mx.org; Sun, 05 Jan 2025 17:54:46 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tUTt3-0006Tc-97; Sun, 05 Jan 2025 11:54:01 -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 1tUTsz-0006TI-7q for emacs-devel@gnu.org; Sun, 05 Jan 2025 11:53:57 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tUTsy-00012F-KX; Sun, 05 Jan 2025 11:53:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=khCF0pRuK/HHY7CTp6dGFKn+IDdG4VXfaZJl6LRVBoM=; b=BimNnWaWo+7s 6J6qhiC/P98+Kh+Ay+OTN4dZkoGV6F3oAZbs+vhoyw8L5x34wWNMy4yaQ/iplu8sub7A7JZDDD797 gRMPGM1u8D2u3OX7dTp+u8lZwW0CcpIFTIm9t4lrbznzk5fTGQ9Cbg00tqmxys0mBFMdUtg3iyGQ2 zEm5bDvbg+u3nVKV6/1qO8jRDpNMwNe6bNSpOfzEG6NF5iU0//ADm/sE/qjrfxrX61zXKJ7YAdh3b HrAW8MWWeq5GB/w2OaS4WAWxjlFnistEVqpcZK4Ft2p9/yyl22bo2rnGoAaGrJzYVqNif6TSCmDTH 9pdpWtcT3q+ZJLRDelCBzw==; In-Reply-To: <8d232192-85d3-49f9-b2fb-5ef140bfee67@libero.it> (message from Angelo Graziosi on Sun, 5 Jan 2025 13:12:43 +0100) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:327723 Archived-At: > Date: Sun, 5 Jan 2025 13:12:43 +0100 > Cc: emacs-devel@gnu.org > From: Angelo Graziosi > > > 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)))) It is strange that you have TERM set to xterm-256color, though. I use the same Windows Terminal, both with cmd.exe and with MSYS Bash, and I don't see this value in any of them. What shell do you run inside the terminal? Are you sure this setting of TERM is not something your shell init files do? Or maybe you use WSL or something? The reason we added these tests to xterm.el is that some terminals which set TERM to xterm don't really support the features we need, and turning xterm-mouse-mode on those terminals has adverse effects. xterm-mouse-mode was not enabled by default until very recently, so terminals that don't pass these tests should work like they did before we turned on xterm-mouse-mode by default on all terminals that pretend to be xterm.