I find the clipboard can be an incredibly useful tool. The problem is that although it works well in some environments, it is sorely lacking in standardization, network transparency, and functionality. I want the following:
vim) as I see fitPretty basic requirements, eh?
Serious computer users use clipboards in one form or another all the time.
However, implementation of this simple idea varies considerably from platform to platform and even from tool to tool.
On common desktop platforms, there is usually only one clipboard, and it can only contain a single element.
Clipboards on Windows and MacOS generally work well, although sometimes keystrokes are not consistent between applications.
By contrast, the X Windows System is a nightmare of clipboards; there are three defined in the specification, and consistency varies wildly depending on the user's choice of window manager and applications.
Compounding this problem is the fact that many common tools (such as emacs and vim) implement their own clipboard, and these are not generally interoperable with the ones provided by the host platform.
Imagine having three computers on your desk, all running different operating systems (for this example, Linux, MacOS, and Windows).
Now imagine that you are checking your email in mutt (on Linux of course) and discover that a friend has sent you the URL of his latest spam sculpture.
Being a webmaster, you want to make sure this site is functional in all the major browsers, not just the ones that run on Linux, since everyone deserves to admire spam sculptures.
You copy the URL from mutt onto your global clipboard, which is shared with the MacOS and Windows computers also on your desk.
A couple keystrokes later, you have pasted the URL into Safari and Internet Explorer, and saved yourself a fair bit of trouble.
This in itself would be very powerful, but there's more to it. The clipboard specification I propose requires that each clipboard consist of a stack, which means that old data will be retained. Throughout the day, you continue use of your global clipboard; it's useful, isn't it? You can also detach a given machine from the clipboard so you can work on it independently. However, later in the day a colleague contacts you via AIM and asks for the URL of the latest spam sculptures. Well, thanks to the improved clipboard, you can look back through the stack and find the element by date/time, which program inserted it, the last program to manipulate it, the program that last read it, or of course the data itself. You find it two seconds later, move it to the top of the stack, and send it to your colleague.
The standard I propose won't break anything as it is now: Windows, MacOS, and similar environments would just have a single clipboard shared between all applications by default, and the X Window System would have three clipboards defined to match its default state. However, the standard would allow one to combine or separate clipboards in an unprecedented way. Users of platforms with multiple desktops, for example, could have a separate clipboard for each desktop.
Firstly, my standard would involve at least two pieces: a server, or program that manages the actual data in the clipboard, and the client, which is the user's program which desires to manipulate the clipboard. Servers would be required to implement multiple clipboards. Each would have a name and consist of a stack, which would contain the data in the clipboard along with metadata.
Clients would be required to implement the following operations:
The following functionality would be optional but encouraged (and for big vendors like Apple and MS, adding functionality at the OS level would make all applications compatible):