emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: x-selection-exists-p vs x-get-selection


From: YAMAMOTO Mitsuharu
Subject: Re: x-selection-exists-p vs x-get-selection
Date: Mon, 05 May 2008 09:59:49 +0900
User-agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (Shij┼Ź) APEL/10.6 Emacs/23.0.50 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI)

>>>>> On Sun, 04 May 2008 21:33:16 +0300, Eli Zaretskii <address@hidden> 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
                                address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]