bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#51685: 29.0.50; Yanking from clipboard broken (Win10)


From: Eli Zaretskii
Subject: bug#51685: 29.0.50; Yanking from clipboard broken (Win10)
Date: Mon, 08 Nov 2021 15:38:12 +0200

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Date: Mon, 08 Nov 2021 12:27:43 +0100
> Cc: 51685@debbugs.gnu.org
> 
> >> 1) Start Emacs with emacs -Q (from a MinGW64 shell)
> >> 2) Open Windows Editor
> >> 3) Enter control@debbugs.gnu.org in Editor
> >> 4) Mark and Copy in Editor
> >> 5) Yank in scratch with C-y
> >
> > Does reverting 5e66c75e0 fix the issue?
> 
> I've reverted it now and will have to reexamine the problem before
> attempting a new fix.

Whatever you do, don't decode the selection text on MS-Windows.  It is
already decoded (see w32-get-clipboard-data), and
selection-coding-system is UTF-16 on MS-Windows, so decoding a decoded
string by that will not do anything useful ;-)

The existing code carefully side-steps the decoding by looking at the
foreign-selection property on the string, which the Windows code
doesn't set.  But your changes removed that test, and thus caused the
clipboard text to be decoded on Windows.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]