From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: rjs@netti.fi (Riku Saikkonen) Newsgroups: gmane.emacs.bugs Subject: bug#18939: 24.4; middle-click sometimes pastes data other than the PRIMARY selection Date: Tue, 30 Dec 2014 12:45:12 +0200 Message-ID: <87zja54ds7.fsf@anar.lloke.localnet> References: <87k33catpv.fsf@xvii.vinc17.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1419959959 22939 80.91.229.3 (30 Dec 2014 17:19:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 30 Dec 2014 17:19:19 +0000 (UTC) To: 18939@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Dec 30 18:19:11 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Y60Rr-0004Sp-Bm for geb-bug-gnu-emacs@m.gmane.org; Tue, 30 Dec 2014 18:19:11 +0100 Original-Received: from localhost ([::1]:37668 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y60Rq-0003mG-PW for geb-bug-gnu-emacs@m.gmane.org; Tue, 30 Dec 2014 12:19:10 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43282) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y60Rm-0003iu-ST for bug-gnu-emacs@gnu.org; Tue, 30 Dec 2014 12:19:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y60Ri-0000kV-RE for bug-gnu-emacs@gnu.org; Tue, 30 Dec 2014 12:19:06 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:51880) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y60Ri-0000k3-ON for bug-gnu-emacs@gnu.org; Tue, 30 Dec 2014 12:19:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Y60Ri-0003Rt-FB for bug-gnu-emacs@gnu.org; Tue, 30 Dec 2014 12:19:02 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: <87k33catpv.fsf@xvii.vinc17.org> Resent-From: rjs@netti.fi (Riku Saikkonen) Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 30 Dec 2014 17:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18939 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 18939-submit@debbugs.gnu.org id=B18939.141995988613168 (code B ref 18939); Tue, 30 Dec 2014 17:19:02 +0000 Original-Received: (at 18939) by debbugs.gnu.org; 30 Dec 2014 17:18:06 +0000 Original-Received: from localhost ([127.0.0.1]:33013 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y60Qn-0003QK-47 for submit@debbugs.gnu.org; Tue, 30 Dec 2014 12:18:05 -0500 Original-Received: from vs16.mail.saunalahti.fi ([62.142.117.197]:56646) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y5uFj-00076K-Qe for 18939@debbugs.gnu.org; Tue, 30 Dec 2014 05:42:16 -0500 Original-Received: from vams (localhost [127.0.0.1]) by vs16.mail.saunalahti.fi (Postfix) with SMTP id 8775B20062 for <18939@debbugs.gnu.org>; Tue, 30 Dec 2014 12:42:14 +0200 (EET) Original-Received: from gw01.mail.saunalahti.fi (gw01.mail.saunalahti.fi [195.197.172.115]) by vs16.mail.saunalahti.fi (Postfix) with ESMTP id 706F020062 for <18939@debbugs.gnu.org>; Tue, 30 Dec 2014 12:42:14 +0200 (EET) Original-Received: from anar.lloke.localnet (a88-112-124-67.elisa-laajakaista.fi [88.112.124.67]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by gw01.mail.saunalahti.fi (Postfix) with ESMTPSA id 5A5BE4004F for <18939@debbugs.gnu.org>; Tue, 30 Dec 2014 12:42:13 +0200 (EET) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) X-Mailman-Approved-At: Tue, 30 Dec 2014 12:18:03 -0500 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-Received-From: 140.186.70.43 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 Xref: news.gmane.org gmane.emacs.bugs:97846 Archived-At: I tried to trace where the bug occurs, and got as far as this: mouse-drag-track contains the lines ;; Otherwise, run binding of terminating up-event. (deactivate-mark) (if do-multi-click (goto-char start-point) (unless moved-off-start (pop-mark))) (lines 858-863 of mouse.el in Emacs 24.4.1) Commenting out the last (pop-mark) fixes the bug, but leaves extra marks in the mark ring (accessible with C-u C-SPC) at every point you click. There's a corresponding push-mark on line 796 which this pop-mark appears to try to undo, but it appears that as a side effect pop-mark sets the primary selection (in the situation described in the bug). I am not sure what would be a proper fix. Perhaps mouse-drag-track should not push the mark at all until it detects something else than a single click (i.e., (or moved-off-start do-multi-click) or something)? (From a quick look at the source, that seems to be how mouse-drag-track worked in Emacs 23.4.1. But the source has changed quite a lot since then.) PS. I found out about this bug because Debian currently considers it to be a release-critical bug; see .