Andy Piper <andy(a)xemacs.org> wrote:
 At 06:03 PM 6/4/99 -0400, Dmitry Yaitskov wrote:
 >Dmitry Yaitskov <dimas(a)home.com> wrote:
 >
 >> Hi,
 >> 
 >> I've noticed that the behaviour of yank-clipboard-selection has
 >> changed in b15 as opposed to b14 - now, if the function is invoked
 >> while there is a selection active, *it* is yanked instead of the
 >> clipboard contents. IMHO this is a bug, although I'm not sure - the
 >> doc string is ambiguous, as it says:
 >> 
 >>   "Insert the current Clipboard selection at point."
 >> 
 >> It is unclear what is meant by "Clipboard selection". Can somebody
 >> please enlighten me - is it a bug or a feature? (in any case, it is
 >> probably something that only matters under NT, as under X AFAIK the
 >> selection *is* the "clipboard")... thanks.
 >
 >Sorry for followup to my own post. Seems like the bug is in the
 >mswindows-get-clipboard function, which if I'm not mistaken copies the
 >current selection into the clipboard if there is one - and it
 >shouldn't do it. I can't be too sure as the problem seems to lie in
 >the select-msw.c file, and I do not understand the code there. In
 >particular, there is a new (in b15) function mswindows_own_selection
 >which obviously is invoked by something, but I couldn't find any
 >reference to it in any other sources... Can somebody who knows that
 >code (Andy Piper?) please take a look at it? Thanks.
 
 I fly to San Fransico in 4 hours so don't have time right now. The change
 is possibly intentional as the windows select behaviour should now mimic
 the X behaviour. This is not necessarily completely what you want but is a
 lot better than what we had before. 
I am not sure I understand you correctly, but if so - this means that
it breaks the way cut/copy/paste is done in Windows. Is it a "good
thing"? Why is that a lot better than what we had before? I for one
went back to b14 only because of this. Ok, so I might be missing
something. How can I mimic the old behaviour, which is standard in
Windows, now? What I want is to be able to copy something to the
clipboard, then select something else, and do a paste to replace the
new selection with the clipboard contents. I tried doing
(defun my-paste-selection ()
  (interactive)
  (delete-primary-selection)
  (yank-clipboard-selection))
but it didn't work. That is, it still copied the current selection
into the clipboard, before pasting it. AFAIK this indeed is the way X
works, but what's so good about it? And now from what you say I gather
that this new behaviour is intentional and built into a very low level
of XEmacs, so that it is impossible to avoid? Unless am I missing
something obvious...
Thanks.
-- 
Cheers,
-Dima.