unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: arash@gnu.org, 51685@debbugs.gnu.org
Subject: bug#51685: 29.0.50; Yanking from clipboard broken (Win10)
Date: Mon, 08 Nov 2021 15:38:12 +0200	[thread overview]
Message-ID: <83ilx27oor.fsf@gnu.org> (raw)
In-Reply-To: <874k8m99ao.fsf@gnus.org> (message from Lars Ingebrigtsen on Mon,  08 Nov 2021 12:27:43 +0100)

> 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.





  parent reply	other threads:[~2021-11-08 13:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-08 10:57 bug#51685: 29.0.50; Yanking from clipboard broken (Win10) Arash Esbati
2021-11-08 11:02 ` Lars Ingebrigtsen
2021-11-08 11:27   ` Lars Ingebrigtsen
2021-11-08 11:33     ` Arash Esbati
2021-11-08 13:38     ` Eli Zaretskii [this message]
2021-11-08 13:41       ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83ilx27oor.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=51685@debbugs.gnu.org \
    --cc=arash@gnu.org \
    --cc=larsi@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).