[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#53894: 27.2; Clipboard copy -> C-y -> M-y -> Same clipboard copy doe
From: |
Lars Ingebrigtsen |
Subject: |
bug#53894: 27.2; Clipboard copy -> C-y -> M-y -> Same clipboard copy does not push to kill ring |
Date: |
Wed, 09 Feb 2022 12:44:38 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Ignacio Casso <ignaciocasso@hotmail.com> writes:
> I'm not sure if it's intentional or not, or even if Emacs can do
> anything about it (maybe since the text is the same, the clipboard is not
> actually modified and Emacs has no way to know). I just wanted to report
> it in case it is a bug.
It's intentional:
(defun gui-selection-value ()
(let ((clip-text
(when select-enable-clipboard
(let ((text (gui--selection-value-internal 'CLIPBOARD)))
(when (string= text "")
(setq text nil))
;; When `select-enable-clipboard' is non-nil,
;; killing/copying text (with, say, `C-w') will push the
;; text to the clipboard (and store it in
;; `gui--last-selected-text-clipboard'). We check
;; whether the text on the clipboard is identical to this
;; text, and if so, we report that the clipboard is
;; empty. See (bug#27442) for further discussion about
;; this DWIM action, and possible ways to make this check
;; less fragile, if so desired.
(prog1
(unless (equal text gui--last-selected-text-clipboard)
text)
(setq gui--last-selected-text-clipboard text)))))
But it's pretty fragile DWIM action, and is frequently not what I mean,
so I often resort to `clipboard-yank' instead to ensure that I really
get the clipboard contents.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
- bug#53894: 27.2; Clipboard copy -> C-y -> M-y -> Same clipboard copy does not push to kill ring, Ignacio Casso, 2022/02/09
- bug#53894: 27.2; Clipboard copy -> C-y -> M-y -> Same clipboard copy does not push to kill ring,
Lars Ingebrigtsen <=
- bug#53894: 27.2; Clipboard copy -> C-y -> M-y -> Same clipboard copy does not push to kill ring, Ignacio Casso, 2022/02/09
- bug#53894: 27.2; Clipboard copy -> C-y -> M-y -> Same clipboard copy does not push to kill ring, Lars Ingebrigtsen, 2022/02/09
- bug#53894: 27.2; Clipboard copy -> C-y -> M-y -> Same clipboard copy does not push to kill ring, Po Lu, 2022/02/09
- bug#53894: 27.2; Clipboard copy -> C-y -> M-y -> Same clipboard copy does not push to kill ring, Eli Zaretskii, 2022/02/10
- bug#53894: 27.2; Clipboard copy -> C-y -> M-y -> Same clipboard copy does not push to kill ring, Po Lu, 2022/02/10
- bug#53894: 27.2; Clipboard copy -> C-y -> M-y -> Same clipboard copy does not push to kill ring, Lars Ingebrigtsen, 2022/02/10
- bug#53894: 27.2; Clipboard copy -> C-y -> M-y -> Same clipboard copy does not push to kill ring, Po Lu, 2022/02/10
- bug#53894: 27.2; Clipboard copy -> C-y -> M-y -> Same clipboard copy does not push to kill ring, Lars Ingebrigtsen, 2022/02/10
- bug#53894: 27.2; Clipboard copy -> C-y -> M-y -> Same clipboard copy does not push to kill ring, Po Lu, 2022/02/10
- bug#53894: 27.2; Clipboard copy -> C-y -> M-y -> Same clipboard copy does not push to kill ring, Lars Ingebrigtsen, 2022/02/10