From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jan =?UTF-8?Q?Dj=C3=A4rv?= Newsgroups: gmane.emacs.bugs Subject: bug#6872: 24.0.50; Mouse-2 pastes the wrong text. Date: Mon, 23 Aug 2010 09:06:09 +0200 Message-ID: <4C721DE1.4050502@swipnet.se> References: <4C6A28AA.10003@swipnet.se> <87pqxacjou.fsf@stupidchicken.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1282547367 8301 80.91.229.12 (23 Aug 2010 07:09:27 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 23 Aug 2010 07:09:27 +0000 (UTC) Cc: 6872@debbugs.gnu.org To: Chong Yidong Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Aug 23 09:09:24 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 1OnR9n-0000iB-N8 for geb-bug-gnu-emacs@m.gmane.org; Mon, 23 Aug 2010 09:09:24 +0200 Original-Received: from localhost ([127.0.0.1]:50960 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OnR9m-0008Jl-6Z for geb-bug-gnu-emacs@m.gmane.org; Mon, 23 Aug 2010 03:09:22 -0400 Original-Received: from [140.186.70.92] (port=48911 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OnR9f-0008IG-Hy for bug-gnu-emacs@gnu.org; Mon, 23 Aug 2010 03:09:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OnR9c-0003Wc-RV for bug-gnu-emacs@gnu.org; Mon, 23 Aug 2010 03:09:15 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:39689) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OnR9c-0003WY-N2 for bug-gnu-emacs@gnu.org; Mon, 23 Aug 2010 03:09:12 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OnR5a-0004mk-Do; Mon, 23 Aug 2010 03:05:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jan =?UTF-8?Q?Dj=C3=A4rv?= Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 23 Aug 2010 07:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6872 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 6872-submit@debbugs.gnu.org id=B6872.128254709918387 (code B ref 6872); Mon, 23 Aug 2010 07:05:02 +0000 Original-Received: (at 6872) by debbugs.gnu.org; 23 Aug 2010 07:04:59 +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 1OnR5W-0004mW-I2 for submit@debbugs.gnu.org; Mon, 23 Aug 2010 03:04:58 -0400 Original-Received: from smtprelay-h21.telenor.se ([195.54.99.196]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OnR5U-0004mR-H3 for 6872@debbugs.gnu.org; Mon, 23 Aug 2010 03:04:57 -0400 Original-Received: from ipb1.telenor.se (ipb1.telenor.se [195.54.127.164]) by smtprelay-h21.telenor.se (Postfix) with ESMTP id 6981CE88DF for <6872@debbugs.gnu.org>; Mon, 23 Aug 2010 09:06:12 +0200 (CEST) X-SENDER-IP: [85.225.45.35] X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmI5AC+7cUxV4S0jPGdsb2JhbACDF4RSmEUMAQEBATUtpTKRGIEigyJzBA X-IronPort-AV: E=Sophos;i="4.56,256,1280700000"; d="scan'208";a="122412815" Original-Received: from c-232de155.25-1-64736c10.cust.bredbandsbolaget.se (HELO coolsville.localdomain) ([85.225.45.35]) by ipb1.telenor.se with ESMTP; 23 Aug 2010 09:06:11 +0200 Original-Received: from [172.20.199.13] (zeplin [172.20.199.13]) by coolsville.localdomain (Postfix) with ESMTPSA id 406107FA05A; Mon, 23 Aug 2010 09:06:11 +0200 (CEST) User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; sv-SE; rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2 In-Reply-To: <87pqxacjou.fsf@stupidchicken.com> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Mon, 23 Aug 2010 03:05: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:39718 Archived-At: The patch fixes the bug. Jan D. Chong Yidong skrev 2010-08-23 01.27: > Jan Dj=C3=A4rv writes: > >> In the first frame, go to *scratch* if not alread there. >> C-x 5 2. In the new frame C-x b tmp >> Select the text "This buffer is for notes". >> Move mouse to the other frame and press mouse-2. The text is inserted >> as it should. >> Double click on "buffer" (in the line that was just inserted) to selec= t >> it. >> Go back to the frame with *scratch* and press mouse-2. The selected >> word "buffer" is not inserted, but the old selection "This buffer is f= or >> notes". > > Could you help test this patch? > > *** lisp/mouse.el 2010-08-21 04:46:23 +0000 > --- lisp/mouse.el 2010-08-22 23:25:55 +0000 > *************** > *** 1271,1277 **** > (when select-active-regions > ;; Without this, confusing things happen upon e.g. inserting int= o > ;; the middle of an active region. > ! (deactivate-mark)) > (or mouse-yank-at-point (mouse-set-point click)) > (let ((primary > (cond > --- 1271,1278 ---- > (when select-active-regions > ;; Without this, confusing things happen upon e.g. inserting int= o > ;; the middle of an active region. > ! (let ((select-active-regions nil)) > ! (deactivate-mark))) > (or mouse-yank-at-point (mouse-set-point click)) > (let ((primary > (cond > > =3D=3D=3D modified file 'src/keyboard.c' > *** src/keyboard.c 2010-08-22 15:14:37 +0000 > --- src/keyboard.c 2010-08-22 23:22:34 +0000 > *************** > *** 368,374 **** > Used by the `select-active-regions' feature. */ > Lisp_Object Vsaved_region_selection; > > ! Lisp_Object Qx_set_selection, QPRIMARY; > > Lisp_Object Qself_insert_command; > Lisp_Object Qforward_char; > --- 368,374 ---- > Used by the `select-active-regions' feature. */ > Lisp_Object Vsaved_region_selection; > > ! Lisp_Object Qx_set_selection, QPRIMARY, Qhandle_switch_frame; > > Lisp_Object Qself_insert_command; > Lisp_Object Qforward_char; > *************** > *** 1799,1808 **** > { > /* Even if not deactivating the mark, set PRIMARY if > `select-active-regions' is non-nil. */ > ! if (EQ (Vselect_active_regions, Qonly) > ! ? EQ (CAR_SAFE (Vtransient_mark_mode), Qonly) > ! : (!NILP (Vselect_active_regions) > ! && !NILP (Vtransient_mark_mode))) > { > int beg =3D XINT (Fmarker_position (current_buffer->mark)); > int end =3D XINT (make_number (PT)); > --- 1799,1809 ---- > { > /* Even if not deactivating the mark, set PRIMARY if > `select-active-regions' is non-nil. */ > ! if ((EQ (Vselect_active_regions, Qonly) > ! ? EQ (CAR_SAFE (Vtransient_mark_mode), Qonly) > ! : (!NILP (Vselect_active_regions) > ! && !NILP (Vtransient_mark_mode))) > ! && !EQ (Vthis_command, Qhandle_switch_frame)) > { > int beg =3D XINT (Fmarker_position (current_buffer->mark)); > int end =3D XINT (make_number (PT)); > *************** > *** 11725,11730 **** > --- 11726,11733 ---- > staticpro (&Qx_set_selection); > QPRIMARY =3D intern_c_string ("PRIMARY"); > staticpro (&QPRIMARY); > + Qhandle_switch_frame =3D intern_c_string ("handle-switch-frame"); > + staticpro (&Qhandle_switch_frame); > > Qinput_method_exit_on_first_char =3D intern_c_string ("input-metho= d-exit-on-first-char"); > staticpro (&Qinput_method_exit_on_first_char);