Subject: bug#27442: Un-obsolete x-clipboard-yank, or provide analogous functional

From: Constantine Kharlamov <[email-masked]>
Date: Wed, 21 Jun 2017 17:29:40 +0300

Emacs says: "x-clipboard-yank is obsolete since 25.1; use ‘clipboard-yank’ instead." The problem is that clipboard-yank doesn't work same way as x-clipboard-yank does.

x-clipboard-yank always uses clipboard content, which is exactly what I need. I.e. if I set (setq select-enable-clipboard nil) to not clutter my clipboard with kills, I only get content from the clipboard. (don't get me wrong, kill-ring is very cool, and I extensively use it in evil-mode. But I prefer to explicitly point when I want a content in the clipboard, which happens an order of magnitude rarer than usage of kill-ring).

clipboard-yank uses a kill-ring instead. So if I set (setq select-enable-clipboard nil), every usage of the function gives me a random text that may or may not be in the clipboard.