LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-16-2009, 09:27 PM   #1
mejohnsn
Member
 
Registered: Sep 2009
Posts: 174

Rep: Reputation: Disabled
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.
 
Old 11-16-2009, 10:32 PM   #2
SaintDanBert
Senior Member
 
Registered: Jan 2009
Location: "North Shore" Louisiana USA
Distribution: Mint-20.1 with Cinnamon
Posts: 1,735
Blog Entries: 3

Rep: Reputation: 107Reputation: 107
clipboard vs. emacs buffer

Quote:
Originally Posted by mejohnsn View Post
...
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.
...
When you ctrl-X (cut) and ctrl-v (paste) in Eclipse you operated from the clipboard.

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
 
Old 11-16-2009, 11:41 PM   #3
mejohnsn
Member
 
Registered: Sep 2009
Posts: 174

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by SaintDanBert View Post
When you ctrl-X (cut) and ctrl-v (paste) in Eclipse you operated from the clipboard.

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
It is possible that I was not clear enough about when I did ctl-w and when ctl-y. In both cases, I was operating on the current buffer. But they are separate cases. And in the one case, the case that works, clearly Emacs was using the same clipboard as Eclipse used. But when going the other direction, it does not.

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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Survey says: Open Source Tug of War: Philosophy vs Money and ... LXer Syndicated Linux News 0 04-12-2006 03:54 AM
cut , paste or grep ziox Programming 1 12-15-2004 10:51 PM
xmessage cut and paste mlenehan Linux - General 3 06-17-2003 03:27 PM
cut and paste. argh! JustinHoMi Linux - General 7 11-12-2001 09:01 PM
cut and paste c0c0deuz Linux - Newbie 6 11-01-2001 12:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:48 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration