X11 Window System applications normally use two separate selections for copy & pasting text between windows: PRIMARY is whatever text has most recently been selected with the mouse, and CLIPBOARD is what has most recently been copied with Ctrl-C (in applications that support the Ctrl-XCV keys for cut/copy/paste).
In a Pluto notebook in e.g. Ubuntu Linux 20.04 running the X11 Windows System and Firefox 106, this does not work as expected in cells:
Expected behaviour: Selecting some text with the mouse from a cell should place the text into the PRIMARY selection. Afterwards, clicking the middle-mouse button in an xterm should then paste the text selected in the cell into stdin of the terminal application.
Actual behaviour: Selecting some text with the mouse from a cell does not place the selected text into the PRIMARY selection. Therefore, clicking the middle mouse-button in an xterm does not paste the text selected in the cell into the terminal application.
This problem only occurs when selecting text in cells. Selecting text from elsewhere on the notebook page correctly makes the selected text available to other applications in the PRIMARY selection. Selecting text in a cell followed by pressing Ctrl-C does correctly make the selected text available from the CLIPBOARD selection.
This is a problem for anyone who wants to copy selected text from a Pluto cell into a terminal application, such as xterm, because terminals cannot access the CLIPBOARD selection via the usual Ctrl-V key, because Ctrl-V is just one of the control codes that a terminal has to pass on to the terminal application. Terminal emulators usually can only paste the PRIMARY selection.
Simon Tatham's tool xcopy can be used to read both the PRIMARY selection (xcopy -r) and the CLIPBOARD selection (xcopy -r -b). At present, selecting text in a Pluto cell unexpectedly does not affect the output of xcopy -r.
X11 Window System applications normally use two separate selections for copy & pasting text between windows:
PRIMARY
is whatever text has most recently been selected with the mouse, andCLIPBOARD
is what has most recently been copied with Ctrl-C (in applications that support the Ctrl-XCV keys for cut/copy/paste).In a Pluto notebook in e.g. Ubuntu Linux 20.04 running the X11 Windows System and Firefox 106, this does not work as expected in cells:
Expected behaviour: Selecting some text with the mouse from a cell should place the text into the
PRIMARY
selection. Afterwards, clicking the middle-mouse button in an xterm should then paste the text selected in the cell into stdin of the terminal application.Actual behaviour: Selecting some text with the mouse from a cell does not place the selected text into the
PRIMARY
selection. Therefore, clicking the middle mouse-button in an xterm does not paste the text selected in the cell into the terminal application.This problem only occurs when selecting text in cells. Selecting text from elsewhere on the notebook page correctly makes the selected text available to other applications in the
PRIMARY
selection. Selecting text in a cell followed by pressing Ctrl-C does correctly make the selected text available from theCLIPBOARD
selection.This is a problem for anyone who wants to copy selected text from a Pluto cell into a terminal application, such as
xterm
, because terminals cannot access theCLIPBOARD
selection via the usual Ctrl-V key, because Ctrl-V is just one of the control codes that a terminal has to pass on to the terminal application. Terminal emulators usually can only paste thePRIMARY
selection.Simon Tatham's tool xcopy can be used to read both the
PRIMARY
selection (xcopy -r
) and theCLIPBOARD
selection (xcopy -r -b
). At present, selecting text in a Pluto cell unexpectedly does not affect the output ofxcopy -r
.