unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#56273: [REGRESSION] (x-clipboard-yank) pastes from kill-ring when `select-enable-clipboard` is t
@ 2022-06-28  6:31 Konstantin Kharlamov
       [not found] ` <handler.56273.B.165639801230868.ack@debbugs.gnu.org>
  2022-06-28 10:26 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 2 replies; 11+ messages in thread
From: Konstantin Kharlamov @ 2022-06-28  6:31 UTC (permalink / raw)
  To: 56273

After upgrade to latest development version at:

      05fe0faed4: "make clean" etc. problem now fixed on Solaris.

I found out that using (x-clipboard-yank) when `select-enable-
clipboard` is set to t randomly pastes stuff that is not in system
clipboard. I don't know exact commit that broke it, am in process of
bisecting right now. Latest one working that I found so far is
7055104358ad51b8c49e120851ee5d4d3c909e6d.


# Steps to reproduce

1. Create /tmp/.emacs file with the following content:

    (setq select-enable-clipboard nil
          inhibit-startup-screen t)

    (defun clipboard-yank-test ()
      (interactive)
      (let ((select-enable-clipboard t))
        (x-clipboard-yank)))

    (global-set-key "\C-y" 'clipboard-yank-test)
2. Launch `HOME=/tmp/ emacs`
3. Outside Emacs copy a word "test"
4. In Emacs ensure that `C-y` pastes word "test"
5. In Emacs, delete a different word in the *scratch* buffer, e.g. a
"create"
6. In Emacs, press C-y to paste current clipboard content

## Expected

A word "test" will be inserted as this is the one that is in the system
clipboard.

Note: the word "create" didn't replace content in the clipboard,
because global value of select-enable-clipboard is nil. So it still has
"test", and the C-y was expected to paste "test" as well due to
`select-enable-clipboard` being temporarily set to `t` in clipboard-
yank-test.

## Actual

The word you deleted in *scratch* buffer will be inserted instead of
"test".





^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2022-06-30 13:50 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-28  6:31 bug#56273: [REGRESSION] (x-clipboard-yank) pastes from kill-ring when `select-enable-clipboard` is t Konstantin Kharlamov
     [not found] ` <handler.56273.B.165639801230868.ack@debbugs.gnu.org>
2022-06-28  9:17   ` Konstantin Kharlamov
2022-06-28 10:26 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-06-28 21:26   ` Konstantin Kharlamov
2022-06-29  1:03     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-06-30 11:17       ` Constantine Kharlamov
2022-06-30 11:32         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-06-30 12:53           ` Konstantin Kharlamov
2022-06-30 13:01             ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-06-30 13:19               ` Konstantin Kharlamov
2022-06-30 13:50                 ` Konstantin Kharlamov

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).