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: Mon, 21 May 2007 10:12:51 -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> <85mz00sl4p.fsf@lola.goethe.zz> <86abvyib3i.fsf@lola.quinscape.zz> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1179756790 30593 80.91.229.12 (21 May 2007 14:13:10 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 21 May 2007 14:13:10 +0000 (UTC) Cc: bob@rattlesnake.com, Dan Nicolaescu , emacs-devel@gnu.org To: David Kastrup Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon May 21 16:13:07 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 1Hq8dC-0003BU-Gx for ged-emacs-devel@m.gmane.org; Mon, 21 May 2007 16:13:02 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hq8dC-00034H-0Z for ged-emacs-devel@m.gmane.org; Mon, 21 May 2007 10:13:02 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Hq8d6-00032s-Oa for emacs-devel@gnu.org; Mon, 21 May 2007 10:12:56 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Hq8d6-00032a-4c for emacs-devel@gnu.org; Mon, 21 May 2007 10:12:56 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hq8d5-00032R-Ue for emacs-devel@gnu.org; Mon, 21 May 2007 10:12:56 -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 1Hq8d3-0004w6-CE; Mon, 21 May 2007 10:12:55 -0400 Original-Received: by alfajor.home (Postfix, from userid 20848) id 8931C1C659; Mon, 21 May 2007 10:12:51 -0400 (EDT) In-Reply-To: <86abvyib3i.fsf@lola.quinscape.zz> (David Kastrup's message of "Mon\, 21 May 2007 15\:02\:09 +0200") 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:71512 Archived-At: > But enabling something like xterm-mouse-mode is very likely intended > to work across a given tty. On the other hand, if one connects from > multiple different ttys, there might be ttys that don't work using it. > Again, I think it would be best if such a mode, if global, would upon > opening any tty have the opportunity to check whether it wants to > impose on that tty (figuring out in some manner whether this tty can > actually support it), then record its state in a terminal-local > variable. Instead of having global-xterm-mouse-mode and xterm-mouse-mode, we may prefer to name them respectively xterm-mouse-mode and internal-xterm-mouse-mode (or terminal-xterm-mouse-mode). I don't care either way. But we need both if we want the code to be clean. > However, this implies several things: > a) Lisp code can declare terminal-local variables I'd rather have terminal objects that come with plists, just as we have for processes, symbols, overlays, frames, ... So instead of using hacks like terminal-local variables, we use clean accessor functions that look at (plisp-get (terminal-plist (frame-terminal (selected-frame)))). > b) Lisp code can fire upon terminal changes or iterate through terminals I think this "or" is wrong. Just iterating is not enough: a hook is necessary. W.r.t. the hook, maybe term-setup-hook is all we need. But I also think we need to be able to iterate through the terminals. I currently occasionally need to do that already with the X11 displays and I hack it up by looping through all frames collecting the different `display' properties. Stefan