Community
Participate
Working Groups
Having multi-clipboard (Kill Ring as in Emacs): In Emacs: 1) Each cut (Ctrl-w) or copy (Alt-w) is appended to the end of the clipboard list. 2) After performing a paste you can use (Alt-y) to change the pasted region with the next from clipboard list.
I'm not sure if this request should be routed to SWT or stay with us...
hmm.. I'd like to start by seeing if SWT has considered multi-clipboards and what the current platform support is.
I'm pretty sure that Windows has only one OLE clipboard. X has the selection clipboard concept but that is already modelled by SWT and is not what this bug is asking for. VI to confirm.
I think what you are asking for is that every time someone copies stuff to the clipboard, it is appended to a list. When the user pastes, they can choose to paste anything from the list. This is different from the default clipboard behaviour where the last thing copied to the clipboard is the only thing that can be pasted from the clipboard. The problem with the list concept is that the application doing this must take ownership of the system clipboard at all times. This is OK if you only have one application installed on your system that does this but if you have more than one, the applications keeping stealing ownership of the clipboard away from each other and you have a fight to the death. You could consider having this in a way that is only local to your application but you would have to decide what to do if another application takes ownership of the system clipboard.
Emacs works well with X-windows clipboard, too. When you paste (Ctrl-y) in emacs the default(system) clipboard is used, but when you do (Alt-y)s you browse in a local list of emacs clipboard(kill-ring). I mean always the system clipboard is the head of the list and other entries are what the program saves as clipboard history during copying and pasting in that program itself. Using this approach the local clipboard cannot be accessed by other programs. ie. system clipboard is the only way of copying text between programs.
I think this is an application-level service and not a toolkit service, so the bug should probably move back to Platform UI rather than SWT.
This behavior is now available in the Emacs+ plugin. See: http://www.eclipseplugincentral.com/modules.php?op=modload&name=Web_Links&file=index&req=viewlink&cid=1442 The relevant portion from the doc reads: Kill Ring Behavior - The kill ring expands the ability to retrieve killed text beyond the most recent kill/copy. The kill ring remembers recent line, region and word deletions (adjacent word deletions - forward or back - are collected into a single entry) as well as balanced expression (S-expression) deletions. By default, word deletions are not copied to the system clipboard; but balanced expression deletions are. The length of the kill ring defaults to 30 entries. These and other kill ring behaviors can be modified on the preferences page. * Yank (Ctrl-Y): Insert the last stretch of killed text * Yank-Pop (Alt-Y) or (ESC-Y): Replace a just-yanked stretch of killed text with a different stretch * Rotate Yank Pointer (Ctrl-Alt-Y): Rotate the yank pointer in the kill ring BTW, this is surely a duplicate of: https://bugs.eclipse.org/bugs/show_bug.cgi?id=45848
(In reply to comment #7) > BTW, this is surely a duplicate of: > https://bugs.eclipse.org/bugs/show_bug.cgi?id=45848 Thanks for the pointers! *** This bug has been marked as a duplicate of bug 45848 ***