From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jared Finder Newsgroups: gmane.emacs.devel Subject: Re: Enabling Xterm-Mouse-Mode Date: Mon, 09 Dec 2024 22:22:06 -0800 Message-ID: <23bae57db2082aebd7f79064599c218f@finder.org> References: <87o71p2o0a.fsf@posteo.net> <86ikrxkpj2.fsf@gnu.org> <87jzcd114q.fsf@posteo.net> <3d916e84b1c0662850a90b572ccc0a91@finder.org> <86cyi2hfm0.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=_53b1680fca5a6bb1ee5d944f4d8acd39" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4621"; mail-complaints-to="usenet@ciao.gmane.io" Cc: philipk@posteo.net, Emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Dec 10 07:23:08 2024 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 1tKteF-00010O-Um for ged-emacs-devel@m.gmane-mx.org; Tue, 10 Dec 2024 07:23:08 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tKtdW-00077x-UZ; Tue, 10 Dec 2024 01:22:23 -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 1tKtdR-00077i-MF for Emacs-devel@gnu.org; Tue, 10 Dec 2024 01:22:19 -0500 Original-Received: from greenhill.hpalace.com ([192.155.80.58]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tKtdP-0006n5-Gp; Tue, 10 Dec 2024 01:22:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=finder.org; s=2018; t=1733811726; bh=b4Ztujcnrn49nbCclzhELtMZDHKZ/FdMM9gXl28r8Dk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=g4FKFFrv0bLTmlKlbtUxXoen1LTc6WqwCPsGi8agdqV2keP7DA/t0m6rfTPgKhBzU ZqsqA0F/RROWhpT0YcW2NHoVtzX+RlS1yvDfde15X2s+pNQdssLzTmdPv7ldZdbbyc 856M4cBWC2sVhA8sR3n6Cfpyw8L2GuVBBsOwELKSpeJur87ahcfIFWjb/p+R33wSzL jD5eEN5LJ8Aq1e0mmKYJVnMqnzHB20L8ZH9dm09I3HXDIMKAaXfiIk384qw1VHJzro qP9JJyqlF7FFfk5S+3Qx92WzixDZf2gGyj8eZk2DATiGThEyzVDHTWtjnsnpH5aV2i rncZeAe9RUPnw== Original-Received: from mail.finder.org (unknown [192.155.80.58]) by greenhill.hpalace.com (Postfix) with ESMTPSA id D7FF11099; Tue, 10 Dec 2024 06:22:06 +0000 (UTC) In-Reply-To: X-Sender: jared@finder.org Received-SPF: pass client-ip=192.155.80.58; envelope-from=jared@finder.org; helo=greenhill.hpalace.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:326274 Archived-At: --=_53b1680fca5a6bb1ee5d944f4d8acd39 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed On 2024-12-08 08:35, Jared Finder wrote: > On 2024-12-07 22:07, Eli Zaretskii wrote: >>> Date: Sat, 07 Dec 2024 16:37:46 -0800 >>> From: Jared Finder >>> Cc: Eli Zaretskii , Emacs-devel@gnu.org >>> >>> As long as we can defer actually sending the mouse tracking escape >>> sequence until after init file load I think this is fine. All >>> terminals >>> I've worked with work fine with xterm-mouse-mode's defaults, but >>> since >>> there's so many different terminals I want to ensure user >>> compatibility >>> variables still work (currently just xterm-mouse-utf-8, I expect to >>> create a new one for bug #73469). >> >> So this would require some changes in the code, to make sure the >> escape sequences are delayed? > > Yes, some changes, though they are straightforward. > >>> Also, I expect this would only be done when the envvar TERM indicates >>> the user is on an xterm-compatible terminal. >> >> How do we know which ones are compatible? > > If Emacs decided to load term/xterm.el then the terminal advertised > itself as xterm compatible and I think we could enable > xterm-mouse-mode. There's no termcap entry for mouse support, sadly. Relying on term/xterm.el being loaded made the patch very straightforward because it gets loaded after user init files. Patch attached. -- MJF --=_53b1680fca5a6bb1ee5d944f4d8acd39 Content-Transfer-Encoding: base64 Content-Type: text/x-diff; name=0001-Enable-xterm-mouse-mode-by-default-in-xterm.patch Content-Disposition: attachment; filename=0001-Enable-xterm-mouse-mode-by-default-in-xterm.patch; size=2057 RnJvbSBlZWNjOTMxZThkYzU4NDg3Y2Q3MTBlZjE1OGZlMWUyMTZkYTBhNzE3IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBKYXJlZCBGaW5kZXIgPGphcmVkQGZpbmRlci5vcmc+CkRhdGU6 IE1vbiwgOSBEZWMgMjAyNCAyMjoxNjo0MCAtMDg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