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#18090: 24.4.50; `delete-selection-helper' logic changed for non-mouse region? Date: Thu, 20 Sep 2018 14:55:58 -0700 (PDT) Message-ID: References: <95e066b9-792c-4b38-8f4b-fd225578ed45@default> <9859e098-daf7-4b67-a8a6-c53d01a18f93@default> <83fty4elsx.fsf@gnu.org> <87pnx8xckg.fsf@mail.linkov.net> 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 1537480510 18210 195.159.176.226 (20 Sep 2018 21:55:10 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 20 Sep 2018 21:55:10 +0000 (UTC) Cc: 18090@debbugs.gnu.org To: Juri Linkov , Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Sep 20 23:55:06 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 1g36uf-0004cw-MQ for geb-bug-gnu-emacs@m.gmane.org; Thu, 20 Sep 2018 23:55:05 +0200 Original-Received: from localhost ([::1]:52925 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g36wm-0003GB-A7 for geb-bug-gnu-emacs@m.gmane.org; Thu, 20 Sep 2018 17:57:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57375) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g36wd-0003G5-AS for bug-gnu-emacs@gnu.org; Thu, 20 Sep 2018 17:57:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g36wY-0001aF-BY for bug-gnu-emacs@gnu.org; Thu, 20 Sep 2018 17:57:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:43175) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g36wY-0001Zx-6r for bug-gnu-emacs@gnu.org; Thu, 20 Sep 2018 17:57:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1g36wY-0004Az-03 for bug-gnu-emacs@gnu.org; Thu, 20 Sep 2018 17:57: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: Thu, 20 Sep 2018 21:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18090 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 18090-submit@debbugs.gnu.org id=B18090.153748056915980 (code B ref 18090); Thu, 20 Sep 2018 21:57:01 +0000 Original-Received: (at 18090) by debbugs.gnu.org; 20 Sep 2018 21:56:09 +0000 Original-Received: from localhost ([127.0.0.1]:47433 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g36vh-00049g-Ec for submit@debbugs.gnu.org; Thu, 20 Sep 2018 17:56:09 -0400 Original-Received: from userp2130.oracle.com ([156.151.31.86]:44206) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g36vg-00049S-5r for 18090@debbugs.gnu.org; Thu, 20 Sep 2018 17:56:08 -0400 Original-Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w8KLrc7S120229; Thu, 20 Sep 2018 21:56:01 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=W7g7DkwW3/37wHcc3msDA/nFYUTsW+jlYPeZz+65pik=; b=rUlItCmEWzyEUu+rLWsF4CiOx+z/4uAxCCbQR5gdkzlahYfcNxm6cmNFz2+ormFbb0mA YSWSSVVFxOef3BmROVWg6R4Dqc/U41NyIiajlmJZJQN+xR43kiY/2fRa3BT9HikxvLFr 387TmHJyDY9gVe8mzOV3jBsbyvBcp1uA2AyPDFTVlNzqBkFAaW77xjo1m5Ye5hBWpIKE 6X28qyGfJl7Q9VELt28Xerzn7tIO7j0Ylyix+JAx6AReTzCUc7mz3iWFyDWo9cFXwy06 Bhd0lI+gw2WoK3ObCrThh4CPEUHNGEFCT0vPmtGWrt5RhPv1VQCqcLXL2MY59/XfFeJS TQ== Original-Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp2130.oracle.com with ESMTP id 2mmkm201w2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 20 Sep 2018 21:56:01 +0000 Original-Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w8KLu0Vk000382 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 20 Sep 2018 21:56:00 GMT Original-Received: from abhmp0010.oracle.com (abhmp0010.oracle.com [141.146.116.16]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w8KLtxxx002840; Thu, 20 Sep 2018 21:55:59 GMT In-Reply-To: <87pnx8xckg.fsf@mail.linkov.net> 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=9022 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=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1809200212 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:150498 Archived-At: > I see that mouse operations are not supported by delete-selection-mode > anyway - yanking with doesn't replace the selected region, Huh? I kill some text (or copy it to the kill-ring). Then I select some other text with the mouse. Then I type or I yank. The typed or yanked text replaces the mouse-selected text. What am I missing? > so the whole > =09 (when (and (string=3D (buffer-substring-no-properties > =09=09=09=09 (point) (mark)) (car kill-ring)) > =09=09=09(fboundp 'mouse-region-match) > =09=09=09(mouse-region-match)) > =09 (current-kill 1)) > could be deleted altogether. =20 Why would we do that? That's been there forever - except for the mouse-region-match part that you added (subject of this report). > Otherwise, if there is a wish to support > mouse yanking, a separate enhancement request could be created. Why do you think that clause is about mouse yanking? It's about using a command that has `yank' as the value of its `delete-selection' property. > I don't understand this bug report too - in fact, there is no bug, > the purpose of the old change was to remove gratuitous optimization > that breaks keyboard macros (the result of yanking should not depend > on differences between old and new text),=20 Sorry, but I don't understand that. What old change? What optimization? What macro breakage (example)? What old and new text? No idea what you're saying, there. > and nobody complained during last 10+ years. I filed this bug report 4 years ago. What kinds of complaints are you expecting? > But if Drew wants such optimization, then a new customizable option > could be added. I don't know what optimization you're talking about; sorry. The comment that introduces the code that you think is extra and should be deleted is this: ;; Before a yank command, make sure we don't yank the ;; head of the kill-ring that really comes from the ;; currently active region we are going to delete. ;; That would make yank a no-op. That comment has been there since at least Emacs 20! It says that the purpose of this code is to prevent just yanking the same text that will be deleted. That's the entire purpose of property-value `yank'. This is not an optimization. It's precisely so you _can_ yank to replace the selection. Without this code you cannot - you end up replacing the selection with its own text. The part of the code that you want to remove is the ONLY code that has been present forever for the `yank' condition. Remove that and you'll remove the use of property-value `yank'. Clearly I'm not understanding you. Please try to clarify. I hope this is just a case of you or me missing something, and not one of real disagreement.