Bug 119578 - [GlobalActions] [Workbench] Multi-Clipboard
Summary: [GlobalActions] [Workbench] Multi-Clipboard
Status: RESOLVED DUPLICATE of bug 45848
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.2   Edit
Hardware: All All
: P5 normal (vote)
Target Milestone: ---   Edit
Assignee: Paul Webster CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2005-12-07 02:32 EST by Ali Gholami Rudi CLA
Modified: 2009-06-22 11:06 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ali Gholami Rudi CLA 2005-12-07 02:32:02 EST
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.
Comment 1 Kim Horne CLA 2005-12-07 09:04:29 EST
I'm not sure if this request should be routed to SWT or stay with us...
Comment 2 Michael Van Meekeren CLA 2005-12-07 09:17:44 EST
hmm.. I'd like to start by seeing if SWT has considered multi-clipboards and what the current platform support is.
Comment 3 Steve Northover CLA 2005-12-07 12:55:38 EST
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.
Comment 4 Veronika Irvine CLA 2005-12-07 14:01:58 EST
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.
Comment 5 Ali Gholami Rudi CLA 2005-12-08 02:06:51 EST
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.
Comment 6 Billy Biggs CLA 2005-12-10 13:27:13 EST
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.
Comment 7 Mark Feber CLA 2009-06-16 18:46:08 EDT
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
Comment 8 Boris Bokowski CLA 2009-06-22 11:06:43 EDT
(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 ***