Next: , Previous: , Up: Using X Selections   [Contents][Index]


9.6.3 X Cut Buffers

X cut buffers are a different, older way of transferring text between applications. SXEmacs supports cut buffers for compatibility with older programs, even though selections are now the preferred way of transferring text.

X has a concept of applications "owning" selections. When you select text by clicking and dragging inside an application, the application tells the X server that it owns the selection. When another application asks the X server for the value of the selection, the X server requests the information from the owner. When you use selections, the selection data is not actually transferred unless someone wants it; the act of making a selection doesn’t transfer data. Cut buffers are different: when you "own" a cut buffer, the data is actually transferred to the X server immediately, and survives the lifetime of the application.

Any time a region of text becomes the primary selection in Emacs, Emacs also copies that text to the cut buffer. This makes it possible to copy text from an SXEmacs buffer and paste it into an older, non-selection-based application (such as Emacs 18).

Note: Older versions of Emacs could not access the X selections, only the X cut buffers.