From: Eli Zaretskii <eliz@gnu.org>
To: David De La Harpe Golden <david@harpegolden.net>
Cc: jan.h.d@swipnet.se, emacs-devel@gnu.org
Subject: Re: mouse-yank-primary and bug #7699
Date: Wed, 22 Dec 2010 21:17:29 +0200 [thread overview]
Message-ID: <8339ppfwhi.fsf@gnu.org> (raw)
In-Reply-To: <4D12166B.8010002@harpegolden.net>
> Date: Wed, 22 Dec 2010 15:16:59 +0000
> From: David De La Harpe Golden <david@harpegolden.net>
> CC: emacs-devel@gnu.org, Djärv <jan.h.d@swipnet.se>
>
> Remember that w32 x-get-selection-value follows the funny
> interprogram-paste-function protocol intended for kill-ring interactions
> that returns nil if the text has already been got. It _is_ w32's
> interprogram-paste-function after all!
>
> So when you click mouse-2 on w32, you presently might get the clipboard,
> or you might get the emulated primary, depending on fairly complex
> (though deterministic) details of the interaction path leading up to the
> mouse-2 click. If you were to remove the call to x-get-selection on w32,
> you'd get the clipboard once (probably) and then nowt for subsequent
> clicks.
>
> If you were to remove the call to x-get-selection-value that was
> inserted, on w32 you should get the emulated primary on all clicks if it
> is available, consistent with the function name "mouse-yank-primary",
> and bearing in mind it might or might not currently be being updated
> properly elsewhere on w32 (I haven't looked recently).
Thanks. I know all that. My question was about this pair of calls on
X, not about Windows.
> But wait - why does X11 now have and call a function called
> x-get-selection-value, then? It was introduced because someone amended
> mouse-yank-primary to call the function called x-get-selection-value if
> it existed (which at the time it only did on w32/dos), then someone else
> decided to fix a bug by reusing the name and call site on x11.
>
> 2010-08-14 Eli Zaretskii <eliz@gnu.org>
>
> * mouse.el (mouse-yank-primary): Fix mouse-2 on MS-Windows and
> MS-DOS. (Bug#6689)
>
> bzr diff -r101079..101080
>
> 2010-10-31 Jan Djärv <jan.h.d@swipnet.se>
>
> * term/x-win.el (x-get-selection-value): New function that gets
> PRIMARY with type as specified in x-select-request-type. (Bug#6802).
>
> bzr diff -r102166..102167
I know this as well. But I trust Jan that if he made that change, he
had a good reason for it. I just don't know what was that reason. My
guess is that he wanted to call x-selection-value-internal, instead of
x-get-selection, that's all.
> So x11 x-get-selection-value is a function with the same name as one on
> w32 but very different behaviour, that always returns the primary value
> if available, handling encodings. It is is _not_ X11's
> interprogram-paste function (that's x-selection-value, "obviously"...).
Yes, I know. The very different semantics of x-get-selection-value on
DOS and Windows is because in other situations this is what users
expect from code that calls x-get-selection-value. Again, this is not
what I need help with.
next prev parent reply other threads:[~2010-12-22 19:17 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-21 19:29 mouse-yank-primary and bug #7699 Eli Zaretskii
2010-12-22 1:05 ` David De La Harpe Golden
2010-12-22 1:38 ` Drew Adams
2010-12-22 3:16 ` David De La Harpe Golden
2010-12-22 4:18 ` Drew Adams
2010-12-22 11:13 ` Eli Zaretskii
2010-12-22 15:11 ` Drew Adams
2010-12-22 19:04 ` Eli Zaretskii
2010-12-22 19:09 ` Drew Adams
2010-12-22 11:09 ` Eli Zaretskii
2010-12-22 15:16 ` David De La Harpe Golden
2010-12-22 15:38 ` David De La Harpe Golden
2010-12-22 19:23 ` Eli Zaretskii
2010-12-22 21:37 ` David De La Harpe Golden
2010-12-23 4:01 ` Eli Zaretskii
2010-12-22 19:17 ` Eli Zaretskii [this message]
2010-12-22 22:10 ` David De La Harpe Golden
2010-12-23 4:03 ` Eli Zaretskii
2010-12-23 7:32 ` Jan D.
2010-12-23 9:08 ` Eli Zaretskii
2010-12-23 14:28 ` Stefan Monnier
2010-12-23 16:38 ` David De La Harpe Golden
2010-12-22 6:47 ` Jan Djärv
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8339ppfwhi.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=david@harpegolden.net \
--cc=emacs-devel@gnu.org \
--cc=jan.h.d@swipnet.se \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).