Sets the primary selection.
capi
set-selection self value &optional string plist => result
self⇩ |
A displayed CAPI pane or interface. |
value⇩ |
A Lisp object (not necessarily a string) to make available within the local Lisp image. |
string⇩ |
The string representation of value to export, or nil . |
plist⇩ |
A property list of additional format/value pairs to export. |
result |
A string, or nil . |
The function set-selection
sets the primary selection associated with self.
If string is non-nil, then the text of the primary selection is set to string. If string is nil
and value is a string, then text of the primary selection is set to value. Otherwise, no text is set for the primary selection.
In addition, value is made available within the local Lisp image when calling selection.
plist is a plist of additional format/value pairs to export to the primary selection. The currently supported formats are as described for selection. You can export more than one format simultaneously.
On Microsoft Windows there is no notion of selection, so this mechanism is internal to Lisp.
Note that X applications may or may not use the primary selection for their paste operations. The most likely explanation for apparent inconsistencies after set-selection
is that the pasting application does not use the primary selection. For instance, Emacs is configurable by the variable interprogram-paste-function.
CAPI User Guide and Reference Manual (Macintosh version) - 01 Dec 2021 19:31:27