GNU bug report logs - #56325
[REGRESSION] (clipboard-yank) always pastes from kill-ring after text copy

Previous Next

Package: emacs;

Reported by: Konstantin Kharlamov <hi-angel <at> yandex.ru>

Date: Thu, 30 Jun 2022 13:49:02 UTC

Severity: normal

Done: Po Lu <luangruo <at> yahoo.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 56325 in the body.
You can then email your comments to 56325 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#56325; Package emacs. (Thu, 30 Jun 2022 13:49:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Konstantin Kharlamov <hi-angel <at> yandex.ru>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 30 Jun 2022 13:49:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Konstantin Kharlamov <hi-angel <at> yandex.ru>
To: bug-gnu-emacs <at> gnu.org
Subject: [REGRESSION] (clipboard-yank) always pastes from kill-ring after
 text copy
Date: Thu, 30 Jun 2022 16:48:19 +0300
After upgrade to latest development version at:

      fb0d95984b: Put the obsoletion earlier in the *Help* buffer

I found out that using (clipboard-yank) and (x-clipboard-yank) when
`select-enable-clipboard` is set to t, after copying a text to
clipboard once, results in them pasting from kill-ring instead of
clipboard.

# 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))
        (clipboard-yank)))
    (global-set-key "\C-y" 'clipboard-yank-test)

    (defun clipboard-copy-fixed ()
      (interactive)
      (let ((select-enable-clipboard t))
        (clipboard-kill-ring-save (region-beginning)(region-end))))
    (global-set-key "\M-w" 'clipboard-copy-fixed)

2. Launch `HOME=/tmp/ emacs`
3. [you're in a *scratch* buffer] Move caret till word "create" on the
2nd line, select it by pressing M-f, then copy to the system clipboard
by pressing M-w
4. Move caret to another word, e.g. "file"
5. Delete the word "file" by pressing M-d
5. Press C-y to paste the current clipboard content

## Expected

A word "create" will be inserted as it is in the system clipboard.

Note: (clipboard-yank-test) pastes from the system clipboard not the
kill-ring due to `select-enable-clipboard` being set locally to t.

## Actual

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#56325; Package emacs. (Thu, 30 Jun 2022 21:02:02 GMT) Full text and rfc822 format available.

Message #8 received at 56325 <at> debbugs.gnu.org (full text, mbox):

From: Konstantin Kharlamov <hi-angel <at> yandex.ru>
To: 56325 <at> debbugs.gnu.org
Cc: luangruo <at> yahoo.com
Subject: Re: bug#56325: [REGRESSION] (clipboard-yank) always pastes from
 kill-ring after text copy
Date: Fri, 01 Jul 2022 00:01:34 +0300
The problem is bisected to commit:

	16174d796f86fe Avoid extraneous selection querying if we own
the selection

Po Lu, sorry :)

Note that this is a problem different from #56273. In particular, the
problem in #56273 couldn't be reproduced by using (clipboard-yank) as
opposed to (x-clipboard-yank). However this one is reproduced with
both.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#56325; Package emacs. (Fri, 01 Jul 2022 02:24:01 GMT) Full text and rfc822 format available.

Message #11 received at 56325 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Konstantin Kharlamov <hi-angel <at> yandex.ru>
Cc: 56325 <at> debbugs.gnu.org
Subject: Re: bug#56325: [REGRESSION] (clipboard-yank) always pastes from
 kill-ring after text copy
Date: Fri, 01 Jul 2022 10:23:37 +0800
Konstantin Kharlamov <hi-angel <at> yandex.ru> writes:

> After upgrade to latest development version at:
>
>       fb0d95984b: Put the obsoletion earlier in the *Help* buffer
>
> I found out that using (clipboard-yank) and (x-clipboard-yank) when
> `select-enable-clipboard` is set to t, after copying a text to
> clipboard once, results in them pasting from kill-ring instead of
> clipboard.

Should be fixed now.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#56325; Package emacs. (Fri, 01 Jul 2022 07:11:02 GMT) Full text and rfc822 format available.

Message #14 received at 56325 <at> debbugs.gnu.org (full text, mbox):

From: Konstantin Kharlamov <hi-angel <at> yandex.ru>
To: Po Lu <luangruo <at> yahoo.com>
Cc: 56325 <at> debbugs.gnu.org
Subject: Re: bug#56325: [REGRESSION] (clipboard-yank) always pastes from
 kill-ring after text copy
Date: Fri, 01 Jul 2022 10:10:07 +0300
> Should be fixed now.

Thank you, I confirm the problem is no longer reproducible with latest
master at efc2a878de




Reply sent to Po Lu <luangruo <at> yahoo.com>:
You have taken responsibility. (Fri, 01 Jul 2022 08:28:01 GMT) Full text and rfc822 format available.

Notification sent to Konstantin Kharlamov <hi-angel <at> yandex.ru>:
bug acknowledged by developer. (Fri, 01 Jul 2022 08:28:02 GMT) Full text and rfc822 format available.

Message #19 received at 56325-done <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Konstantin Kharlamov <hi-angel <at> yandex.ru>
Cc: 56325-done <at> debbugs.gnu.org
Subject: Re: bug#56325: [REGRESSION] (clipboard-yank) always pastes from
 kill-ring after text copy
Date: Fri, 01 Jul 2022 16:27:16 +0800
Konstantin Kharlamov <hi-angel <at> yandex.ru> writes:

> Thank you, I confirm the problem is no longer reproducible with latest
> master at efc2a878de

I'm closing this bug then.  Thanks for testing.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 29 Jul 2022 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 244 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.