unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#51685: 29.0.50; Yanking from clipboard broken (Win10)
@ 2021-11-08 10:57 Arash Esbati
  2021-11-08 11:02 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 6+ messages in thread
From: Arash Esbati @ 2021-11-08 10:57 UTC (permalink / raw)
  To: 51685

[-- Attachment #1: Type: text/plain, Size: 130 bytes --]

Hi all,

yanking text from clipboard into Emacs doesn't work for me.  Yanking
control@debbugs.gnu.org into Emacs looks like this:

[-- Attachment #2: yank.png --]
[-- Type: image/png, Size: 7623 bytes --]

[-- Attachment #3: Type: text/plain, Size: 272 bytes --]


Steps to reproduce:
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

This is Emacs 990aad47 from master.

Can others reproduce this?

Best, Arash

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

* bug#51685: 29.0.50; Yanking from clipboard broken (Win10)
  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
  0 siblings, 1 reply; 6+ messages in thread
From: Lars Ingebrigtsen @ 2021-11-08 11:02 UTC (permalink / raw)
  To: Arash Esbati; +Cc: 51685

Arash Esbati <arash@gnu.org> writes:

> Steps to reproduce:
> 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?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

* bug#51685: 29.0.50; Yanking from clipboard broken (Win10)
  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
  0 siblings, 2 replies; 6+ messages in thread
From: Lars Ingebrigtsen @ 2021-11-08 11:27 UTC (permalink / raw)
  To: Arash Esbati; +Cc: 51685

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Arash Esbati <arash@gnu.org> writes:
>
>> Steps to reproduce:
>> 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.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

* bug#51685: 29.0.50; Yanking from clipboard broken (Win10)
  2021-11-08 11:27   ` Lars Ingebrigtsen
@ 2021-11-08 11:33     ` Arash Esbati
  2021-11-08 13:38     ` Eli Zaretskii
  1 sibling, 0 replies; 6+ messages in thread
From: Arash Esbati @ 2021-11-08 11:33 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 51685-done

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Lars Ingebrigtsen <larsi@gnus.org> writes:
>
>> Arash Esbati <arash@gnu.org> writes:
>>
>>> Steps to reproduce:
>>> 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.

Thanks, I also just tried it and 5e66c75e0 is the problematic change.
I'm closing this report for now.

Best, Arash





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

* bug#51685: 29.0.50; Yanking from clipboard broken (Win10)
  2021-11-08 11:27   ` Lars Ingebrigtsen
  2021-11-08 11:33     ` Arash Esbati
@ 2021-11-08 13:38     ` Eli Zaretskii
  2021-11-08 13:41       ` Lars Ingebrigtsen
  1 sibling, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2021-11-08 13:38 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: arash, 51685

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





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

* bug#51685: 29.0.50; Yanking from clipboard broken (Win10)
  2021-11-08 13:38     ` Eli Zaretskii
@ 2021-11-08 13:41       ` Lars Ingebrigtsen
  0 siblings, 0 replies; 6+ messages in thread
From: Lars Ingebrigtsen @ 2021-11-08 13:41 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: arash, 51685

Eli Zaretskii <eliz@gnu.org> writes:

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

Ah, I see.  Thanks for the explanation.  I plan on getting my Windows
VMs up and running again (I'm in the middle of switching some computers
here) so that I can do some testing on Windows too, and then I'll
attempt the fix again.  😀

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

end of thread, other threads:[~2021-11-08 13:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2021-11-08 13:41       ` Lars Ingebrigtsen

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