Page 1 of 1

Problem with copy & paste into Konsole/Terminal/R

Posted: Tue Feb 05, 2013 8:45 pm
by KevinP
First of all, I'm not sure if I'm posting this in the right place because I'm not sure what the problem is.

A good 99% of everything I do in Konsole is using R. I write my scripts in gedit and then copy and paste them into R. (I only use R at the command line, no GUI.) If the script is short, no problem. However, longer scripts cause issues. They run fine at first but later lines get truncated causing errors. I've been working around this by copying and pasting in chunks (which works fine), but it gets annoying. Why can't I just copy and paste a script normally?

Some additional info:
  • Currently using Nadia KDE but it also happened with Julia Gnome as well. So is it a hardware issue? An R issue?
  • If I copy a long script, I can paste it into another document no problem, so it's not like the copy buffer is too small. (My scripts aren't THAT long!)
  • Other Linux/R users don't seem to have this issue.
  • I don't know what would happen if I pasted a long script into Konsole itself because writing that much terminal code is beyond my abilities.
  • I can tell if I'm going to get errors right away because the code, even the first part that's executing fine, appears double-spaced.
Any help? I've been doing this workaround for a good year now and it's pretty annoying.

Re: Problem with copy & paste into Konsole/Terminal/R

Posted: Mon Sep 02, 2013 6:08 am
by pepa
Same problem here:

it's probably not KDE specific. I get the same issue on Debian 7.1 Gnome 3.4. It's probably a Terminal issue -- the paste works fine betweeen text editor and e.g. Libre Office Write.

Re: Problem with copy & paste into Konsole/Terminal/R

Posted: Mon Sep 02, 2013 10:02 am
by cwsnyder
The symptoms you describe are typical of incorrect character/end-of-line encoding. The best I can suggest is to either drop R entirely, just using Konsole or another terminal, or to use a more predictable editor without the option of changing the end-of-line coding, such as vim, emacs, or nano.