GNU bug report logs - #18629
25.0.50; Yanking text on a MS-Windows console

Previous Next

Package: emacs;

Reported by: Dani Moncayo <dmoncayo <at> gmail.com>

Date: Sat, 4 Oct 2014 21:05:02 UTC

Severity: normal

Found in version 25.0.50

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 18629 in the body.
You can then email your comments to 18629 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#18629; Package emacs. (Sat, 04 Oct 2014 21:05:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Dani Moncayo <dmoncayo <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 04 Oct 2014 21:05:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Dani Moncayo <dmoncayo <at> gmail.com>
To: bug-gnu-emacs <bug-gnu-emacs <at> gnu.org>
Subject: 25.0.50; Yanking text on a MS-Windows console
Date: Sat, 4 Oct 2014 23:04:07 +0200
(OS: MS-Windows 8)

Recipe:
  Copy some text in the system clipboard.
  emacs -nw -Q
  C-x h C-w C-y

The yanked text is not the one just killed, but the contents of the
clipboard.  And (FWIW) if I type M-y (just after the C-y), then I get
the killed text.

In GNU Emacs 25.0.50.1 (i686-pc-mingw32)
 of 2014-10-02 on LEG570
Repository revision: 118016
monnier <at> iro.umontreal.ca-20141002171857-vdn4m3apjg4g64yc
Windowing system distributor `Microsoft Corp.', version 6.3.9600
Configured using:
 `configure --enable-checking 'CFLAGS=-O0 -g3' CPPFLAGS=-DGLYPH_DEBUG=1'

Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY ACL GNUTLS LIBXML2 ZLIB

Important settings:
  value of $LANG: ENU
  locale-coding-system: cp1252

-- 
Dani Moncayo




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18629; Package emacs. (Sat, 04 Oct 2014 22:44:02 GMT) Full text and rfc822 format available.

Message #8 received at 18629 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Dani Moncayo <dmoncayo <at> gmail.com>
Cc: 18629 <at> debbugs.gnu.org
Subject: Re: bug#18629: 25.0.50; Yanking text on a MS-Windows console
Date: Sat, 04 Oct 2014 18:43:45 -0400
> (OS: MS-Windows 8)
> Recipe:
>   Copy some text in the system clipboard.
>   emacs -nw -Q
>   C-x h C-w C-y

> The yanked text is not the one just killed, but the contents of the
> clipboard.  And (FWIW) if I type M-y (just after the C-y), then I get
> the killed text.

Obviously, that's a mess up of mine.  But since I can't test under w32,
I'm going to need your help.

So, to get started, can you `trace-function' on gui-select-text,
gui-selection-value and then reproduce the above (and show me the
resulting trace)?

One more thing: if you don't do the C-w, what is the expected behavior?
IOW did the w32 console use the w32 clipboard?


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18629; Package emacs. (Sun, 05 Oct 2014 07:55:02 GMT) Full text and rfc822 format available.

Message #11 received at 18629 <at> debbugs.gnu.org (full text, mbox):

From: Dani Moncayo <dmoncayo <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 18629 <at> debbugs.gnu.org
Subject: Re: bug#18629: 25.0.50; Yanking text on a MS-Windows console
Date: Sun, 5 Oct 2014 09:54:42 +0200
> So, to get started, can you `trace-function' on gui-select-text,
> gui-selection-value and then reproduce the above (and show me the
> resulting trace)?

gui-selection-value seems to be undefined at that point, therefore I
cannot "trace-function" on it.

This is the resulting trace for gui-select-text:

<trace>
1 -> (gui-select-text #(";; This buffer is for notes you don't want to
save, and for Lisp evaluation.
;; If you want to create a file, visit that file with C-x C-f,
;; then enter the text in that file's own buffer.

" 0 3 (fontified t face font-lock-comment-delimiter-face) 3 77
(fontified t face font-lock-comment-face) 77 80 (fontified t face
font-lock-comment-delimiter-face) 80 140 (fontified t face
font-lock-comment-face) 140 143 (fontified t face
font-lock-comment-delimiter-face) 143 190 (fontified t face
font-lock-comment-face) 190 191 (fontified t)))
1 <- gui-select-text: #(";; This buffer is for notes you don't want to
save, and for Lisp evaluation.
;; If you want to create a file, visit that file with C-x C-f,
;; then enter the text in that file's own buffer.

" 0 3 (fontified t face font-lock-comment-delimiter-face) 3 77
(fontified t face font-lock-comment-face) 77 80 (fontified t face
font-lock-comment-delimiter-face) 80 140 (fontified t face
font-lock-comment-face) 140 143 (fontified t face
font-lock-comment-delimiter-face) 143 190 (fontified t face
font-lock-comment-face) 190 191 (fontified t))
</trace>

> One more thing: if you don't do the C-w, what is the expected behavior?
> IOW did the w32 console use the w32 clipboard?

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.


-- 
Dani Moncayo




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18629; Package emacs. (Mon, 06 Oct 2014 01:22:01 GMT) Full text and rfc822 format available.

Message #14 received at 18629 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Dani Moncayo <dmoncayo <at> gmail.com>
Cc: 18629 <at> debbugs.gnu.org
Subject: Re: bug#18629: 25.0.50; Yanking text on a MS-Windows console
Date: Sun, 05 Oct 2014 21:21:02 -0400
> gui-selection-value seems to be undefined at that point, therefore I
> cannot "trace-function" on it.

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

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

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


-- Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18629; Package emacs. (Mon, 06 Oct 2014 16:02:02 GMT) Full text and rfc822 format available.

Message #17 received at 18629 <at> debbugs.gnu.org (full text, mbox):

From: Dani Moncayo <dmoncayo <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 18629 <at> debbugs.gnu.org
Subject: Re: bug#18629: 25.0.50; Yanking text on a MS-Windows console
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




Reply sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
You have taken responsibility. (Mon, 06 Oct 2014 17:49:02 GMT) Full text and rfc822 format available.

Notification sent to Dani Moncayo <dmoncayo <at> gmail.com>:
bug acknowledged by developer. (Mon, 06 Oct 2014 17:49:02 GMT) Full text and rfc822 format available.

Message #22 received at 18629-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Dani Moncayo <dmoncayo <at> gmail.com>
Cc: 18629-done <at> debbugs.gnu.org
Subject: Re: bug#18629: 25.0.50; Yanking text on a MS-Windows console
Date: Mon, 06 Oct 2014 13:48:55 -0400
> 2. With your code below: Everything seems to work fine.

Great, thanks.  The problem should be fixed in trunk now.


        Stefan




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 04 Nov 2014 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 10 years and 286 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.