Copy & Paste under Wayland

I’m using TeXmacs 2.1.4 on Linux under Wayland. Either on Kubuntu or Arch I get strange behaviors when using copy & paste with TeXmacs. Sometimes, I have to copy something a couple of times for the highlighted part to be copied at all. Sometimes pasting something will not be inserted as TeXmacs markup, but as plain text and and in even rarer cases TeXmacs crashes. Just for the record, Mogan shows the same behavior.

Is this something only affecting me?

Could you please give a minimal working environment? I am using Wayland (SwayWM) but I do not think that I encounter any issue of copy-paste either in TeXmacs or in Mogan.

Arch with latest Plasma 6.2.2 and another computer with Ubuntu 24.10 both running Wayland. Both have the same issues. It seems to work sometimes and fails next, with the buffer either being empty, converted to plain text or even causing TeXmacs to hang or crash after hitting paste. It seems to be happening more frequently when the copied parts contain tables or images.

Weirdly, this does not trigger at all when using the second or third paste bin from TeXmacs. So, I’ll file a bug report later.

This bug has to do with plasma+wayland. A quick fix for the specific combination is this.

2 Likes

That is very interesting. Running TeXmacs from terminal with “-platform wayland” did not seem to address the problem, but this seems to work with my limited tests. Thank you very much.