From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas Schwab Newsgroups: gmane.emacs.bugs Subject: bug#20906: 25.0.50; Date: Thu, 08 Oct 2015 16:02:05 +0200 Message-ID: References: <83zj002gt1.fsf@gnu.org> <8337xp25v7.fsf@gnu.org> <83y4fhztdz.fsf@gnu.org> <83mvvxzjz4.fsf@gnu.org> <83k2r1zgrm.fsf@gnu.org> <83egh9zeeh.fsf@gnu.org> <83612lz1ll.fsf@gnu.org> <83612kx8n5.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1444313020 28412 80.91.229.3 (8 Oct 2015 14:03:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 8 Oct 2015 14:03:40 +0000 (UTC) Cc: 20906@debbugs.gnu.org, monnier@iro.umontreal.ca To: Mike FABIAN Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Oct 08 16:03:28 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from eggs.gnu.org ([208.118.235.92]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZkBn5-0007EF-J8 for geb-bug-gnu-emacs@m.gmane.org; Thu, 08 Oct 2015 16:03:27 +0200 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZkBmt-0000U8-9s for geb-bug-gnu-emacs@m.gmane.org; Thu, 08 Oct 2015 10:03:26 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_05,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:55802) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZkBmt-0000Ta-6C for geb-bug-gnu-emacs@m.gmane.org; Thu, 08 Oct 2015 10:03:15 -0400 Original-Received: from localhost ([::1]:34938 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZkBmt-0003jB-3u for geb-bug-gnu-emacs@m.gmane.org; Thu, 08 Oct 2015 10:03:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33494) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZkBmj-0003i6-Sf for bug-gnu-emacs@gnu.org; Thu, 08 Oct 2015 10:03:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZkBmg-0000JI-Im for bug-gnu-emacs@gnu.org; Thu, 08 Oct 2015 10:03:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:43739) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZkBmg-0000JA-GV for bug-gnu-emacs@gnu.org; Thu, 08 Oct 2015 10:03:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZkBmg-00073k-9x for bug-gnu-emacs@gnu.org; Thu, 08 Oct 2015 10:03:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andreas Schwab Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 08 Oct 2015 14:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20906 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 20906-submit@debbugs.gnu.org id=B20906.144431292926980 (code B ref 20906); Thu, 08 Oct 2015 14:03:02 +0000 Original-Received: (at 20906) by debbugs.gnu.org; 8 Oct 2015 14:02:09 +0000 Original-Received: from localhost ([127.0.0.1]:60908 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZkBlo-000714-TG for submit@debbugs.gnu.org; Thu, 08 Oct 2015 10:02:09 -0400 Original-Received: from mx2.suse.de ([195.135.220.15]:58143) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZkBlm-00070w-N0 for 20906@debbugs.gnu.org; Thu, 08 Oct 2015 10:02:07 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Original-Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id A61E7ABA2; Thu, 8 Oct 2015 14:02:04 +0000 (UTC) X-Yow: Now, let's SEND OUT for QUICHE!! In-Reply-To: (Mike FABIAN's message of "Thu, 08 Oct 2015 15:15:31 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 Xref: news.gmane.org gmane.emacs.bugs:107440 Archived-At: Mike FABIAN writes: > Eli Zaretskii さんはかきました: > >> If the data we receive is different, I guess the only explanation >> could be that we request it in some different way? > > Yes, in the old code > > (defun x-get-selection (&optional type data-type) > > is called with “'UTF8_STRING” in data-type, > in the new code > > (defun gui-get-selection (&optional type data-type) > > is called with “nil” in data type. > > That seems to make the difference, evaluating > > (gui-get-selection 'PRIMARY 'UTF8_STRING) > > gets the selection correctly using the new code, > > (gui-get-selection 'PRIMARY) > > produces the problem I am seeing. > > I still now know why this is called differently, looking ... This: diff --git a/lisp/mouse.el b/lisp/mouse.el index 93bd628..f569ec3 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -1068,24 +1068,7 @@ regardless of where you click." (let (select-active-regions) (deactivate-mark))) (or mouse-yank-at-point (mouse-set-point click)) - (let ((primary - (if (fboundp 'x-get-selection-value) - (if (eq (framep (selected-frame)) 'w32) - ;; MS-Windows emulates PRIMARY in x-get-selection, but not - ;; in x-get-selection-value (the latter only accesses the - ;; clipboard). So try PRIMARY first, in case they selected - ;; something with the mouse in the current Emacs session. - (or (x-get-selection 'PRIMARY) - (x-get-selection-value)) - ;; Else MS-DOS or X. - ;; On X, x-get-selection-value supports more formats and - ;; encodings, so use it in preference to x-get-selection. - (or (x-get-selection-value) - (x-get-selection 'PRIMARY))) - ;; FIXME: What about xterm-mouse-mode etc.? - (x-get-selection 'PRIMARY)))) - (unless primary - (error "No selection is available")) + (let ((primary (gui-get-primary-selection))) (push-mark (point)) (insert-for-yank primary))) The comment is there for a reason... Andreas. -- Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."