From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [multi-tty] xt-mouse.el does not work in emacsclient frames Date: Sat, 19 May 2007 10:03:55 -0400 Message-ID: References: <200705170044.l4H0i46s007856@oogie-boogie.ics.uci.edu> <200705182017.l4IKHnqa025118@oogie-boogie.ics.uci.edu> <200705182055.l4IKt3iQ025860@oogie-boogie.ics.uci.edu> <200705190212.l4J2CCiP003153@oogie-boogie.ics.uci.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1179583447 16437 80.91.229.12 (19 May 2007 14:04:07 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 19 May 2007 14:04:07 +0000 (UTC) Cc: bob@rattlesnake.com, emacs-devel@gnu.org To: Dan Nicolaescu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat May 19 16:04:06 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HpPXR-00078C-8T for ged-emacs-devel@m.gmane.org; Sat, 19 May 2007 16:04:05 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HpPXQ-0003uX-EJ for ged-emacs-devel@m.gmane.org; Sat, 19 May 2007 10:04:04 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HpPXN-0003uI-FO for emacs-devel@gnu.org; Sat, 19 May 2007 10:04:01 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HpPXN-0003u5-2B for emacs-devel@gnu.org; Sat, 19 May 2007 10:04:01 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HpPXM-0003u2-RB for emacs-devel@gnu.org; Sat, 19 May 2007 10:04:00 -0400 Original-Received: from 191.red-83-44-183.dynamicip.rima-tde.net ([83.44.183.191] helo=alfajor.home) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HpPXL-00067A-Fw for emacs-devel@gnu.org; Sat, 19 May 2007 10:04:00 -0400 Original-Received: by alfajor.home (Postfix, from userid 20848) id CA1421C147; Sat, 19 May 2007 10:03:55 -0400 (EDT) In-Reply-To: <200705190212.l4J2CCiP003153@oogie-boogie.ics.uci.edu> (Dan Nicolaescu's message of "Fri\, 18 May 2007 19\:12\:11 -0700") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux) X-detected-kernel: Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:71387 Archived-At: > Here is what xterm-mouse-mode does in order to do its job: > - send an escape sequence to the terminal to tell it to send events > for mouse activity > - set up a function that processes the mouse events An important detail of this second point is that it sets it up on function-key-map, which in the multi-tty branch is now made terminal-local, IIUC. > In the multi-tty world when turning on xterm-mouse-mode the above > needs to be done for all the existing tty frames, and it would need to > be done when a new tty frame is created (maybe by adding something to > term-init-hook?). Actually, I don't think that would be right either: when calling xterm-mouse-mode, the user implicitly tells Emacs "trust me, this is a terminal that understands the xterm-mouse protocol". If you turn it into a global (i.e. all terminal) mode, then it can break if some of the terminals don't understand the xterm-mouse protocol. I think xterm-mouse-mode should not be global any more but terminal-local, so the user would need to set it up for each and every terminal where she wants to use it. E.g., it should be possible to use xterm-mouse-mode and t-mouse-mode at the same time. Stefan