Subject: Re: bug#40375: 27.0.50; yank unexpectedly depends on progn

From: Markus Triska <[email-masked]>
Date: Mon, 13 Apr 2020 20:52:48 +0200

Eli Zaretskii <[email-masked]> writes:

> Do you have some clipboard-managing software installed and active?  If
> so, can you disable it?

To the best of my knowledge, I have no such tool installed or active.

> When the system clipboard holds stuff from another application, C-y
> will by default yank that first.  If some software on your system
> rearranges the clipboard in some way that makes Emacs think the stuff
> in the clipboard was copied there after you killed something in Emacs,
> Emacs will behave as you describe.
>
> IOW, I don't believe this is an Emacs problem.

>From the documentation of `yank', I got the impression that the most
recently killed text should reliably be inserted in the example I
posted, because the description of `yank' describes it as:

   Reinsert ("paste") the last stretch of killed text.
   More precisely, reinsert the most recent kill, which is the
   stretch of killed text most recently killed OR yanked.

However, from your description, it seems this documentation is not
accurate, because the clipboard may unexpcetedly also play a role.

Could you please consider updating the documentation if necessary?
Alternatively, is there a way to get `yank' to do what this states,
i.e., to always insert the most recently killed or yanked text,
disregarding the clipboard contents of the operating platform?

Thank you and all the best,
Markus