From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.devel Subject: Re: [multi-tty] xt-mouse.el does not work in emacsclient frames Date: Fri, 18 May 2007 19:12:11 -0700 Message-ID: <200705190212.l4J2CCiP003153@oogie-boogie.ics.uci.edu> References: <200705170044.l4H0i46s007856@oogie-boogie.ics.uci.edu> <200705182017.l4IKHnqa025118@oogie-boogie.ics.uci.edu> <200705182055.l4IKt3iQ025860@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 1179540896 28250 80.91.229.12 (19 May 2007 02:14:56 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 19 May 2007 02:14:56 +0000 (UTC) Cc: emacs-devel@gnu.org To: bob@rattlesnake.com Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat May 19 04:14:54 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 1HpET8-00020K-3m for ged-emacs-devel@m.gmane.org; Sat, 19 May 2007 04:14:54 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HpET7-0003oj-C3 for ged-emacs-devel@m.gmane.org; Fri, 18 May 2007 22:14:53 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HpET4-0003ob-9V for emacs-devel@gnu.org; Fri, 18 May 2007 22:14:50 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HpET3-0003oP-0R for emacs-devel@gnu.org; Fri, 18 May 2007 22:14:49 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HpET2-0003oM-Py for emacs-devel@gnu.org; Fri, 18 May 2007 22:14:48 -0400 Original-Received: from oogie-boogie.ics.uci.edu ([128.195.1.41]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HpET2-0000HJ-DC for emacs-devel@gnu.org; Fri, 18 May 2007 22:14:48 -0400 Original-Received: from mothra.ics.uci.edu (mothra.ics.uci.edu [128.195.6.93]) by oogie-boogie.ics.uci.edu (8.13.6/8.13.6) with ESMTP id l4J2CCiP003153; Fri, 18 May 2007 19:12:12 -0700 (PDT) In-Reply-To: (Robert J. Chassell's message of "Sat\, 19 May 2007 01\:04\:19 +0000 \(UTC\)") Original-Lines: 42 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (score=-0.627, required 5, autolearn=disabled, ALL_TRUSTED -1.44, INFO_TLD 0.81) X-ICS-MailScanner-From: dann@mothra.ics.uci.edu X-detected-kernel: Solaris 9 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:71362 Archived-At: "Robert J. Chassell" writes: > wrote > > emacs -Q -nw > M-x server-start RET > M-x xterm-mouse-mode RET > emacsclient -t > > Both when I start (with many arguments) a multi-tty Emacs in an RXVT > shell with -nw and when I start it in X (also with many arguments, > mostly the same), if I then run emacsclient -t in another RXVT shell, > and then turn on xterm-mouse-mode, the mouse works fine in both the > original instance and in the client. > > (Not using the vcursor patch.) > > When I start the multi-tty Emacs instance in an RXVT, the order in > which I start xterm-mouse-mode and emacsclient -t does not matter. > > But when I start the multi-tty Emacs instance in X, the order does > matter. When I start xterm-mouse-mode in the original in X before > starting emacsclient -t, then mouse mode fails in the client, although > when I invoke xterm-mouse-mode in the client, I receive the message > about disabling the mouse mode. If I then invoke it again in the > client, mouse mode succeeds. This behavior is not expected. 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 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?). Anyway this should not be too hard to do, so if somebody wants to do it, it would be great. Given that the behavior is still correct in the single tty case, it's not a priority...