Problem with copy & paste into Konsole/Terminal/R

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
KevinP

Problem with copy & paste into Konsole/Terminal/R

Post 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.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
pepa

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

Post 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.
cwsnyder

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

Post 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.
Locked

Return to “Software & Applications”