From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#32747: 26; `C-M-w M-w' with non-nil `mouse-drag-copy-region', if selected with mouse Date: Wed, 19 Sep 2018 17:38:22 +0300 Message-ID: <83pnx9een5.fsf@gnu.org> References: <> <<83tvmlew2a.fsf@gnu.org>> <932a1915-c043-4708-9f16-dc0ee8fafdb3@default> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1537367828 30539 195.159.176.226 (19 Sep 2018 14:37:08 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 19 Sep 2018 14:37:08 +0000 (UTC) Cc: 32747@debbugs.gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Sep 19 16:37:04 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g2dbC-0007ng-CC for geb-bug-gnu-emacs@m.gmane.org; Wed, 19 Sep 2018 16:37:02 +0200 Original-Received: from localhost ([::1]:45707 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g2ddJ-0005iT-0M for geb-bug-gnu-emacs@m.gmane.org; Wed, 19 Sep 2018 10:39:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42013) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g2ddC-0005iO-O9 for bug-gnu-emacs@gnu.org; Wed, 19 Sep 2018 10:39:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g2dd8-0003Oq-J6 for bug-gnu-emacs@gnu.org; Wed, 19 Sep 2018 10:39:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:41601) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g2dd8-0003OO-EW for bug-gnu-emacs@gnu.org; Wed, 19 Sep 2018 10:39:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1g2dd8-000399-6y for bug-gnu-emacs@gnu.org; Wed, 19 Sep 2018 10:39:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 19 Sep 2018 14:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32747 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 32747-submit@debbugs.gnu.org id=B32747.153736791312042 (code B ref 32747); Wed, 19 Sep 2018 14:39:02 +0000 Original-Received: (at 32747) by debbugs.gnu.org; 19 Sep 2018 14:38:33 +0000 Original-Received: from localhost ([127.0.0.1]:45859 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g2dcf-000389-2c for submit@debbugs.gnu.org; Wed, 19 Sep 2018 10:38:33 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:49044) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g2dce-00037w-9D for 32747@debbugs.gnu.org; Wed, 19 Sep 2018 10:38:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g2dcW-0002gY-D3 for 32747@debbugs.gnu.org; Wed, 19 Sep 2018 10:38:27 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:42949) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g2dcU-0002dz-8d; Wed, 19 Sep 2018 10:38:23 -0400 Original-Received: from [176.228.60.248] (port=1082 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1g2dcT-0000ag-PO; Wed, 19 Sep 2018 10:38:22 -0400 In-reply-to: <932a1915-c043-4708-9f16-dc0ee8fafdb3@default> (message from Drew Adams on Wed, 19 Sep 2018 06:51:40 -0700 (PDT)) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:150453 Archived-At: > Date: Wed, 19 Sep 2018 06:51:40 -0700 (PDT) > From: Drew Adams > Cc: 32747@debbugs.gnu.org > > Anyay, replaying the recipe now (again, from -Q), I see the bad > behavior in _all_ Emacs releases (including back to Emacs 20, > when there was no variable `mouse-drag-copy-region'). Makes sense, because those versions worked as if mouse-drag-copy-region was t. Emacs 22.1 added that variable, and you should be able to see the problem go away starting from that version, when this variable is nil. > In Emacs 23.4, changing `mouse-drag-copy-region' to nil does _not_ > fix the behavior, for me. Are you sure that it does, for you? Yes. I just rechecked again, to be sure. I don't understand why it doesn't work for you, maybe it's something specific to your system, or maybe that Emacs binary is somehow different from mine (unlikely). Or maybe you made some mistake in reproducing the behavior in that version. > In Emacs 24.5 and later the bad behavior exists only when the > variable is non-nil. When that variable is non-nil, what you see is expected behavior, see below. > So the bug does not seem to be a regression, and it is longstanding. > Perhaps no one ever tried to use `C-M-w M-w' with a mouse > selection when testing? Indeed, with that variable non-nil, users are not expected to copy and paste using the keyboard, they are expected to do that with the mouse. And they certainly aren't expected to mix both methods in the same sequence of actions on the same text. > Do you agree that this is a bug? No, I think it's expected. When that variable is non-nil, making the second selection automatically copies the selected text into the kill-ring, so your C-M-w affects the next M-w, which copies the same text. The text of the first selection should be available with M-y, as it is one slot down in the kill-ring (and should also be there twice, for the same reason). > To me, this is a bug. The behavior contradicts what the doc says for > `C-M-w', and the behavior is useless (why would anyone want > duplication of the mouse selection - appending it to itself instead > of the previous kill?) You create the duplication by using M-w, because with that variable non-nil, there's no need for M-w, as selected text automatically gets placed in the kill-ring as soon as it is selected. This mode is for people who select and copy/paste with the mouse, not with the keyboard. What documentation does this contradict? Perhaps we should clarify that, but in general you are doing something unexpected: mixing the mouse-based selection and copy/paste paradigm with the keyboard-based one. They are supposed to be separate, and the defaults since Emacs 24 make sure they are.