From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: mouse-yank-primary and bug #7699 Date: Wed, 22 Dec 2010 21:17:29 +0200 Message-ID: <8339ppfwhi.fsf@gnu.org> References: <837hf2gc0p.fsf@gnu.org> <4D114EF0.8090706@harpegolden.net> <4D12166B.8010002@harpegolden.net> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE X-Trace: dough.gmane.org 1293045583 15175 80.91.229.12 (22 Dec 2010 19:19:43 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 22 Dec 2010 19:19:43 +0000 (UTC) Cc: jan.h.d@swipnet.se, emacs-devel@gnu.org To: David De La Harpe Golden Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Dec 22 20:19:39 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PVUDq-000569-Sa for ged-emacs-devel@m.gmane.org; Wed, 22 Dec 2010 20:19:39 +0100 Original-Received: from localhost ([127.0.0.1]:60756 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PVUDq-00034h-B3 for ged-emacs-devel@m.gmane.org; Wed, 22 Dec 2010 14:19:38 -0500 Original-Received: from [140.186.70.92] (port=52977 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PVUDk-00034c-VQ for emacs-devel@gnu.org; Wed, 22 Dec 2010 14:19:33 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PVUDj-0004P0-LH for emacs-devel@gnu.org; Wed, 22 Dec 2010 14:19:32 -0500 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:40332) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PVUDj-0004Ov-CL for emacs-devel@gnu.org; Wed, 22 Dec 2010 14:19:31 -0500 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0LDU00D00GA9LO00@a-mtaout22.012.net.il> for emacs-devel@gnu.org; Wed, 22 Dec 2010 21:19:30 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([84.229.167.122]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LDU00CGRGCG7YE0@a-mtaout22.012.net.il>; Wed, 22 Dec 2010 21:19:30 +0200 (IST) In-reply-to: <4D12166B.8010002@harpegolden.net> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:133905 Archived-At: > Date: Wed, 22 Dec 2010 15:16:59 +0000 > From: David De La Harpe Golden > CC: emacs-devel@gnu.org, Dj=E4rv >=20 > Remember that w32 x-get-selection-value follows the funny=20 > interprogram-paste-function protocol intended for kill-ring interac= tions=20 > that returns nil if the text has already been got. It _is_ w32's= =20 > interprogram-paste-function after all! >=20 > So when you click mouse-2 on w32, you presently might get the clipb= oard,=20 > or you might get the emulated primary, depending on fairly complex= =20 > (though deterministic) details of the interaction path leading up t= o the=20 > mouse-2 click. If you were to remove the call to x-get-selection on= w32,=20 > you'd get the clipboard once (probably) and then nowt for subsequen= t=20 > clicks. >=20 > If you were to remove the call to x-get-selection-value that was= =20 > inserted, on w32 you should get the emulated primary on all clicks = if it=20 > is available, consistent with the function name "mouse-yank-primary= ",=20 > and bearing in mind it might or might not currently be being update= d=20 > properly elsewhere on w32 (I haven't looked recently). Thanks. I know all that. My question was about this pair of calls o= n X, not about Windows. > But wait - why does X11 now have and call a function called=20 > x-get-selection-value, then? It was introduced because someone ame= nded=20 > mouse-yank-primary to call the function called x-get-selection-valu= e if=20 > it existed (which at the time it only did on w32/dos), then someone= else=20 > decided to fix a bug by reusing the name and call site on x11. >=20 > 2010-08-14 Eli Zaretskii >=20 > =09* mouse.el (mouse-yank-primary): Fix mouse-2 on MS-Windows and > =09MS-DOS. (Bug#6689) >=20 > bzr diff -r101079..101080 >=20 > 2010-10-31 Jan Dj=E4rv >=20 > =09* term/x-win.el (x-get-selection-value): New function that gets > =09PRIMARY with type as specified in x-select-request-type. (Bug#68= 02). >=20 > 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. M= y guess is that he wanted to call x-selection-value-internal, instead o= f x-get-selection, that's all. > So x11 x-get-selection-value is a function with the same name as on= e on=20 > w32 but very different behaviour, that always returns the primary v= alue=20 > if available, handling encodings. It is is _not_ X11's=20 > interprogram-paste function (that's x-selection-value, "obviously".= ..). Yes, I know. The very different semantics of x-get-selection-value o= n DOS and Windows is because in other situations this is what users expect from code that calls x-get-selection-value. Again, this is no= t what I need help with.