From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#6956: 24.0.50; pasting mouse selection in other session pastes only first word Date: Wed, 01 Sep 2010 17:38:31 +0300 Message-ID: <838w3ljzq0.fsf@gnu.org> References: <296F488C207B496D9CA42F4AA0F7C835@us.oracle.com> <83eidek812.fsf@gnu.org> <87eideejlh.fsf@stupidchicken.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1283351999 30041 80.91.229.12 (1 Sep 2010 14:39:59 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 1 Sep 2010 14:39:59 +0000 (UTC) Cc: 6956@debbugs.gnu.org To: Chong Yidong Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Sep 01 16:39:56 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1OqoTi-0007qB-2C for geb-bug-gnu-emacs@m.gmane.org; Wed, 01 Sep 2010 16:39:54 +0200 Original-Received: from localhost ([127.0.0.1]:40313 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OqoTh-0008Lf-BK for geb-bug-gnu-emacs@m.gmane.org; Wed, 01 Sep 2010 10:39:53 -0400 Original-Received: from [140.186.70.92] (port=38120 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OqoTa-0008LY-Pz for bug-gnu-emacs@gnu.org; Wed, 01 Sep 2010 10:39:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OqoTZ-00057f-7l for bug-gnu-emacs@gnu.org; Wed, 01 Sep 2010 10:39:46 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:59955) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OqoTZ-00057b-6M for bug-gnu-emacs@gnu.org; Wed, 01 Sep 2010 10:39:45 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OqoPy-0002MJ-4D; Wed, 01 Sep 2010 10:36:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 01 Sep 2010 14:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6956 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 6956-submit@debbugs.gnu.org id=B6956.12833517068986 (code B ref 6956); Wed, 01 Sep 2010 14:36:02 +0000 Original-Received: (at 6956) by debbugs.gnu.org; 1 Sep 2010 14:35:06 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OqoP4-0002Kt-9C for submit@debbugs.gnu.org; Wed, 01 Sep 2010 10:35:06 -0400 Original-Received: from mtaout22.012.net.il ([80.179.55.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OqoP1-0002KX-FT for 6956@debbugs.gnu.org; Wed, 01 Sep 2010 10:35:04 -0400 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0L8200700OHM2200@a-mtaout22.012.net.il> for 6956@debbugs.gnu.org; Wed, 01 Sep 2010 17:36:25 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([77.126.202.93]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0L82005E2OKOFCE0@a-mtaout22.012.net.il>; Wed, 01 Sep 2010 17:36:25 +0300 (IDT) In-reply-to: <87eideejlh.fsf@stupidchicken.com> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Wed, 01 Sep 2010 10:36:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:39882 Archived-At: > From: Chong Yidong > Cc: Drew Adams , 6956@debbugs.gnu.org > Date: Tue, 31 Aug 2010 14:13:30 -0400 > > Eli Zaretskii writes: > > >> Select some text (several words) with the mouse using double-click > >> mouse-1 on one word then mouse-3 on a later word in the text. > > > > Does this constitute a "mouse drag"? Can someone please tell what > > happens on X with the recipe in this bug report? > > Yes, this follows the rule that if the region is highlighted, the > primary selection is set. On X, if you double-mouse-1 on a word and > extend the region with mouse-3, you can use mouse-2 to paste the entire > selection into another application. The issue here is that mouse-drag-copy-region is advertised to copy to the kill-ring regions which are highlighted by dragging the mouse. But mouse-drag-copy-region only affects mouse-drag-region (via mouse-drag-track), which is bound to mouse-1. Mouse-3, OTOH, is bound to mouse-save-then-kill, which is not affected at all by mouse-drag-copy-region. So when Drew double-clicks mouse-1, the highlighted first word is indeed copied into the kill ring (and winds up in the clipboard), but extending the region with mouse-3 doesn't copy the extended region. What I think happens on X under mouse-drag-copy-region is that the first word is copied into the clipboard, while the extended region is copied to the PRIMARY selection by the code in command_loop_1 which catches active regions. Can you please verify this? If my guess is correct, then I think this is a bug: we should copy the whole region to the kill-ring when mouse-drag-copy-region is non-nil. That is, if extending the region with mouse-3 as described in this report indeed constitutes a "mouse drag".