Emacs vs. Gnome Cut-And-Paste Tug of War
I have problems when I do cut-and-paste or copy-and-paste between Emacs and other applications running under Gnome(Fedora 11).
Specifically, it works in one direction just fine, but fails in the other: I have to use X-windows cut-and-paste instead. That is, I can copy and paste in Eclipse, and then Ctl-Y yanks into Emacs just fine. But when I try to go the other way (using Ctl-W in Emacs, Ctl-V in Eclipse), I get nothing. I have to highlight the whole file with the mouse cursor in Emacs, carefully position the mouse-cursor in Eclipse and simulate middle-click by clicking both left & right mouse buttons. It is a pretty recent version of Emacs, 22.1. Eclipse is Galileo. |
clipboard vs. emacs buffer
Quote:
When you ctrl-w (cut) and ctrl-Y (yank) in Emacs, you operate from the current buffer into a separate emacs buffer. Same data but different places. Emacs has an Edit menu with cut and paste entries. These operate against the clipboard. ~~~ 0;-Dan |
Quote:
That is what is so strange to me. I could understand it if Emacs simply failed to use the same clipboard at all, but that is not what is happening. Or is it? When I mark the text just before doing ctl-C in Eclipse, is the same region marked for X-windows whether or not I used the mouse? Also, now that I am back on the Fedora11 system, I verified by trying it out. It is the Emacs to Eclipse direction that fails. The other direction doesn't always work, but it often does. That is, I mark the entire R.xml file using ctl-A, copy w/ ctl-C, switch over to Emacs; then I try to 'yank' the text with ctl-Y. Usually, I get the text I marked. Interestingly enough, this time at least, the text I just yanked also shows up under Emacs in Edit>Paste from Kill Menu. This is the case where I use ctl-Y. I use ctl-W only when going in the other direction, from Emacs to Eclipse. Substitute 'Eclipse' with any other viewing/editing application under Gnome and I still get the same general behavior. Finally, I got the version# wrong for my installation of Emacs: it is 23.1.1. Or am I confusing "kill ring" with "clipboard"? It looks like the two are sometimes the same, but with no consistency. If, after all, ctl-Y operated exclusively with the kill ring, and the latter never duplicated the clipboard, then what I just did (as described above) would be impossible. |
All times are GMT -5. The time now is 04:45 PM. |