Subject: Re: bug#18629: 25.0.50; Yanking text on a MS-Windows console

From: Dani Moncayo <[email-masked]>
Date: Mon, 6 Oct 2014 18:01:47 +0200

> Looks like you have an "old" version, then.  Try updating from trunk.

My version was from a recent trunk build (2014-10-02), made from an
empty build directory (autogen.sh+configure+make).  But it seems that
it is somehow corrupt.  I guess I should always use the "bootstrap"
target to be sure that the build is correct...

>> The expected behavior for that, I think, is the one I observe right
>> now: C-y brings to the buffer the current contents of the system
>> clipboard.
>
> I think if you upgrade from trunk, your original problem might
> disappear, but the above desired behavior will also disappear.

Yes, It seems so.  I've just built a recent trunk version, and this is
what I see:

1. Without your code below:
  a. The kill ring seems to work OK for "internal" text, i.e, text
     coming form Emacs itself.
  b. But I can't yank text from the system clipboard.

2. With your code below: Everything seems to work fine.

> If so, please try to run the code below and tell me if it restores the
> expected behavior:
>
> (gui-method-define gui-selection-value t #'w32-get-selection-value)
> (gui-method-define gui-select-text t
>                    (lambda (text)
>                      (if gui-select-enable-clipboard
>                          (w32-set-clipboard-data text))))

-- 
Dani Moncayo