From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Drew Adams 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 06:51:40 -0700 (PDT) Message-ID: <932a1915-c043-4708-9f16-dc0ee8fafdb3@default> References: <> <<83tvmlew2a.fsf@gnu.org>> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1537365076 32471 195.159.176.226 (19 Sep 2018 13:51:16 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 19 Sep 2018 13:51:16 +0000 (UTC) Cc: 32747@debbugs.gnu.org To: Eli Zaretskii , Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Sep 19 15:51:12 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 1g2csn-0008Gr-N1 for geb-bug-gnu-emacs@m.gmane.org; Wed, 19 Sep 2018 15:51:09 +0200 Original-Received: from localhost ([::1]:45588 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g2cuu-0002T2-AE for geb-bug-gnu-emacs@m.gmane.org; Wed, 19 Sep 2018 09:53:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48649) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g2cul-0002Se-5W for bug-gnu-emacs@gnu.org; Wed, 19 Sep 2018 09:53:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g2cuf-0001W6-Pj for bug-gnu-emacs@gnu.org; Wed, 19 Sep 2018 09:53:11 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:41018) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g2cuc-0001Uz-MQ for bug-gnu-emacs@gnu.org; Wed, 19 Sep 2018 09:53:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1g2cuc-0001dH-GW for bug-gnu-emacs@gnu.org; Wed, 19 Sep 2018 09:53:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 19 Sep 2018 13:53: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.15373651576235 (code B ref 32747); Wed, 19 Sep 2018 13:53:02 +0000 Original-Received: (at 32747) by debbugs.gnu.org; 19 Sep 2018 13:52:37 +0000 Original-Received: from localhost ([127.0.0.1]:45276 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g2cuD-0001cV-DG for submit@debbugs.gnu.org; Wed, 19 Sep 2018 09:52:37 -0400 Original-Received: from userp2120.oracle.com ([156.151.31.85]:45656) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g2cuA-0001cD-RL for 32747@debbugs.gnu.org; Wed, 19 Sep 2018 09:52:35 -0400 Original-Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w8JDhxiH115322; Wed, 19 Sep 2018 13:52:28 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=hlbp2HxvwrBYb5H4alIlXDA1iDvnKI3KuduQ9uqw12M=; b=c+ZtgcHWAkqqlO6fhrc0D7i9lHyy0mGkRMixsa6KPGKfVyXV7A2ToSMyTpbdGNo/ka3E w5CHffHT7byWGqBUgLAYsM/tqSea9jmAh4KK97oRgPACPJJ97TKQezFKhzbC7Ckxftgj uQNsWEsboRz7wYmnkfpGWNOWrsqVYbd40GQD48LGGMXPidDM1cKx2Bsnr8W3ztGiwJ2f bHOHxGvtE0Ky47C46xdgks9BpAQCtNluC/npr97c5fdxVNYFnAfwPYNMNL456CWgqz2R hsLGzi6XBATFAEIXng5DxBpITz3ldQeTKwUvgeaNxfVF5n81jrTXe7HZJJQ9/cu3eTQn Ig== Original-Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp2120.oracle.com with ESMTP id 2mgtqr327k-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 19 Sep 2018 13:52:28 +0000 Original-Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w8JDqMmp009712 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 19 Sep 2018 13:52:22 GMT Original-Received: from abhmp0002.oracle.com (abhmp0002.oracle.com [141.146.116.8]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w8JDqENX009814; Wed, 19 Sep 2018 13:52:18 GMT In-Reply-To: <<83tvmlew2a.fsf@gnu.org>> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4735.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9020 signatures=668707 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=849 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1809190139 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:150452 Archived-At: > > 1. emacs -Q > > 2. (setq mouse-drag-copy-region t) ; Mouse selection copies to kill-rin= g. > > 3. In *scratch*, select some text, e.g. "This buffer". > > 4. Use `M-w' to copy the selected text to the kill ring. > > 5. With the mouse, select some other text, e.g. "visit that file". > > 6. Use `C-M-w M-w', to append the second selection to the first as the > > last kill. The kill should thus be "This buffervisit that file". > > 7. `C-y' to yank the last kill. > > > > The text yanked should be "This buffervisit that file". Instead, it is > > "visit that filevisit that file". That is, the second selection is > > added to the kill ring and appended to itself. >=20 > I see something almost opposite: >=20 > . in Emacs 23.4, the above recipe produces the "wrong" behavior, > unless I set mouse-drag-copy-region to nil (it is t by default) >=20 > . in Emacs 24 and later, mouse-drag-copy-region is nil by default, so > the recipe works in "emacs -Q" without any customizations, but if I > set mouse-drag-copy-region to t, I get the old "wrong" Emacs 23 > behavior >=20 > So I wonder what is going on with your system that you seem to see > such strikingly different results. Thanks for checking this. Apologies. Dunno what I was seeing, or thought I was seeing, for Emacs 23.4. Perhaps I was mixed up by not realizing that the default value for the variable was different, and perhaps not testing both cases or something. 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'). 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? Both nil and t values just duplicate the mouse selection - the first text selected and copied to the kill-ring with `M-w' is not present in either case. In Emacs 24.5 and later the bad behavior exists only when the variable is non-nil. 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? Do you agree that this is a bug? If not, do you agree that it is a worthwhile enhancement request that `C-M-w' be able to affect a mouse selection the same way it affects a selection made with the keyboard? 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?) (The same problem exists for an actual kill, BTW. E.g. following `C-M-w' with `C-w' instead of `M-w'.) That I see the problem in Emacs 23.4 with both values of the variable, and I see it in older releases where the variable does not exist yet, maybe provides a clue for fixing the bug; dunno. Whatever is done now for the nil case works correctly.