* bug#18629: 25.0.50; Yanking text on a MS-Windows console
@ 2014-10-04 21:04 Dani Moncayo
2014-10-04 22:43 ` Stefan Monnier
0 siblings, 1 reply; 6+ messages in thread
From: Dani Moncayo @ 2014-10-04 21:04 UTC (permalink / raw
To: 18629
(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@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
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#18629: 25.0.50; Yanking text on a MS-Windows console
2014-10-04 21:04 bug#18629: 25.0.50; Yanking text on a MS-Windows console Dani Moncayo
@ 2014-10-04 22:43 ` Stefan Monnier
2014-10-05 7:54 ` Dani Moncayo
0 siblings, 1 reply; 6+ messages in thread
From: Stefan Monnier @ 2014-10-04 22:43 UTC (permalink / raw
To: Dani Moncayo; +Cc: 18629
> (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
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#18629: 25.0.50; Yanking text on a MS-Windows console
2014-10-04 22:43 ` Stefan Monnier
@ 2014-10-05 7:54 ` Dani Moncayo
2014-10-06 1:21 ` Stefan Monnier
0 siblings, 1 reply; 6+ messages in thread
From: Dani Moncayo @ 2014-10-05 7:54 UTC (permalink / raw
To: Stefan Monnier; +Cc: 18629
> 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#18629: 25.0.50; Yanking text on a MS-Windows console
2014-10-05 7:54 ` Dani Moncayo
@ 2014-10-06 1:21 ` Stefan Monnier
2014-10-06 16:01 ` Dani Moncayo
0 siblings, 1 reply; 6+ messages in thread
From: Stefan Monnier @ 2014-10-06 1:21 UTC (permalink / raw
To: Dani Moncayo; +Cc: 18629
> 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#18629: 25.0.50; Yanking text on a MS-Windows console
2014-10-06 1:21 ` Stefan Monnier
@ 2014-10-06 16:01 ` Dani Moncayo
2014-10-06 17:48 ` Stefan Monnier
0 siblings, 1 reply; 6+ messages in thread
From: Dani Moncayo @ 2014-10-06 16:01 UTC (permalink / raw
To: Stefan Monnier; +Cc: 18629
> 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
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-10-06 17:48 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-04 21:04 bug#18629: 25.0.50; Yanking text on a MS-Windows console Dani Moncayo
2014-10-04 22:43 ` Stefan Monnier
2014-10-05 7:54 ` Dani Moncayo
2014-10-06 1:21 ` Stefan Monnier
2014-10-06 16:01 ` Dani Moncayo
2014-10-06 17:48 ` Stefan Monnier
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.