Type | Wish | Status | submitted | Date | 27-May-2013 09:51 |
---|---|---|---|---|---|
Version | r3 master | Category | Platform | Submitted by | johnk |
Platform | All | Severity | minor | Priority | low |
Summary | Extend clipboard:// implementation to all supported platforms |
---|---|
Description | Clipboard:// does not work correctly across all platforms |
Example code |
Linux -> Fail >> print read clipboard:// none Windows -> Success Mac -> Fail >> print read clipboard:// none |
Assigned to | n/a | Fixed in | - | Last Update | 12-Jun-2013 16:54 |
---|
Comments | |
---|---|
(0003863)
BrianH 6-Jun-2013 05:51 |
Clipboards in general don't work the same across platforms. In particular, there are platforms like Linux that don't have a single unified clipboard, they have several different clipboards with different APIs supported by different classes of apps. How would you propose to deal with that? |
(0003864)
johnk 6-Jun-2013 07:21 |
Based on my (non-exhaustive) search I agree that this looks surprisingly difficult in Linux without relying on large 3rd party gui toolkits. The Mac on the other hand looks like it might be possible. |
(0003865)
BrianH 6-Jun-2013 22:43 |
Relying on third-party toolkits would be OK if we only support them if they're already installed to support apps that use them. But that's not what I was talking about: Linux standard GUIs have multiple, incompatible clipboards, at the same time. In general, each GUI or non-G UI framework has a different clipboard. Linux itself doesn't have a clipboard at all.
Different approaches:
Fortunately R3 is primarily made for application building or integration. The standalone interpreter is just one such application, meant to assist in running one-off utility scripts, and maybe to be distributed in operating systems; it doesn't have to support a clipboard if the system doesn't have one. |
(0003866)
rgchris 7-Jun-2013 03:30 |
On Mac: there are pbcopy and pbpaste that provides comprehensive access to the Mac's clipboard. I wrote a wrapper in R2 for them: http://reb4.me/r/clipboard
I know it's a dependency, but as OS X is a stable, consistent platform it might be considered a safe one... |
(0003867)
johnk 7-Jun-2013 04:15 |
If the wrapper approach is acceptable for OS X then xclip could be used in a similar way to pbcopy/pbpaste. This approach is dependant on call/ouput and call/input. Not an ideal solution, but would be acceptable for me |
(0003868)
BrianH 7-Jun-2013 05:04 |
With the wrapper approach, the clipboard:// port will stop working when CALL is blocked for security. So that might work as a workaround, but not as a solution. |
(0003871)
IngoHohmann 12-Jun-2013 16:54 |
As far as I know, on Linux there are basically two clipboards,
a) where you can mark text, and paste it with middle mouse button b) cut/copy -> paste like in windows I'd say, rebol only needs to handle option b), which seems to be consistent with freedesktop.org. http://standards.freedesktop.org/clipboards-spec/clipboards-latest.txt |
Date | User | Field | Action | Change |
---|---|---|---|---|
12-Jun-2013 16:54 | IngoHohmann | Comment : 0003871 | Added | - |
7-Jun-2013 05:04 | BrianH | Comment : 0003868 | Added | - |
7-Jun-2013 04:15 | johnk | Comment : 0003867 | Added | - |
7-Jun-2013 03:30 | rgchris | Comment : 0003866 | Added | - |
6-Jun-2013 22:45 | BrianH | Comment : 0003865 | Modified | - |
6-Jun-2013 22:43 | BrianH | Comment : 0003865 | Added | - |
6-Jun-2013 07:21 | johnk | Comment : 0003864 | Added | - |
6-Jun-2013 05:51 | BrianH | Comment : 0003863 | Added | - |
27-May-2013 14:53 | johnk | Code | Modified | - |
27-May-2013 09:51 | johnk | Ticket | Added | - |