From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: YAMAMOTO Mitsuharu Newsgroups: gmane.emacs.devel Subject: Re: x-selection-exists-p vs x-get-selection Date: Mon, 05 May 2008 09:59:49 +0900 Organization: Faculty of Science, Chiba University Message-ID: References: <002501c8ad70$af83c510$0200a8c0@us.oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Trace: ger.gmane.org 1209949219 13058 80.91.229.12 (5 May 2008 01:00:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 5 May 2008 01:00:19 +0000 (UTC) Cc: drew.adams@oracle.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon May 05 03:00:55 2008 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 1Jsp4O-0000NS-5F for ged-emacs-devel@m.gmane.org; Mon, 05 May 2008 03:00:44 +0200 Original-Received: from localhost ([127.0.0.1]:59204 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jsp3g-0003cB-KO for ged-emacs-devel@m.gmane.org; Sun, 04 May 2008 21:00:00 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Jsp3c-0003c3-J4 for emacs-devel@gnu.org; Sun, 04 May 2008 20:59:56 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Jsp3b-0003br-3R for emacs-devel@gnu.org; Sun, 04 May 2008 20:59:56 -0400 Original-Received: from [199.232.76.173] (port=59424 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jsp3a-0003bo-Sm for emacs-devel@gnu.org; Sun, 04 May 2008 20:59:54 -0400 Original-Received: from mathmail.math.s.chiba-u.ac.jp ([133.82.132.2]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Jsp3W-0004dt-KF; Sun, 04 May 2008 20:59:51 -0400 Original-Received: from church.math.s.chiba-u.ac.jp (church [133.82.132.36]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id 3966A2C40; Mon, 5 May 2008 09:59:49 +0900 (JST) In-Reply-To: User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/23.0.50 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) X-detected-kernel: by monty-python.gnu.org: NetBSD 3.0 (DF) 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:96471 Archived-At: >>>>> On Sun, 04 May 2008 21:33:16 +0300, Eli Zaretskii said: >> FWIW, macselect.c for the Mac Carbon port is trying to simulate the >> semantics on X11 by reusing the most of the code in xselect.c. On >> Mac, there are multiple interapplication storages called "scrap"s, >> and the clipboard is actually a particular scrap named >> "com.apple.scrap.clipboard". The selection such as PRIMARY or >> SECONDARY may or may not be associated with a scrap. > AFAIK, this cannot be done on Windows, since there's only one such > storage buffer, called the clipboard. Mac OS 9 also had only one such storage buffer, but the selection SECONDARY could be "own"ed or "disown"ed. > Each time you cop or cut text from some application, the clipboard > contents gets automatically overwritten with the new material. And > there's no meaning to ``owner'' of the clipboard contents, since the > stuff is already in the clipboard and is ``owned'' by the GUI > subsystem of the OS. The "owner" of the clipboard means who cleared (and optionally set data to) the clipboard most recently. The point of xselect.c and macselect.c is that there are two types of selection implemantations, local and foreign ones. The local selection is just an Emacs internal storage, and the foreign selection is interapplication storage such as the clipboard. They share almost the same set of operations such as owning, disowning, and getting data. On Mac, operations on the selection (Emacs symbol) CLIPBOARD act both on local and foreign selections, and those on the SECONDARY act on only the local selection because it doesn't have the corresponding foreign one. YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp