From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Visuwesh Newsgroups: gmane.emacs.bugs Subject: bug#56530: 29.0.50; mouse-2 cut selected text when cua-mode is enabled Date: Wed, 13 Jul 2022 16:46:35 +0530 Message-ID: <87k08hl0to.fsf@gmail.com> References: <3c83c124-95a9-9dc6-a7a6-6e357c7574e4@orange.fr> <877d4hmjdh.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9354"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 56530@debbugs.gnu.org To: David Ponce Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jul 13 13:17:13 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oBaMi-00028O-Dj for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 13 Jul 2022 13:17:12 +0200 Original-Received: from localhost ([::1]:37242 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oBaMh-0005OP-1b for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 13 Jul 2022 07:17:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48230) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBaMY-0005NA-En for bug-gnu-emacs@gnu.org; Wed, 13 Jul 2022 07:17:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50733) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oBaMY-00058m-5W for bug-gnu-emacs@gnu.org; Wed, 13 Jul 2022 07:17:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oBaMX-00079m-UX for bug-gnu-emacs@gnu.org; Wed, 13 Jul 2022 07:17:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Visuwesh Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 13 Jul 2022 11:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56530 X-GNU-PR-Package: emacs Original-Received: via spool by 56530-submit@debbugs.gnu.org id=B56530.165771100726828 (code B ref 56530); Wed, 13 Jul 2022 11:17:01 +0000 Original-Received: (at 56530) by debbugs.gnu.org; 13 Jul 2022 11:16:47 +0000 Original-Received: from localhost ([127.0.0.1]:44630 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oBaMI-0006yM-MX for submit@debbugs.gnu.org; Wed, 13 Jul 2022 07:16:46 -0400 Original-Received: from mail-pj1-f66.google.com ([209.85.216.66]:39861) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oBaMG-0006sT-GN for 56530@debbugs.gnu.org; Wed, 13 Jul 2022 07:16:44 -0400 Original-Received: by mail-pj1-f66.google.com with SMTP id v4-20020a17090abb8400b001ef966652a3so3059668pjr.4 for <56530@debbugs.gnu.org>; Wed, 13 Jul 2022 04:16:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :user-agent:mime-version; bh=sfTixvt5QiwvGL8kNx4VgV/o/nJvlAGz52uD3dfVo9A=; b=BWm4YMElybYxd+dgohU3nwmMzDiJwyELVEpVLZbEpUiGP9qFxTq96Zea8p1JT+v27x 5pR3PzdePhgROlvufeWozT1stRKh8f61ATlNP+4wCYsfciKNAVLSLCDMeqWeyVqvlewS 2WufMxiRk9UfLLRdw3UzmiUGMVEYzmd/06DlrGgLZsUJY3q5HknaQvfyYHcwwp8oZE4G uUtvw1V+WqCA3Z3jQJ2Ww9es0PkaJHH9bkqQCTiBlvSoG3pTJr7HmwHbbwVTcawV7qFu XwpiMXiCpsMeQCCUzhelJS9SESOuLNJWWGuEdHqd5Tt/dvqeirTqCY3jwp4uQp2Bo3vE sL6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:user-agent:mime-version; bh=sfTixvt5QiwvGL8kNx4VgV/o/nJvlAGz52uD3dfVo9A=; b=hBNg6pOBQsQMCjZVnBplLrCaxvvFgRRqWyjkok755jHz2Ljgt+y3OJj4MOBLAWtbUo RNgmLoSeUvzior/YLEltYLxpBvLRcVq+OpZuFWM8t0abV6X6LNH/D9if8Hec9HkkZyFH eDH2OrgRoaEqweee9h0ZzmqSr+FHb2qWls6vuUObXcJEDSDJY50Gfn1VpE6CfjJDzQ4W qzv9EyxfZMyz+UZbapVbi5VqcB9WG0QSo5E1HWNME5axQB4xLNkKzR8vhixkllrk3kLD mAyo5WLjggw4g36jRt8Vms/43uQvn5VJh6tt5E+xyewPEfknugmVEC5GOMoVRpoUTzxE 1PBw== X-Gm-Message-State: AJIora+qvNpCgOWEG6sxSeDj9HhSCvbOoHsE/NRx5xgK2ifxgDTWWYcl FcVlwBWZnGyk2qRKWfQewUY= X-Google-Smtp-Source: AGRyM1seZEy08nkCAmrLBi3I9CwMIBcqvqYJYydMX3MiDdYJyOuWl/gLsE7z6X/omaecR44NgSJn3Q== X-Received: by 2002:a17:90a:e7cd:b0:1f0:2304:f579 with SMTP id kb13-20020a17090ae7cd00b001f02304f579mr3340538pjb.212.1657710998974; Wed, 13 Jul 2022 04:16:38 -0700 (PDT) Original-Received: from localhost ([49.204.129.90]) by smtp.gmail.com with ESMTPSA id l16-20020a170903121000b0015e8d4eb27esm8699245plh.200.2022.07.13.04.16.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Jul 2022 04:16:38 -0700 (PDT) In-Reply-To: (David Ponce's message of "Wed, 13 Jul 2022 13:10:32 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:236859 Archived-At: [Wednesday July 13, 2022] David Ponce wrote: > On 13/07/2022 11:50, Visuwesh wrote: >> You can disable the new behaviour by saying, >> (put 'mouse-yank-primary 'delete-selection nil) >> (put 'mouse-yank-secondary 'delete-selection nil) >> (put 'mouse-yank-at-click 'delete-selection nil) >> But I guess, it sure didn't take long for the complaints to come in > Maybe the behavior could be disabled for cua-mode to be consistent > with CUA expected behavior? After all, cua-mode is more than just > delete-selection-mode ;-) > > Thanks > [resent, forgot to CC the bug list] Thankfully delete-selection-mode is sufficiently flexible to allow this. We just need to replace the (put 'mouse-yank-primary 'delete-selection t) in delsel.el with the following, (put 'mouse-yank-primary 'delete-selection (lambda () (if (or cua-mode (null mouse-yank-at-point)) nil 'yank))) [ Disclaimer: I didn't test it. ]