The standard advice for reading the clipboard on OSX is to use the
pipe("pbpaste") connection, but I'm finding it misses the last line.  (I
believe the last line in my examples generally doesn't include any EOL
marker.)  For example, if I highlight these three lines:

line 1
line 2
line 3

and copy to the clipboard, then readLines(pipe("pbpaste")) gives

[1] "line 1" "line 2"

in R.app or R in a terminal.  If I paste them here, I get

line 1
line 2
line 3

with the cursor left on the third line after the 3.  In a console, echo
`pbpaste` gives

line 1 line 2 line 3

so the problem isn't (only) with pbpaste.

Duncan Murdoch

_______________________________________________
R-SIG-Mac mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/r-sig-mac

Reply via email to