From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: X selections and multi tty Date: Thu, 26 May 2011 22:47:55 -0400 Message-ID: <87hb8guaec.fsf@stupidchicken.com> References: <87hb8h2i3b.fsf@stupidchicken.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1306464486 23247 80.91.229.12 (27 May 2011 02:48:06 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 27 May 2011 02:48:06 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri May 27 04:48:02 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QPn5m-0000Hj-85 for ged-emacs-devel@m.gmane.org; Fri, 27 May 2011 04:48:02 +0200 Original-Received: from localhost ([::1]:60923 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QPn5l-0000Wc-K6 for ged-emacs-devel@m.gmane.org; Thu, 26 May 2011 22:48:01 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:58013) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QPn5j-0000WM-0h for emacs-devel@gnu.org; Thu, 26 May 2011 22:47:59 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QPn5h-000465-VF for emacs-devel@gnu.org; Thu, 26 May 2011 22:47:58 -0400 Original-Received: from vm-emlprdomr-04.its.yale.edu ([130.132.50.145]:56152) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QPn5h-000461-R8 for emacs-devel@gnu.org; Thu, 26 May 2011 22:47:57 -0400 Original-Received: from furball (dhcp128036226147.central.yale.edu [128.36.226.147]) (authenticated bits=0) by vm-emlprdomr-04.its.yale.edu (8.14.4/8.14.4) with ESMTP id p4R2luf9029428 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 26 May 2011 22:47:56 -0400 Original-Received: by furball (Postfix, from userid 1000) id C58D4160665; Thu, 26 May 2011 22:47:55 -0400 (EDT) In-Reply-To: (Stefan Monnier's message of "Thu, 26 May 2011 21:47:05 -0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-Scanned-By: MIMEDefang 2.71 on 130.132.50.145 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 130.132.50.145 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:139750 Archived-At: Stefan Monnier writes: > I think it only checks to see if it owns the selection *on the same > "display"*, just via some other "terminal" (since several terminals can > share the same display). > > This distinction between terminals and displays is pretty subtle and I'm > sure we have bugs around it in the keyboard code. So-called > terminal-local variables are actually keyboard-local (aka > "display"-local), but terminal-parameter is really per-terminal rather > than per-keyboard. And we have somewhat explicit visibility of > terminals but OTOH keyboards are hidden pretty deep from Elisp. I see. The way Vselection_alist is used (i.e. it's looked up when Emacs receives X events, and we know which X window got the event), we should be safe making it a terminal parameter. The main thing is not to have a global variable that can get clobbered by events coming in to windows on different displays. I'll give that a shot.