On Fri, 2002-09-27 at 14:58, Alexander Dupuy wrote:
> Karl DeBisschop wrote:
> > On my linux installs, I find that cut-and-paste only works within XXE,
> > there is no connection with cut-and-paste in emacs/X/gnome.
>
> > Is it likely an XXE limitation or something with my JVM, or something
>
> X windows has two different mechanisms for cut-and-paste; the primary
> selection, and the clipboard. There's a really good description of
> these ...
> It would be nice if XXE 2 would support X primary selections as well as
> clipboard; it's quite easy to retrofit - example code looks like this:
>
> > /**
> > * Copy a String to the system selection and possibly to the system
> > clipboard.
> > *
> > * @param s String to copy
> > * @param wantCopy if true additionally copy to system clipboard.
> > */
> > static final void copyToClipboard(final String s, boolean wantCopy)
> > {
> > final Toolkit tk = Toolkit.getDefaultToolkit();
> > final Clipboard pri = tk.getSystemSelection();
> > final Clipboard cb = tk.getSystemClipboard();
> > final StringSelection ss = new StringSelection(s);
> >
> > pri.setContents(ss,ss);
> >
> > if (wantCopy)
> > cb.setContents(ss,ss);
> > }
Yes, that would be nice.
It would also be nice if it would paste with unix button 2, even if the
paste came off some other clipboard.
> In the meantime, Karl, you can use tools that support explicit
> cut-and-paste via the clipboard, instead of the primary selection and
> middle-button paste. XEmacs has clipboard cut-and-paste on the menu
> (GNU emacs only supports primary selection and cut-buffers) and many
> other X apps, though not xterm, also provide menu-based cut-and-paste.
> The xclipboard X application, and KDE's klipper, can be useful to
> provide a bridge between the two mechanisms.
Thanks very much. I had actually stumbled across xclipboard when I first
had the problem. Not sure why it didn't work then, it does now.
Thanks again to everyone who responded.
--
Karl DeBisschop <kdebisschop at alert.infoplease.com>
Director, Software Engineering & Development
Information Please (http://www.infoplease.com)
617.542.6500 x2332