From unknown Thu Sep 11 13:37:32 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#18939 <18939@debbugs.gnu.org> To: bug#18939 <18939@debbugs.gnu.org> Subject: Status: 24.4; a left-click in Emacs sometimes modifies the PRIMARY selection Reply-To: bug#18939 <18939@debbugs.gnu.org> Date: Thu, 11 Sep 2025 20:37:32 +0000 retitle 18939 24.4; a left-click in Emacs sometimes modifies the PRIMARY se= lection reassign 18939 emacs submitter 18939 Vincent Lefevre severity 18939 important tag 18939 security thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 03 15:57:18 2014 Received: (at submit) by debbugs.gnu.org; 3 Nov 2014 20:57:18 +0000 Received: from localhost ([127.0.0.1]:47912 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XlOgg-0002W7-1a for submit@debbugs.gnu.org; Mon, 03 Nov 2014 15:57:18 -0500 Received: from eggs.gnu.org ([208.118.235.92]:56526) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XlOgd-0002Vz-VQ for submit@debbugs.gnu.org; Mon, 03 Nov 2014 15:57:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XlOgW-0002PV-9X for submit@debbugs.gnu.org; Mon, 03 Nov 2014 15:57:15 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:32836) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XlOgW-0002PR-6x for submit@debbugs.gnu.org; Mon, 03 Nov 2014 15:57:08 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58202) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XlOgP-0004Nq-TY for bug-gnu-emacs@gnu.org; Mon, 03 Nov 2014 15:57:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XlOgH-0002NC-OU for bug-gnu-emacs@gnu.org; Mon, 03 Nov 2014 15:57:01 -0500 Received: from ioooi.vinc17.net ([92.243.22.117]:38537) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XlOgH-00028b-G9 for bug-gnu-emacs@gnu.org; Mon, 03 Nov 2014 15:56:53 -0500 Received: from smtp-xvii.vinc17.net (cirm-ncd20.univ-mrs.fr [139.124.3.100]) by ioooi.vinc17.net (Postfix) with ESMTPSA id 2BB72507; Mon, 3 Nov 2014 21:56:45 +0100 (CET) Received: by xvii.vinc17.org (Postfix, from userid 1000) id 864F121A07A; Mon, 3 Nov 2014 21:56:44 +0100 (CET) From: Vincent Lefevre To: bug-gnu-emacs@gnu.org Subject: 24.4; middle-click sometimes pastes data other than the PRIMARY selection Date: Mon, 03 Nov 2014 21:56:44 +0100 Message-ID: <87k33catpv.fsf@xvii.vinc17.org> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Usually a middle-click pastes the PRIMARY selection, but sometimes it pastes something else. I don't know how to reproduce this bug, but it occurred several times in the last two hours. In GNU Emacs 24.4.1 (x86_64-pc-linux-gnu, GTK+ Version 3.14.3) of 2014-10-25 on trouble, modified by Debian Windowing system distributor `The X.Org Foundation', version 11.0.11601000 System Description: Debian GNU/Linux unstable (sid) Configured using: `configure --build x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib --libexecdir=/usr/lib --localstatedir=/var/lib --infodir=/usr/share/info --mandir=/usr/share/man --with-pop=yes --enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.4/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.4/site-lisp:/usr/share/emacs/site-lisp --build x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib --libexecdir=/usr/lib --localstatedir=/var/lib --infodir=/usr/share/info --mandir=/usr/share/man --with-pop=yes --enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.4/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.4/site-lisp:/usr/share/emacs/site-lisp --with-x=yes --with-x-toolkit=gtk3 --with-toolkit-scroll-bars 'CFLAGS=-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wall' CPPFLAGS=-D_FORTIFY_SOURCE=2 LDFLAGS=-Wl,-z,relro' Important settings: value of $LC_COLLATE: POSIX value of $LC_CTYPE: en_US.UTF-8 value of $LC_TIME: en_DK value of $LANG: POSIX locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: display-time-mode: t show-paren-mode: t tooltip-mode: t electric-indent-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t Recent input: x r e p o r t - b u Recent messages: Loading cjk-enc...done Loading /etc/emacs/site-start.d/50latex-cjk-common.el (source)...done Loading /etc/emacs/site-start.d/50latex-cjk-thai.el (source)...done Loading /etc/emacs/site-start.d/50psvn.el (source)...done Loading /etc/emacs/site-start.d/50python-docutils.el (source)...done Loading /etc/emacs/site-start.d/50rnc-mode.el (source)...done Loading /etc/emacs/site-start.d/50w3m-el.el (source)...done Loading /home/vinc17/share/emacs/site-lisp/mutteditor.el (source)...done Loading time...done For information about GNU Emacs and the GNU system, type C-h C-a. Load-path shadows: /usr/share/emacs24/site-lisp/css-mode/css-mode hides /usr/share/emacs/site-lisp/css-mode/css-mode /usr/share/emacs/24.4/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup /usr/share/emacs/site-lisp/autoconf/autotest-mode hides /usr/share/emacs/site-lisp/autotest-mode /usr/share/emacs24/site-lisp/cmake-data/cmake-mode hides /usr/share/emacs/site-lisp/cmake-mode /usr/share/emacs24/site-lisp/html-helper-mode/tempo hides /usr/share/emacs/24.4/lisp/tempo /usr/share/emacs24/site-lisp/flim/hex-util hides /usr/share/emacs/24.4/lisp/hex-util /usr/share/emacs24/site-lisp/flim/md4 hides /usr/share/emacs/24.4/lisp/md4 /usr/share/emacs24/site-lisp/dictionaries-common/flyspell hides /usr/share/emacs/24.4/lisp/textmodes/flyspell /usr/share/emacs24/site-lisp/dictionaries-common/ispell hides /usr/share/emacs/24.4/lisp/textmodes/ispell /usr/share/emacs/site-lisp/rst hides /usr/share/emacs/24.4/lisp/textmodes/rst /usr/share/emacs24/site-lisp/css-mode/css-mode hides /usr/share/emacs/24.4/lisp/textmodes/css-mode /usr/share/emacs24/site-lisp/flim/hmac-md5 hides /usr/share/emacs/24.4/lisp/net/hmac-md5 /usr/share/emacs24/site-lisp/flim/sasl-ntlm hides /usr/share/emacs/24.4/lisp/net/sasl-ntlm /usr/share/emacs24/site-lisp/flim/sasl-cram hides /usr/share/emacs/24.4/lisp/net/sasl-cram /usr/share/emacs24/site-lisp/flim/ntlm hides /usr/share/emacs/24.4/lisp/net/ntlm /usr/share/emacs24/site-lisp/flim/sasl hides /usr/share/emacs/24.4/lisp/net/sasl /usr/share/emacs24/site-lisp/flim/hmac-def hides /usr/share/emacs/24.4/lisp/net/hmac-def /usr/share/emacs24/site-lisp/flim/sasl-digest hides /usr/share/emacs/24.4/lisp/net/sasl-digest /usr/share/emacs24/site-lisp/latex-cjk-thai/thai-word hides /usr/share/emacs/24.4/lisp/language/thai-word /usr/share/emacs24/site-lisp/html-helper-mode/html-helper-mode hides /usr/share/emacs/site-lisp/html-helper-mode/html-helper-mode /usr/share/emacs24/site-lisp/html-helper-mode/hhm-config hides /usr/share/emacs/site-lisp/html-helper-mode/hhm-config /usr/share/emacs24/site-lisp/html-helper-mode/tempo hides /usr/share/emacs/site-lisp/html-helper-mode/tempo /usr/share/emacs24/site-lisp/html-helper-mode/visual-basic-mode hides /usr/share/emacs/site-lisp/html-helper-mode/visual-basic-mode Features: (shadow sort gnus-util mail-extr warnings emacsbug message format-spec rfc822 mml easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util help-fns mail-prsvr mail-utils time cus-start cus-load paren cc-styles cc-align cc-engine cc-vars cc-defs w3m-load jabber-autoloads time-date tooltip electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind gfilenotify dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) Memory information: ((conses 16 91698 6613) (symbols 48 20147 0) (miscs 40 92 97) (strings 32 15288 4583) (string-bytes 1 446909) (vectors 16 9914) (vector-slots 8 393330 6872) (floats 8 69 217) (intervals 56 233 0) (buffers 960 12) (heap 1024 24993 1000)) From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 16 07:27:46 2014 Received: (at 18939) by debbugs.gnu.org; 16 Nov 2014 12:27:47 +0000 Received: from localhost ([127.0.0.1]:34391 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xpyvi-0000Sz-Gx for submit@debbugs.gnu.org; Sun, 16 Nov 2014 07:27:46 -0500 Received: from ioooi.vinc17.net ([92.243.22.117]:58301) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xpyvg-0000Sp-Av for 18939@debbugs.gnu.org; Sun, 16 Nov 2014 07:27:45 -0500 Received: from smtp-xvii.vinc17.net (128.119.75.86.rev.sfr.net [86.75.119.128]) by ioooi.vinc17.net (Postfix) with ESMTPSA id 33257581; Sun, 16 Nov 2014 13:27:43 +0100 (CET) Received: by xvii.vinc17.org (Postfix, from userid 1000) id 8CF3421A07A; Sun, 16 Nov 2014 13:27:42 +0100 (CET) Date: Sun, 16 Nov 2014 13:27:42 +0100 From: Vincent Lefevre To: 18939@debbugs.gnu.org Subject: Re: 24.4; middle-click sometimes pastes data other than the PRIMARY selection Message-ID: <20141116122742.GA7855@xvii.vinc17.org> References: <87k33catpv.fsf@xvii.vinc17.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87k33catpv.fsf@xvii.vinc17.org> X-Mailer-Info: http://www.vinc17.net/mutt/ User-Agent: Mutt/1.5.23-6365-vl-r59709 (2014-09-07) X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 18939 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) On 2014-11-03 21:56:44 +0100, Vincent Lefevre wrote: > Usually a middle-click pastes the PRIMARY selection, but sometimes > it pastes something else. I don't know how to reproduce this bug, > but it occurred several times in the last two hours. It occurred again. This time I did the following: 1. Middle-click. The correct PRIMARY selection was pasted. 2. Left-click to another position (in the same buffer). 3. Middle-click. But something else was pasted! -- Vincent Lefèvre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon) From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 28 10:03:07 2014 Received: (at 18939) by debbugs.gnu.org; 28 Dec 2014 15:03:07 +0000 Received: from localhost ([127.0.0.1]:59866 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y5FN4-0006z1-SK for submit@debbugs.gnu.org; Sun, 28 Dec 2014 10:03:07 -0500 Received: from ioooi.vinc17.net ([92.243.22.117]:36526) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y5FN1-0006yp-I5 for 18939@debbugs.gnu.org; Sun, 28 Dec 2014 10:03:04 -0500 Received: from smtp-xvii.vinc17.net (jlefevre.net1.nerim.net [80.65.226.245]) by ioooi.vinc17.net (Postfix) with ESMTPSA id 3A0372EA; Sun, 28 Dec 2014 16:03:02 +0100 (CET) Received: by xvii.vinc17.org (Postfix, from userid 1000) id 09E4821A07A; Sun, 28 Dec 2014 16:03:00 +0100 (CET) Date: Sun, 28 Dec 2014 16:03:00 +0100 From: Vincent Lefevre To: 18939@debbugs.gnu.org Subject: Re: 24.4; middle-click sometimes pastes data other than the PRIMARY selection Message-ID: <20141228150300.GA15474@xvii.vinc17.org> References: <87k33catpv.fsf@xvii.vinc17.org> <20141116122742.GA7855@xvii.vinc17.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20141116122742.GA7855@xvii.vinc17.org> X-Mailer-Info: http://www.vinc17.net/mutt/ User-Agent: Mutt/1.5.23-6371-vl-r75100 (2014-11-04) X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 18939 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) This occurs very often, and I've finally managed to find a way to reproduce the bug: 1. Open a file containing a line, say "foo", with "emacs -Q". 2. When the cursor is at the beginning, type C-k. 3. Select text in some other window. 4. Left-click in the initial Emacs window. 5. Middle-click in the initial Emacs window. Instead of pasting the selected text, this pastes what was cut with C-k. -- Vincent Lefèvre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon) From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 28 10:10:31 2014 Received: (at 18939) by debbugs.gnu.org; 28 Dec 2014 15:10:31 +0000 Received: from localhost ([127.0.0.1]:59872 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y5FUF-0007AJ-5U for submit@debbugs.gnu.org; Sun, 28 Dec 2014 10:10:31 -0500 Received: from ioooi.vinc17.net ([92.243.22.117]:36528) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y5FUC-0007A7-T6; Sun, 28 Dec 2014 10:10:29 -0500 Received: from smtp-xvii.vinc17.net (jlefevre.net1.nerim.net [80.65.226.245]) by ioooi.vinc17.net (Postfix) with ESMTPSA id 39ACF30C; Sun, 28 Dec 2014 16:10:28 +0100 (CET) Received: by xvii.vinc17.org (Postfix, from userid 1000) id 40D8121A07A; Sun, 28 Dec 2014 16:10:27 +0100 (CET) Date: Sun, 28 Dec 2014 16:10:27 +0100 From: Vincent Lefevre To: 18939@debbugs.gnu.org Subject: Re: 24.4; middle-click sometimes pastes data other than the PRIMARY selection Message-ID: <20141228151027.GA25646@xvii.vinc17.org> References: <87k33catpv.fsf@xvii.vinc17.org> <20141116122742.GA7855@xvii.vinc17.org> <20141228150300.GA15474@xvii.vinc17.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20141228150300.GA15474@xvii.vinc17.org> X-Mailer-Info: http://www.vinc17.net/mutt/ User-Agent: Mutt/1.5.23-6371-vl-r75100 (2014-11-04) X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 18939 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) retitle 18939 24.4; a left-click in Emacs sometimes modifies the PRIMARY selection thanks On 2014-12-28 16:03:00 +0100, Vincent Lefevre wrote: > This occurs very often, and I've finally managed to find a way to > reproduce the bug: > > 1. Open a file containing a line, say "foo", with "emacs -Q". > > 2. When the cursor is at the beginning, type C-k. > > 3. Select text in some other window. > > 4. Left-click in the initial Emacs window. > > 5. Middle-click in the initial Emacs window. > > Instead of pasting the selected text, this pastes what was cut > with C-k. Note: in 5, the middle-click can also be done in an xterm, with the same problem. What actually occurred is that in 4, the PRIMARY was modified, while a left-click should never have modified anything! -- Vincent Lefèvre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon) From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 30 12:18:06 2014 Received: (at 18939) by debbugs.gnu.org; 30 Dec 2014 17:18:06 +0000 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 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 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) 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) 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) From: rjs@netti.fi (Riku Saikkonen) To: 18939@debbugs.gnu.org Subject: Re: 24.4; middle-click sometimes pastes data other than the PRIMARY selection User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) Date: Tue, 30 Dec 2014 12:45:12 +0200 Message-ID: <87zja54ds7.fsf@anar.lloke.localnet> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 18939 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 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) 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 . From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 03 21:23:43 2015 Received: (at 18939) by debbugs.gnu.org; 4 Jan 2015 02:23:43 +0000 Received: from localhost ([127.0.0.1]:35906 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y7ar0-0007u2-FV for submit@debbugs.gnu.org; Sat, 03 Jan 2015 21:23:42 -0500 Received: from ioooi.vinc17.net ([92.243.22.117]:37366) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y7aqx-0007tV-KH for 18939@debbugs.gnu.org; Sat, 03 Jan 2015 21:23:40 -0500 Received: from smtp-xvii.vinc17.net (128.119.75.86.rev.sfr.net [86.75.119.128]) by ioooi.vinc17.net (Postfix) with ESMTPSA id 8B820444; Sun, 4 Jan 2015 03:23:38 +0100 (CET) Received: by xvii.vinc17.org (Postfix, from userid 1000) id 2045E21A07A; Sun, 4 Jan 2015 03:23:37 +0100 (CET) Date: Sun, 4 Jan 2015 03:23:37 +0100 From: Vincent Lefevre To: Riku Saikkonen Subject: Re: 24.4; middle-click sometimes pastes data other than the PRIMARY selection Message-ID: <20150104022337.GA15906@xvii.vinc17.org> References: <87zja54ds7.fsf@anar.lloke.localnet> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="n8g4imXOkfNTN/H1" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87zja54ds7.fsf@anar.lloke.localnet> X-Mailer-Info: http://www.vinc17.net/mutt/ User-Agent: Mutt/1.5.23-6371-vl-r75100 (2014-11-04) X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 18939 Cc: 774090@bugs.debian.org, 18939@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --n8g4imXOkfNTN/H1 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit [Cc to the Debian bug] On 2014-12-30 12:45:12 +0200, Riku Saikkonen wrote: > 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) [...] How about locally setting select-active-regions to nil for (deactivate-mark)? See attached patch, which seems to work for me, though I don't know all the consequences. It is inspired from the patch suggested at http://debbugs.gnu.org/cgi/bugreport.cgi?bug=6872#8 and the one that was really applied as 1c409d0b963ebdb1f48b90ddce85c56d989bee5f. -- Vincent Lefèvre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon) --n8g4imXOkfNTN/H1 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="emacs24-primarysel2.patch" diff --git a/lisp/mouse.el b/lisp/mouse.el index e267418..2afe313 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -856,7 +856,8 @@ DO-MOUSE-DRAG-REGION-POST-PROCESS should only be used by (copy-region-as-kill (mark) (point))))) ;; Otherwise, run binding of terminating up-event. - (deactivate-mark) + (let (select-active-regions) + (deactivate-mark)) (if do-multi-click (goto-char start-point) (unless moved-off-start --n8g4imXOkfNTN/H1-- From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 17 20:17:37 2015 Received: (at 18939) by debbugs.gnu.org; 18 Jan 2015 01:17:38 +0000 Received: from localhost ([127.0.0.1]:60419 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YCeUj-0002em-IM for submit@debbugs.gnu.org; Sat, 17 Jan 2015 20:17:37 -0500 Received: from fencepost.gnu.org ([208.118.235.10]:51144 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YCeUg-0002ed-LT for 18939@debbugs.gnu.org; Sat, 17 Jan 2015 20:17:35 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1YCeUe-0004ki-Sk; Sat, 17 Jan 2015 20:17:32 -0500 From: Glenn Morris To: rjs@netti.fi (Riku Saikkonen) Subject: Re: bug#18939: 24.4; middle-click sometimes pastes data other than the PRIMARY selection References: <87k33catpv.fsf@xvii.vinc17.org> <87zja54ds7.fsf@anar.lloke.localnet> X-Spook: Indigo benelux 22nd SAS TELINT LABLINK lock picking AMEMB X-Ran: oxEF(~oMfaB-*7-UaYz96kJT?9TX|My'Qc_P4zWofWOy!VJW=I7r7+>d$BM!cH3+;LN|.T X-Hue: cyan X-Attribution: GM Date: Sat, 17 Jan 2015 20:17:32 -0500 In-Reply-To: <87zja54ds7.fsf@anar.lloke.localnet> (Riku Saikkonen's message of "Tue, 30 Dec 2014 12:45:12 +0200") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 18939 Cc: 18939@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Riku Saikkonen wrote: > PS. I found out about this bug because Debian currently considers it to > be a release-critical bug; see . FWIW, that severity was self-assigned by the OP. For those who care about such things, this has apparently has a (placeholder?) CVE number (CVE-2014-9483) now. (It might have been nice if these developments had been mentioned here.) See eg http://www.scip.ch/en/?vuldb.68502 # "critical" (?!) http://xforce.iss.net/xforce/xfdb/99688 # medium risk From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 17 20:17:51 2015 Received: (at control) by debbugs.gnu.org; 18 Jan 2015 01:17:51 +0000 Received: from localhost ([127.0.0.1]:60422 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YCeUw-0002fG-V4 for submit@debbugs.gnu.org; Sat, 17 Jan 2015 20:17:51 -0500 Received: from fencepost.gnu.org ([208.118.235.10]:51145 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YCeUv-0002f6-5k for control@debbugs.gnu.org; Sat, 17 Jan 2015 20:17:49 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1YCeUu-0004nQ-Ri for control@debbugs.gnu.org; Sat, 17 Jan 2015 20:17:48 -0500 Date: Sat, 17 Jan 2015 20:17:48 -0500 Message-Id: Subject: control message for bug 18939 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) severity 18939 important tag 18939 security From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 03 16:21:06 2015 Received: (at control) by debbugs.gnu.org; 3 Feb 2015 21:21:06 +0000 Received: from localhost ([127.0.0.1]:33185 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YIkuA-00045n-Ew for submit@debbugs.gnu.org; Tue, 03 Feb 2015 16:21:06 -0500 Received: from fencepost.gnu.org ([208.118.235.10]:55249 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YIku9-00045g-26 for control@debbugs.gnu.org; Tue, 03 Feb 2015 16:21:05 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1YIku8-0003L7-SA for control@debbugs.gnu.org; Tue, 03 Feb 2015 16:21:04 -0500 Date: Tue, 03 Feb 2015 16:21:04 -0500 Message-Id: Subject: control message for bug 19758 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) block 19758 by 18784 18939 From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 21 09:42:37 2015 Received: (at 18939) by debbugs.gnu.org; 21 Mar 2015 13:42:37 +0000 Received: from localhost ([127.0.0.1]:59632 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YZJfh-0006dG-Bf for submit@debbugs.gnu.org; Sat, 21 Mar 2015 09:42:37 -0400 Received: from chene.dit.umontreal.ca ([132.204.246.20]:47900) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YZJfe-0006d7-8j for 18939@debbugs.gnu.org; Sat, 21 Mar 2015 09:42:35 -0400 Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id t2LDgWtw005726; Sat, 21 Mar 2015 09:42:33 -0400 Received: by pastel.home (Postfix, from userid 20848) id A2E00127B; Sat, 21 Mar 2015 09:42:32 -0400 (EDT) From: Stefan Monnier To: Vincent Lefevre Subject: Re: bug#18939: 24.4; middle-click sometimes pastes data other than the PRIMARY selection Message-ID: References: <87k33catpv.fsf@xvii.vinc17.org> <20141116122742.GA7855@xvii.vinc17.org> <20141228150300.GA15474@xvii.vinc17.org> Date: Sat, 21 Mar 2015 09:42:32 -0400 In-Reply-To: <20141228150300.GA15474@xvii.vinc17.org> (Vincent Lefevre's message of "Sun, 28 Dec 2014 16:03:00 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV5252=0 X-NAI-Spam-Version: 2.3.0.9393 : core <5252> : inlines <2455> : streams <1409162> : uri <1886380> X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: 18939 Cc: 18939@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.3 (-) > This occurs very often, and I've finally managed to find a way to > reproduce the bug: > 1. Open a file containing a line, say "foo", with "emacs -Q". > 2. When the cursor is at the beginning, type C-k. > 3. Select text in some other window. > 4. Left-click in the initial Emacs window. > 5. Middle-click in the initial Emacs window. > Instead of pasting the selected text, this pastes what was cut > with C-k. I can't reproduce it here. I did the following: % emacs24 -Q ; That's Debian's Emacs-24.4 M-< C-k C-x 5 b *Messages* drag-mouse-1 [ in *Messages*, to select "information" ] mouse-1 [ in *scratch* ] mouse-2 [ in *scratch* ] Result: it inserted "information", as it should. Stefan From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 21 15:35:34 2015 Received: (at 18939) by debbugs.gnu.org; 21 Mar 2015 19:35:34 +0000 Received: from localhost ([127.0.0.1]:60051 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YZPBF-0006cF-PY for submit@debbugs.gnu.org; Sat, 21 Mar 2015 15:35:34 -0400 Received: from ioooi.vinc17.net ([92.243.22.117]:48674) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YZPBD-0006c6-9N for 18939@debbugs.gnu.org; Sat, 21 Mar 2015 15:35:32 -0400 Received: by ioooi.vinc17.net (Postfix, from userid 1001) id 85B1A88E; Sat, 21 Mar 2015 20:35:28 +0100 (CET) Date: Sat, 21 Mar 2015 20:35:28 +0100 From: Vincent Lefevre To: Stefan Monnier Subject: Re: bug#18939: 24.4; middle-click sometimes pastes data other than the PRIMARY selection Message-ID: <20150321193528.GB20167@ioooi.vinc17.net> References: <87k33catpv.fsf@xvii.vinc17.org> <20141116122742.GA7855@xvii.vinc17.org> <20141228150300.GA15474@xvii.vinc17.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Mailer-Info: http://www.vinc17.net/mutt/ User-Agent: Mutt/1.5.23-6425-vl-r76280 (2015-03-04) X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 18939 Cc: 18939@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) On 2015-03-21 09:42:32 -0400, Stefan Monnier wrote: > > This occurs very often, and I've finally managed to find a way to > > reproduce the bug: > > > 1. Open a file containing a line, say "foo", with "emacs -Q". > > > 2. When the cursor is at the beginning, type C-k. > > > 3. Select text in some other window. ^^^^^ > > 4. Left-click in the initial Emacs window. > > > 5. Middle-click in the initial Emacs window. > > > Instead of pasting the selected text, this pastes what was cut > > with C-k. > > I can't reproduce it here. > I did the following: > > % emacs24 -Q ; That's Debian's Emacs-24.4 > M-< C-k > C-x 5 b *Messages* > drag-mouse-1 [ in *Messages*, to select "information" ] It step 3, it must be another window (e.g. xterm, or even some other Emacs window at least if it is not the same process). -- Vincent Lefèvre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon) From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 21 18:25:06 2015 Received: (at 18939) by debbugs.gnu.org; 21 Mar 2015 22:25:06 +0000 Received: from localhost ([127.0.0.1]:60131 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YZRpK-0002Hw-AG for submit@debbugs.gnu.org; Sat, 21 Mar 2015 18:25:06 -0400 Received: from chene.dit.umontreal.ca ([132.204.246.20]:51577) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YZRpH-0002Hm-Qg for 18939@debbugs.gnu.org; Sat, 21 Mar 2015 18:25:04 -0400 Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id t2LMP1wp001248; Sat, 21 Mar 2015 18:25:02 -0400 Received: by pastel.home (Postfix, from userid 20848) id AA57BEC1; Sat, 21 Mar 2015 18:25:01 -0400 (EDT) From: Stefan Monnier To: Vincent Lefevre Subject: Re: bug#18939: 24.4; middle-click sometimes pastes data other than the PRIMARY selection Message-ID: References: <87k33catpv.fsf@xvii.vinc17.org> <20141116122742.GA7855@xvii.vinc17.org> <20141228150300.GA15474@xvii.vinc17.org> <20150321193528.GB20167@ioooi.vinc17.net> Date: Sat, 21 Mar 2015 18:25:01 -0400 In-Reply-To: <20150321193528.GB20167@ioooi.vinc17.net> (Vincent Lefevre's message of "Sat, 21 Mar 2015 20:35:28 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV5252=0 X-NAI-Spam-Version: 2.3.0.9393 : core <5252> : inlines <2455> : streams <1409362> : uri <1886674> X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: 18939 Cc: 18939@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.3 (-) >> % emacs24 -Q ; That's Debian's Emacs-24.4 >> M-< C-k >> C-x 5 b *Messages* >> drag-mouse-1 [ in *Messages*, to select "information" ] > It step 3, it must be another window With C-x 5 b I did get another window (frame). > (e.g. xterm, or even some other Emacs window at least if it is not the > same process). I haven't tried with another Emacs process, but I did try with an xterm and got the same result. What do you get if you follow my recipe? Stefan From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 21 21:43:03 2015 Received: (at 18939) by debbugs.gnu.org; 22 Mar 2015 01:43:03 +0000 Received: from localhost ([127.0.0.1]:60173 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YZUut-0006ms-9U for submit@debbugs.gnu.org; Sat, 21 Mar 2015 21:43:03 -0400 Received: from ioooi.vinc17.net ([92.243.22.117]:48720) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YZUuq-0006mS-2c for 18939@debbugs.gnu.org; Sat, 21 Mar 2015 21:43:00 -0400 Received: from smtp-xvii.vinc17.net (128.119.75.86.rev.sfr.net [86.75.119.128]) by ioooi.vinc17.net (Postfix) with ESMTPSA id B844D298; Sun, 22 Mar 2015 02:42:58 +0100 (CET) Received: by xvii.vinc17.org (Postfix, from userid 1000) id 450E421A079; Sun, 22 Mar 2015 02:42:58 +0100 (CET) Date: Sun, 22 Mar 2015 02:42:58 +0100 From: Vincent Lefevre To: Stefan Monnier Subject: Re: bug#18939: 24.4; middle-click sometimes pastes data other than the PRIMARY selection Message-ID: <20150322014257.GI5205@xvii.vinc17.org> References: <87k33catpv.fsf@xvii.vinc17.org> <20141116122742.GA7855@xvii.vinc17.org> <20141228150300.GA15474@xvii.vinc17.org> <20150321193528.GB20167@ioooi.vinc17.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Mailer-Info: http://www.vinc17.net/mutt/ User-Agent: Mutt/1.5.23-6425-vl-r76280 (2015-03-04) X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 18939 Cc: 18939@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) On 2015-03-21 18:25:01 -0400, Stefan Monnier wrote: > >> % emacs24 -Q ; That's Debian's Emacs-24.4 > >> M-< C-k > >> C-x 5 b *Messages* > >> drag-mouse-1 [ in *Messages*, to select "information" ] > > It step 3, it must be another window > > With C-x 5 b I did get another window (frame). Yes, but this also has the effect to do other operations in the Emacs process. > > (e.g. xterm, or even some other Emacs window at least if it is not the > > same process). > > I haven't tried with another Emacs process, but I did try with an xterm > and got the same result. > What do you get if you follow my recipe? Emacs behaves correctly in this case. Ditto if I do the C-x 5 b *Messages* before the M-< C-k. But if the other window belongs to a different process, the bug occurs. -- Vincent Lefèvre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon) From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 22 14:34:07 2015 Received: (at 18939-done) by debbugs.gnu.org; 22 Mar 2015 18:34:07 +0000 Received: from localhost ([127.0.0.1]:60928 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YZkhL-0006oA-6S for submit@debbugs.gnu.org; Sun, 22 Mar 2015 14:34:07 -0400 Received: from mailfe08.swip.net ([212.247.154.225]:57288 helo=swip.net) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YZkhI-0006nX-Ga for 18939-done@debbugs.gnu.org; Sun, 22 Mar 2015 14:34:05 -0400 X-T2-Spam-Status: No, hits=-0.0 required=5.0 tests=BAYES_40 Received: from hosdjarv.se (account mj138573@tele2.se [46.59.42.57] verified) by mailfe08.swip.net (CommuniGate Pro SMTP 5.4.4) with ESMTPA id 583364905; Sun, 22 Mar 2015 19:33:57 +0100 Message-ID: <550F0B15.5080309@swipnet.se> Date: Sun, 22 Mar 2015 19:33:57 +0100 From: =?windows-1252?Q?Jan_Dj=E4rv?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Vincent Lefevre , Stefan Monnier Subject: Re: bug#18939: 24.4; middle-click sometimes pastes data other than the PRIMARY selection References: <87k33catpv.fsf@xvii.vinc17.org> <20141116122742.GA7855@xvii.vinc17.org> <20141228150300.GA15474@xvii.vinc17.org> <20150321193528.GB20167@ioooi.vinc17.net> <20150322014257.GI5205@xvii.vinc17.org> In-Reply-To: <20150322014257.GI5205@xvii.vinc17.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 18939-done Cc: 18939-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Hi. It seems I introduced this bug when fixing 16382. The analysis that mouse-drag-track has something to do with this is correct, however it is not pop-mark, it is deactivate-mark who sets PRIMARY wrongly sometimes (pop-mark may itself call deactivate-mark). I have checked in a fix in the emacs-24 branch. Jan D. Den 2015-03-22 02:42, Vincent Lefevre skrev: > On 2015-03-21 18:25:01 -0400, Stefan Monnier wrote: >>>> % emacs24 -Q ; That's Debian's Emacs-24.4 >>>> M-< C-k >>>> C-x 5 b *Messages* >>>> drag-mouse-1 [ in *Messages*, to select "information" ] >>> It step 3, it must be another window >> >> With C-x 5 b I did get another window (frame). > > Yes, but this also has the effect to do other operations in > the Emacs process. > >>> (e.g. xterm, or even some other Emacs window at least if it is not the >>> same process). >> >> I haven't tried with another Emacs process, but I did try with an xterm >> and got the same result. >> What do you get if you follow my recipe? > > Emacs behaves correctly in this case. Ditto if I do the > C-x 5 b *Messages* before the M-< C-k. But if the other window > belongs to a different process, the bug occurs. > From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 22 14:39:58 2015 Received: (at 18939) by debbugs.gnu.org; 22 Mar 2015 18:39:58 +0000 Received: from localhost ([127.0.0.1]:60940 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YZkn0-0006x7-Jm for submit@debbugs.gnu.org; Sun, 22 Mar 2015 14:39:58 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:40497 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YZkmy-0006x0-V8 for 18939@debbugs.gnu.org; Sun, 22 Mar 2015 14:39:57 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1YZkmx-0003JL-V7; Sun, 22 Mar 2015 14:39:56 -0400 From: Glenn Morris To: Stefan Monnier Subject: Re: bug#18939: 24.4; middle-click sometimes pastes data other than the PRIMARY selection References: <87k33catpv.fsf@xvii.vinc17.org> <20141116122742.GA7855@xvii.vinc17.org> <20141228150300.GA15474@xvii.vinc17.org> <20150321193528.GB20167@ioooi.vinc17.net> X-Spook: BROMURE explosion ANZUS Bush Wired SAPO doctrine defense X-Ran: Z[@KiK%Zl#b"O (Stefan Monnier's message of "Sat, 21 Mar 2015 18:25:01 -0400") Message-ID: <8ssicw511g.fsf@fencepost.gnu.org> User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 18939 Cc: Vincent Lefevre , 18939@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Stefan Monnier wrote: > I haven't tried with another Emacs process, but I did try with an xterm > and got the same result. Totally reproducible for me in emacs-24 or Debian's 24, but curiously not apparently in master... If someone else sees the same, they might try bisecting to find what fixed it. There does seem to be weirdness in that some times it does _not_ happen even with 24. I think maybe I convinced myself this was due to selecting Emacs by clicking on the window border rather than in the actual body of scratch. But that could be coincidence I suppose. in xterm: emacs -Q M-< C-k # in scratch mouse-1 on xterm that launched Emacs, double mouse-1 on "emacs" mouse-1 # in scratch. NB in the buffer, not eg on the WM frame mouse-2 -> ";; This buffer is for notes..." This is under XFCE on Debian testing, in case that matters, with WM focus-follows-click. From unknown Thu Sep 11 13:37:32 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 20 Apr 2015 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator