From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 13 05:22:28 2022 Received: (at submit) by debbugs.gnu.org; 13 Jul 2022 09:22:28 +0000 Received: from localhost ([127.0.0.1]:44446 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oBYZf-0008F0-Ku for submit@debbugs.gnu.org; Wed, 13 Jul 2022 05:22:27 -0400 Received: from lists.gnu.org ([209.51.188.17]:42854) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oBYZd-0008Es-U8 for submit@debbugs.gnu.org; Wed, 13 Jul 2022 05:22:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52600) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBYZd-0006gD-Ne for bug-gnu-emacs@gnu.org; Wed, 13 Jul 2022 05:22:25 -0400 Received: from smtp09.smtpout.orange.fr ([80.12.242.131]:61227 helo=smtp.smtpout.orange.fr) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oBYZa-0002xG-NJ for bug-gnu-emacs@gnu.org; Wed, 13 Jul 2022 05:22:24 -0400 Received: from [192.168.1.15] ([90.112.17.208]) by smtp.orange.fr with ESMTPA id BYZVoiq6LsKAkBYZVoYnhP; Wed, 13 Jul 2022 11:22:18 +0200 X-ME-Helo: [192.168.1.15] X-ME-Auth: OWU0YmVhODllOThlNTBiMTcxZWVkMmNjZmQ4ZWZlMmRlNQ== X-ME-Date: Wed, 13 Jul 2022 11:22:18 +0200 X-ME-IP: 90.112.17.208 Message-ID: <3c83c124-95a9-9dc6-a7a6-6e357c7574e4@orange.fr> Date: Wed, 13 Jul 2022 11:22:17 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.0.2 Content-Language: fr, en-US To: bug-gnu-emacs@gnu.org From: David Ponce Subject: 29.0.50; mouse-2 cut selected text when cua-mode is enabled Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=80.12.242.131; envelope-from=da_vid@orange.fr; helo=smtp.smtpout.orange.fr X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.7 (-) X-Debbugs-Envelope-To: submit Cc: David PONCE X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -2.7 (--) Hello, I noticed that now, when cua-mode is enabled, when I select a region (with mouse or keyboard), then use mouse-2 click on another point to insert the selected text, the active region is cut before to insert text at the mouse-2 click for the first time. As far as I remember this is a new behavior, and previously the selected region was not cut, but copied, like when cua-mode is disabled. The woraround is to first deselect the region before to click mouse-2 to insert the previously selected text. This way the initially selected text is not cut. Not sure this is expected, so this bug report ;-) Thanks In GNU Emacs 29.0.50 (build 3, x86_64-pc-linux-gnu, GTK+ Version 3.24.34, cairo version 1.17.6) of 2022-07-13 built on kilauea Repository revision: c679756a9fb3ebd9a9b5fa9c9c64641fe493e8d8 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12014000 System Description: Fedora Linux 36 (KDE Plasma) Configured using: 'configure --prefix=/home/dponce --with-cairo --without-sqlite3 PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS WEBP X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB Important settings: value of $LC_TIME: fr_FR.utf8 value of $LANG: fr_FR.UTF-8 locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: delete-selection-mode: t cua-mode: t tooltip-mode: t global-eldoc-mode: t eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message mailcap yank-media puny dired dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068 epg-config gnus-util text-property-search mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils time-date subr-x cl-loaddefs cl-lib cus-start cus-load delsel cua-base rmc iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic indonesian philippine cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit xinput2 x multi-tty make-network-process emacs) Memory information: ((conses 16 48650 11785) (symbols 48 6173 0) (strings 32 15421 2063) (string-bytes 1 472483) (vectors 16 9531) (vector-slots 8 149129 13107) (floats 8 35 33) (intervals 56 222 0) (buffers 992 10)) From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 13 05:50:53 2022 Received: (at 56530) by debbugs.gnu.org; 13 Jul 2022 09:50:53 +0000 Received: from localhost ([127.0.0.1]:44467 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oBZ1A-0000bC-N7 for submit@debbugs.gnu.org; Wed, 13 Jul 2022 05:50:52 -0400 Received: from mail-pj1-f67.google.com ([209.85.216.67]:46014) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oBZ19-0000aw-LP for 56530@debbugs.gnu.org; Wed, 13 Jul 2022 05:50:52 -0400 Received: by mail-pj1-f67.google.com with SMTP id q5-20020a17090a304500b001efcc885cc4so2692663pjl.4 for <56530@debbugs.gnu.org>; Wed, 13 Jul 2022 02:50:51 -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=/I/qI3OfEpx6tcG1iZvBmsiIvts8vO639FcDo7zuSnQ=; b=BzLg+F9ZtDjWgNnECAKXzgCJPnYIqlzRkmmZ4UYs/Rx4ssJCAyBpiR1gGpmmRrwDid ei+pJcCeVJzqi6bafVn2vrQApadQDi9r++ZNnnWhuu4/PXOkzKjJYIPJk8/RcNz+CcUD fC4UAFeQdFlTMyaXZq1BGWYUVIpPnak66EA4RrbrMy1/U79K7di0zYtWF+exP+upGbIN EUVUiKsAu/c7VuBfV0k5GDfOeColfi+T4LLMRl2klRxncREhyrNnVzgEj83lvlpY2phF DSVhTn7Z3gNUF/H27Lc4rXT16znB2YBnKZMwvW09bF78XSmyENuSqTN8EsQPq6iCiPhY sKGw== 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=/I/qI3OfEpx6tcG1iZvBmsiIvts8vO639FcDo7zuSnQ=; b=vXQllqzGbg4cUfJwCGO0SiS/PGZ1XAzkI7qZR5q5Gbz6GiKfW6jv4TEHyiVoTRWgOh gZKpiF7snz5F2LKTU7QqEEIashl7QFJHJB1x48/o68HNrnMlw3dLccxJ0RMLC5aYNhiw 1yp4XYwt6jwg6Q2ST01GzC5Hf7VZvB+FhVNr1tMVWgNyL0QOAIdNlWo4bsJQ7TZGCoQt /7ykVMGPdbK0jzARS99F2Kgvb6LT/nb1r394gPzugvTzWBJ04HHx7As7bGX5NeHisg89 0CddIJpUvJ3mlkqyMnpNvWr7uGQ1jBJ9k8fwuPKOMvw1kTCzmCGzrXHRSV+cLebdZKW4 wS4w== X-Gm-Message-State: AJIora9KuJY4a8QTm5LWKHBPD/57JY4wUN1WBy5KLTCCAyCZTUXoIL2o 5ndA2a89j+B1GIpkh+lSsmc= X-Google-Smtp-Source: AGRyM1sAg7jCr6ppvFIchy/cQ4D1snILVMFU79+rLdtL8qjik66tzOVex3xQqIswhqbPAmlQnFGxow== X-Received: by 2002:a17:90b:384b:b0:1f0:6ef2:183f with SMTP id nl11-20020a17090b384b00b001f06ef2183fmr2870336pjb.100.1657705845818; Wed, 13 Jul 2022 02:50:45 -0700 (PDT) Received: from localhost ([49.204.129.90]) by smtp.gmail.com with ESMTPSA id z17-20020aa79591000000b005254e44b748sm8414995pfj.84.2022.07.13.02.50.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Jul 2022 02:50:45 -0700 (PDT) From: Visuwesh To: David Ponce Subject: Re: bug#56530: 29.0.50; mouse-2 cut selected text when cua-mode is enabled In-Reply-To: <3c83c124-95a9-9dc6-a7a6-6e357c7574e4@orange.fr> (David Ponce's message of "Wed, 13 Jul 2022 11:22:17 +0200") References: <3c83c124-95a9-9dc6-a7a6-6e357c7574e4@orange.fr> Date: Wed, 13 Jul 2022 15:20:34 +0530 Message-ID: <877d4hmjdh.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 56530 Cc: 56530@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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.0 (-) [Wednesday July 13, 2022] David Ponce wrote: > Hello, > > I noticed that now, when cua-mode is enabled, when I select a region > (with mouse or keyboard), then use mouse-2 click on another point to > insert the selected text, the active region is cut before to insert text > at the mouse-2 click for the first time. As far as I remember this is a > new behavior, and previously the selected region was not cut, but > copied, like when cua-mode is disabled. > > The woraround is to first deselect the region before to click mouse-2 to > insert the previously selected text. This way the initially selected > text is not cut. > > Not sure this is expected, so this bug report ;-) It is expected. mouse-2 (and other mouse yank commands) were recently changed to respect delete-selection-mode (which is enabled by cua-mode) by yours truly. :-) 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... From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 13 06:11:00 2022 Received: (at 56530) by debbugs.gnu.org; 13 Jul 2022 10:11:00 +0000 Received: from localhost ([127.0.0.1]:44479 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oBZKe-00016H-0E for submit@debbugs.gnu.org; Wed, 13 Jul 2022 06:11:00 -0400 Received: from mail-pf1-f171.google.com ([209.85.210.171]:33782) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oBZKb-00015y-D9 for 56530@debbugs.gnu.org; Wed, 13 Jul 2022 06:10:57 -0400 Received: by mail-pf1-f171.google.com with SMTP id v7so7762298pfb.0 for <56530@debbugs.gnu.org>; Wed, 13 Jul 2022 03:10:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:in-reply-to:references:mime-version:date:message-id:subject:to; bh=q9eE4gV/9/3qHdHkwyIkweRTd/1Y83h95Rz0yIj3MY0=; b=hWTA5f/5b8smfgrIqkZs1lNh8dlKuGhK+KlG+1Cw3B3LRuR/qfkLx8+EubQ4LeKdu7 a6J6W8W7dx8gktfcR196tLJ9i9vglza1AaPObgdq8V6T8l2IJIUQ+7JVtwtW5s0cDvou dUix/5Vp1lo8j9eprq39EptoZ05tDUN/mgVqvaPGwBInaccvTPAZfEc8QqgNci7FR6XC 17gdRH0bCmXeZGMvvEnj79RecT3y3S1p2bQoei++CrKmQtKORvmUiICBwdX9CkuBrtdz 2yDnbhNbquxuBugxibw7tniqc5uXftcjJR0v4ir82GhsMxd/TzxGJJHQ84HDTXEPmXde JV9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:in-reply-to:references:mime-version:date :message-id:subject:to; bh=q9eE4gV/9/3qHdHkwyIkweRTd/1Y83h95Rz0yIj3MY0=; b=NNvOq7nPjicIvWX6j2dB5jyzhZfiiYrSdmKyg+IdERFTGNt3mcr0OTwfSIDfl5SBns WfY/KQbfRgvSrsxsCzIp/rAqWukoTWR22zfN+Oakl1dP1CfdhT6yJIxAdcfAYK26oZSJ N/qeluj4mKHc2E6OuAVe9eV7aeonH40DhoqTNvt3MV5vK5souvy4EIwT8/6trRUXb5T6 hLGumadGgUZJx44CSGno7J2qMKiUDOsEv89ljRIrVFa1OBsW+ZjevfaRFQAQuf65ImUI ltR4YlttmRDUM38PgSqythjX9pb2a8R+Oxg5t9K9TCDXRjLrbcPOmHdIm2ThXxSkuTmd biUg== X-Gm-Message-State: AJIora++MYz35Wb06gvxaNbIduAzDroejXWgdPJ7owP6sb3smWHtpBnA IqxnfDFfnY1wjFzbUfgLwKU0opM47POVfe92FT0= X-Google-Smtp-Source: AGRyM1svHEtzM40TAw4/OSHy66OxzgqfAtffj4vq75ZKuPhajn9c9l8lZZsoa98u4lQwBxEM/VIrJ+a7hZz7WYchMuM= X-Received: by 2002:aa7:8e17:0:b0:528:9f8d:ad38 with SMTP id c23-20020aa78e17000000b005289f8dad38mr2426135pfr.4.1657707051613; Wed, 13 Jul 2022 03:10:51 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Wed, 13 Jul 2022 03:10:51 -0700 From: Stefan Kangas In-Reply-To: <3c83c124-95a9-9dc6-a7a6-6e357c7574e4@orange.fr> References: <3c83c124-95a9-9dc6-a7a6-6e357c7574e4@orange.fr> MIME-Version: 1.0 Date: Wed, 13 Jul 2022 03:10:51 -0700 Message-ID: Subject: Re: bug#56530: 29.0.50; mouse-2 cut selected text when cua-mode is enabled To: David Ponce , 56530@debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 56530 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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.0 (-) David Ponce writes: > I noticed that now, when cua-mode is enabled, when I select a region > (with mouse or keyboard), then use mouse-2 click on another point to > insert the selected text, the active region is cut before to insert text > at the mouse-2 click for the first time. As far as I remember this is a > new behavior, and previously the selected region was not cut, but > copied, like when cua-mode is disabled. > > The woraround is to first deselect the region before to click mouse-2 to > insert the previously selected text. This way the initially selected > text is not cut. I can reproduce this on current master, but not on Emacs 27. I think it's a bug. From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 13 06:19:28 2022 Received: (at 56530) by debbugs.gnu.org; 13 Jul 2022 10:19:28 +0000 Received: from localhost ([127.0.0.1]:44500 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oBZSq-0001LY-Ky for submit@debbugs.gnu.org; Wed, 13 Jul 2022 06:19:28 -0400 Received: from quimby.gnus.org ([95.216.78.240]:49542) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oBZSo-0001LH-Oh for 56530@debbugs.gnu.org; Wed, 13 Jul 2022 06:19:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=e2+JVRuxsWyUqyKPGoMboqwGl3OlImobK5XrRQhuIyc=; b=cXzZQzDaPxYw015DX7olH1FAO6 dwxUdLwhWFlkIV9/qJoP9x2UzEimWwC4tMH0VL+4NtC/NCpLvd3W0+qwpqRgnYzO9AwnM817hQXR3 BUT8ZR/KI1szhF8fXhtnzNBprBBEj3pul3bHEd0WB9SJochtGrop1i+addDdn4A+fTX0=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oBZSe-0004nd-08; Wed, 13 Jul 2022 12:19:18 +0200 From: Lars Ingebrigtsen To: Visuwesh Subject: Re: bug#56530: 29.0.50; mouse-2 cut selected text when cua-mode is enabled In-Reply-To: <877d4hmjdh.fsf@gmail.com> (Visuwesh's message of "Wed, 13 Jul 2022 15:20:34 +0530") References: <3c83c124-95a9-9dc6-a7a6-6e357c7574e4@orange.fr> <877d4hmjdh.fsf@gmail.com> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAD1BMVEValIpbmpMyUkkm Qzf////5vgvIAAAAAWJLR0QEj2jZUQAAAAd0SU1FB+YHDQoSCUA8G1MAAAG3SURBVDjLbZKLkcQg DENtpwHYCji7gQzuv7eTDMnu5o7M5PewJAwiTXsTjNYtfQ6+WmaK9l5Am77cRQmEoGsj0C7iPlax BEDDpC6UswFZuYHiumwoWGIEP50m/NIFOIcerjTfEigmqFQw3P6MvCqi4opQTK4SAM+1Dr4vgsIu /cgN8N6pwfmcEAv0PaStuDFiHheAOUXKIj9BWzXa7BSXb8CnWJwyvoGyKx5+ygkQt3ljk216TErt VE03G+GQgtYxCSCz29jdsYOGDRwQ21I2XBv/i9l4CUEjspwuPi0hJW5Q3akgIp4AdRjMhKAVMAM4 ctIcewzAdvhwZAV1FowlpdrxrYYaWM46VgWQJqhsyBQ0N5YSOCwTt5izmoGy4CkBRydwOmHOPaXe QTBRmo48wRkAuYHXwDRc4Z9gsEVOHxz2YP8WGAzj9TOXOzvACs5Gw6NOU9Z9n0S4ljHtd6q8zWex ZGI8C+C0cDZ/z6VVqQHwSZC5QN5SDJU1aYGMt8cquAAWmmsdwz0/QOY7Vf4dUnli2+a7UriC/K/C 44o+HyCzFhfPisAuRK04nqC2+CEEwH4+f3L8Al0xiVVx+uv8AAAAJXRFWHRkYXRlOmNyZWF0ZQAy MDIyLTA3LTEzVDEwOjE4OjA5KzAwOjAwHFJgGQAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMi0wNy0x M1QxMDoxODowOSswMDowMG0P2KUAAAAASUVORK5CYII= X-Now-Playing: Tarwater's _Featuring Tikiman_: "Like a Miracle" Date: Wed, 13 Jul 2022 12:19:14 +0200 Message-ID: <87lesxtivx.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Visuwesh writes: > It is expected. mouse-2 (and other mouse yank commands) were recently > changed to respect delete-selection-mode (which is enabled by cua-mode) > by yours truly. :-) Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 56530 Cc: David Ponce , 56530@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -3.3 (---) Visuwesh writes: > It is expected. mouse-2 (and other mouse yank commands) were recently > changed to respect delete-selection-mode (which is enabled by cua-mode) > by yours truly. :-) That wasn't really the intention of the change, I think? It was so that if you paste text from a different program into a selected area in Emacs, then that area would be deleted first, or do I misremember? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 13 07:03:46 2022 Received: (at 56530) by debbugs.gnu.org; 13 Jul 2022 11:03:47 +0000 Received: from localhost ([127.0.0.1]:44576 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oBa9i-00050d-Ly for submit@debbugs.gnu.org; Wed, 13 Jul 2022 07:03:46 -0400 Received: from mail-pj1-f67.google.com ([209.85.216.67]:36806) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oBa9g-00050L-MX for 56530@debbugs.gnu.org; Wed, 13 Jul 2022 07:03:44 -0400 Received: by mail-pj1-f67.google.com with SMTP id z12-20020a17090a7b8c00b001ef84000b8bso3056304pjc.1 for <56530@debbugs.gnu.org>; Wed, 13 Jul 2022 04:03: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:user-agent:date :message-id:mime-version; bh=OvJP8b1DaEIyq+vEw/EoBYBzWHZr7VB1lUObwzszxks=; b=JK81HBXARdSSSESRNKVdKh3BW3h23H5Bk24QqSJsg8RvMaMCoNJurhJ2HL3miJPA9G ziJGOg14l5rPs3uWYzRdIa7fuD2qqlhsfxkWH8nbUbapqpfe8DOtD6CcoB+w8ctUpwsi yQcMhbY29mGWm9ssRM8r1ylhdoIgKFtCa65/DBugtzdZ8yQ3DZudU55AiDTqto3NioSP xADEoIovUAmhQihCHj8Ir9P88yhKQhnyhBZD+NyjIzDEialQsUztI0/5/8633QMfJpMo /k2ivRxCjDe4kj1ffwz+TggPXGiU8n1S2xN8lIWC/52y89keWcsr9S94h2OVOKZ1sxlD jp3g== 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 :user-agent:date:message-id:mime-version; bh=OvJP8b1DaEIyq+vEw/EoBYBzWHZr7VB1lUObwzszxks=; b=ZT0qRHFWtUzdugv3MLjQm56pcrDHHPpvAQfaRvuCLsAESrsPPD2JtQ3bx/9U3fAUHN zQOZExGTIGD86tMItAo1tD7Q1rQYVoctzUPP4veEFjpy2nX49r8mu2LfrbilTH7UE5vr 03OxDQgYxj272xpYOCL+iyV/NISHUuDIWMLxl2VKKuGRuHMybBrTpdTgvrtpKqOXi2je uraiwvx2p+yVHQ2LGAbkS5f4EX7gyscM/d8TxYxb7ZOchoi6CpQHZ45bp01U3piujpan 5WDTiXgVQrNKWeSZ78WWDKWSXPPxL+V9NsALJxZhz+fWa27K7Zvibifa8fwhwfZoMlih sPIg== X-Gm-Message-State: AJIora8QaB8S71hraiN5nUyHpN71Fs20JSrsSNINfvzFKYmzHA9H6+C8 25TqJ911Ay1QIdtLLFwpRuk= X-Google-Smtp-Source: AGRyM1taX5q541SK6fHn3dDG4Q2uIETkc/Qx4tskk4nvtStohO54Td61tztTQb1gNGnRY6lJr+4JxA== X-Received: by 2002:a17:90a:5d8b:b0:1ef:8659:92ab with SMTP id t11-20020a17090a5d8b00b001ef865992abmr3281532pji.7.1657710218660; Wed, 13 Jul 2022 04:03:38 -0700 (PDT) Received: from localhost ([49.204.129.90]) by smtp.gmail.com with ESMTPSA id u8-20020a1709026e0800b001635b86a790sm8596146plk.44.2022.07.13.04.03.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Jul 2022 04:03:38 -0700 (PDT) From: Visuwesh To: Lars Ingebrigtsen Subject: Re: bug#56530: 29.0.50; mouse-2 cut selected text when cua-mode is enabled In-Reply-To: <87lesxtivx.fsf@gnus.org> (Lars Ingebrigtsen's message of "Wed, 13 Jul 2022 12:19:14 +0200") References: <3c83c124-95a9-9dc6-a7a6-6e357c7574e4@orange.fr> <877d4hmjdh.fsf@gmail.com> <87lesxtivx.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Date: Wed, 13 Jul 2022 16:33:25 +0530 Message-ID: <87wnchl1fm.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 56530 Cc: David Ponce , 56530@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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.0 (-) [Wednesday July 13, 2022] Lars Ingebrigtsen wrote: > Visuwesh writes: > >> It is expected. mouse-2 (and other mouse yank commands) were recently >> changed to respect delete-selection-mode (which is enabled by cua-mode) >> by yours truly. :-) > > That wasn't really the intention of the change, I think? It was so that > if you paste text from a different program into a selected area in > Emacs, then that area would be deleted first, or do I misremember? AFAICT, the recipe produces what I had in my mind when I proposed. The behaviour might seems slightly odd since mouse-yank-at-point is set to nil in OP's case. It shouldn't be hard to take this defcustom into account tho. From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 13 07:10:37 2022 Received: (at 56530) by debbugs.gnu.org; 13 Jul 2022 11:10:37 +0000 Received: from localhost ([127.0.0.1]:44608 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oBaGL-0005DY-05 for submit@debbugs.gnu.org; Wed, 13 Jul 2022 07:10:37 -0400 Received: from smtp-21.smtpout.orange.fr ([80.12.242.21]:51604 helo=smtp.smtpout.orange.fr) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oBaGI-0005DP-Ul for 56530@debbugs.gnu.org; Wed, 13 Jul 2022 07:10:35 -0400 Received: from [192.168.1.15] ([90.112.17.208]) by smtp.orange.fr with ESMTPA id BaGGoeYowHubGBaGGoKc2f; Wed, 13 Jul 2022 13:10:33 +0200 X-ME-Helo: [192.168.1.15] X-ME-Auth: OWU0YmVhODllOThlNTBiMTcxZWVkMmNjZmQ4ZWZlMmRlNQ== X-ME-Date: Wed, 13 Jul 2022 13:10:33 +0200 X-ME-IP: 90.112.17.208 Message-ID: Date: Wed, 13 Jul 2022 13:10:32 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.0.2 Subject: Re: bug#56530: 29.0.50; mouse-2 cut selected text when cua-mode is enabled Content-Language: fr, en-US To: Visuwesh References: <3c83c124-95a9-9dc6-a7a6-6e357c7574e4@orange.fr> <877d4hmjdh.fsf@gmail.com> From: David Ponce In-Reply-To: <877d4hmjdh.fsf@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 56530 Cc: 56530@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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.0 (-) On 13/07/2022 11:50, Visuwesh wrote: > [Wednesday July 13, 2022] David Ponce wrote: > >> Hello, >> >> I noticed that now, when cua-mode is enabled, when I select a region >> (with mouse or keyboard), then use mouse-2 click on another point to >> insert the selected text, the active region is cut before to insert text >> at the mouse-2 click for the first time. As far as I remember this is a >> new behavior, and previously the selected region was not cut, but >> copied, like when cua-mode is disabled. >> >> The woraround is to first deselect the region before to click mouse-2 to >> insert the previously selected text. This way the initially selected >> text is not cut. >> >> Not sure this is expected, so this bug report ;-) > > It is expected. mouse-2 (and other mouse yank commands) were recently > changed to respect delete-selection-mode (which is enabled by cua-mode) > by yours truly. :-) > > 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] From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 13 07:11:14 2022 Received: (at 56530) by debbugs.gnu.org; 13 Jul 2022 11:11:14 +0000 Received: from localhost ([127.0.0.1]:44612 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oBaGw-0005Er-9M for submit@debbugs.gnu.org; Wed, 13 Jul 2022 07:11:14 -0400 Received: from quimby.gnus.org ([95.216.78.240]:49972) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oBaGv-0005Eg-Ff for 56530@debbugs.gnu.org; Wed, 13 Jul 2022 07:11:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=8cpP05v53uU7ldZdUrm9rBAHZFEyej51/NDarPA0UEE=; b=psYSgIBK9XdA/XLhwjt4H0oYV1 lgsQHlaqLlv1by4AVt063eWTkazAHFiAZrz5rMvXA3f3LVvqZsH84emHa/REbwMe4hpzZGaLdxo1j /zH3y8LUovBP8LfwVLVZZSRZBhhLoxQgL7/DvjzoRDtnWkEID3haj6GSN9R0O/UqUEZk=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oBaGm-0005Cw-TA; Wed, 13 Jul 2022 13:11:07 +0200 From: Lars Ingebrigtsen To: Visuwesh Subject: Re: bug#56530: 29.0.50; mouse-2 cut selected text when cua-mode is enabled In-Reply-To: <87wnchl1fm.fsf@gmail.com> (Visuwesh's message of "Wed, 13 Jul 2022 16:33:25 +0530") References: <3c83c124-95a9-9dc6-a7a6-6e357c7574e4@orange.fr> <877d4hmjdh.fsf@gmail.com> <87lesxtivx.fsf@gnus.org> <87wnchl1fm.fsf@gmail.com> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAD1BMVEUXExBSPiumc7Wa XlH///+spZNTAAAAAWJLR0QEj2jZUQAAAAd0SU1FB+YHDQsJExWqQ4QAAAFkSURBVDjLrZNRooQg CEUhNwC6gSdtIHP/e3sgatZMf+NHJkcRLgjwk8Gvi3VEegHooBZfoE0FgloN4CmSfZ+7t+12SRQd NEG/nZDNLvsDAPLZgBweJNpsH45ub7cYKA4Yu735WtIajtQVrSDIMVxZEjzD3QRkAallC+HQFA43 e+5putokm6u9S5bWy2MPFXABzATfgP2yqmJZswl6gSB7ITg94Qu4n712NXi5XEFJkrFnxtNVbBIR tkougILIjAPx0opVw7HQkl0AmUvKY0W0ys7s5W5lXduMOebZfLf+w9TK3c7cGxPP/TtQXah35bOV Yx2pPADu3rsdLOdy1cKoph8nBIttZ3zahewE5LsrObPJoY46sLdh6mgahDeQKtdaSauKxdxPgLUm 1k7b/lQxWIDJ3p7fkORwE9lr4qAkdGlmYdtUq2be/o5ZMd+nQsU8w1cnGqO1KKTSCskfimisY8Dr +AelXyYxJcVJ2wAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMi0wNy0xM1QxMTowOToxOSswMDowMCMi DfwAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjItMDctMTNUMTE6MDk6MTkrMDA6MDBSf7VAAAAAAElF TkSuQmCC X-Now-Playing: Jay Glass Dubs vs Guerilla Toss's _Vs_: "Skull Dub" Date: Wed, 13 Jul 2022 13:11:02 +0200 Message-ID: <87y1wxs1x5.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Visuwesh writes: > AFAICT, the recipe produces what I had in my mind when I proposed. The > behaviour might seems slightly odd since mouse-yank-at-point is set to > nil in OP's case. It shouldn't be hard to take this [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 56530 Cc: David Ponce , 56530@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -3.3 (---) Visuwesh writes: > AFAICT, the recipe produces what I had in my mind when I proposed. The > behaviour might seems slightly odd since mouse-yank-at-point is set to > nil in OP's case. It shouldn't be hard to take this defcustom into > account tho. I think the patch has to be reverted, because this isn't what I had in mind at all. But we can reintroduce the same effect via, for instance, a new minor mode that has the same effect (for those that want this). -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 13 07:16:47 2022 Received: (at 56530) by debbugs.gnu.org; 13 Jul 2022 11:16:47 +0000 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 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 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) 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) From: Visuwesh To: David Ponce Subject: Re: bug#56530: 29.0.50; mouse-2 cut selected text when cua-mode is enabled In-Reply-To: (David Ponce's message of "Wed, 13 Jul 2022 13:10:32 +0200") References: <3c83c124-95a9-9dc6-a7a6-6e357c7574e4@orange.fr> <877d4hmjdh.fsf@gmail.com> Date: Wed, 13 Jul 2022 16:46:35 +0530 Message-ID: <87k08hl0to.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 56530 Cc: 56530@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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.0 (-) [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. ] From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 13 07:19:35 2022 Received: (at 56530) by debbugs.gnu.org; 13 Jul 2022 11:19:35 +0000 Received: from localhost ([127.0.0.1]:44641 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oBaP0-0007cl-RZ for submit@debbugs.gnu.org; Wed, 13 Jul 2022 07:19:35 -0400 Received: from mail-pj1-f68.google.com ([209.85.216.68]:38571) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oBaOy-0007cZ-JO for 56530@debbugs.gnu.org; Wed, 13 Jul 2022 07:19:32 -0400 Received: by mail-pj1-f68.google.com with SMTP id 89-20020a17090a09e200b001ef7638e536so3083010pjo.3 for <56530@debbugs.gnu.org>; Wed, 13 Jul 2022 04:19:32 -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=S+DTp3L5hlcCTjAwrgcc13aCjNomYlMYGtHbIuZhsSs=; b=bFCVnXjDcV4IJBjWHkxE5a5Qlg6uzDs1I2j5kOvsXo7a3LMvuYKfNyqDUh/X3/Ri3v BV7eYMJQEUFgfLoob3Lf/PNFQc1/ZrS9KKOF4TiDjlYhDmh0I1OpCS68yZ/ipoERCm2i cLEgNvo16sA/9Jkhz9aNIMK0KQNu+/vijDBWHuqP3Z2PQ/0qF6MDGFRdF7rrKIlorhYk mxbT6KtR9qerubKi1evjte6sL8SzVcCBGv2XQHATEwgaGh0p4nDN4NLRyJwgDGaKpZ1Q 0P/67IzmWbHn8ybCACMImjrivOWaUNh689mS/viOc69A4YC+b/c0J1FE1Izk326S6Ni7 h/2Q== 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=S+DTp3L5hlcCTjAwrgcc13aCjNomYlMYGtHbIuZhsSs=; b=weftyX7HBsGPVdW0L4pJGct0xP60ylZZZXdZB38LR17WEY0HZ/m4F9WX54sbl7XeZQ 6pS5vQr6S18MVmAEDF9wxri6P2Jt3Il+TbkAJ5EEvFFILl+a4vw08HxN/EoXPymB9v4O jTn4AHOFgT19COvqK7WmWH+ycAwL6PIAhJk5EBqdWfMbvifvJb7YpkigZTQaZbKAJ76V txkeqJuJWM16wU6bjezgqjgr//ODJUzoKQFrXaSDUj+bAVMzWvi/4fSp5OocAk9eYNZK xgA46eN4FJAuntdGgGk30iEwho4KFhkc9jQdYEDWkj4CYK3y3YCTbwBOO45PigvVIe6T 6QHw== X-Gm-Message-State: AJIora/oyRtKqzKt1fPDRI3I0svJVszaVfQXSu4Ai9IINhCrhj40+VD0 VugtUcU/SdlvIazKtzHL4MM= X-Google-Smtp-Source: AGRyM1tD5SCOlkEJ/OZxR3maT7hSKV30Emy088Kc7CvgpDL7XzYI3oSHJGngfR7Rnyq1RT++Kxb5Zg== X-Received: by 2002:a17:902:dace:b0:16b:e8d4:2955 with SMTP id q14-20020a170902dace00b0016be8d42955mr2645163plx.135.1657711166867; Wed, 13 Jul 2022 04:19:26 -0700 (PDT) Received: from localhost ([49.204.129.90]) by smtp.gmail.com with ESMTPSA id a15-20020a170902710f00b0016be6e954e8sm8623322pll.68.2022.07.13.04.19.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Jul 2022 04:19:26 -0700 (PDT) From: Visuwesh To: Lars Ingebrigtsen Subject: Re: bug#56530: 29.0.50; mouse-2 cut selected text when cua-mode is enabled In-Reply-To: <87y1wxs1x5.fsf@gnus.org> (Lars Ingebrigtsen's message of "Wed, 13 Jul 2022 13:11:02 +0200") References: <3c83c124-95a9-9dc6-a7a6-6e357c7574e4@orange.fr> <877d4hmjdh.fsf@gmail.com> <87lesxtivx.fsf@gnus.org> <87wnchl1fm.fsf@gmail.com> <87y1wxs1x5.fsf@gnus.org> Date: Wed, 13 Jul 2022 16:49:24 +0530 Message-ID: <87fsj5l0oz.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 56530 Cc: David Ponce , 56530@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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.0 (-) [Wednesday July 13, 2022] Lars Ingebrigtsen wrote: > Visuwesh writes: > >> AFAICT, the recipe produces what I had in my mind when I proposed. The >> behaviour might seems slightly odd since mouse-yank-at-point is set to >> nil in OP's case. It shouldn't be hard to take this defcustom into >> account tho. > > I think the patch has to be reverted, because this isn't what I had in > mind at all. But we can reintroduce the same effect via, for instance, > a new minor mode that has the same effect (for those that want this). Fine by me. But I'm not sure how many people want this (I count two so far), so we can just let the users who desire this behaviour add a few lines to their init.el. Or how about the snippet in https://debbugs.gnu.org/cgi/bugreport.cgi?bug=56530#26 look to you? From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 13 07:30:27 2022 Received: (at 56530) by debbugs.gnu.org; 13 Jul 2022 11:30:27 +0000 Received: from localhost ([127.0.0.1]:44669 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oBaZX-0008LG-47 for submit@debbugs.gnu.org; Wed, 13 Jul 2022 07:30:27 -0400 Received: from mail-pj1-f46.google.com ([209.85.216.46]:51724) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oBaZV-0008EO-K3 for 56530@debbugs.gnu.org; Wed, 13 Jul 2022 07:30:25 -0400 Received: by mail-pj1-f46.google.com with SMTP id o15so11597797pjh.1 for <56530@debbugs.gnu.org>; Wed, 13 Jul 2022 04:30:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:in-reply-to:references:mime-version:date:message-id:subject:to :cc; bh=6K1kHKtLBxvZRstJAipk9/cbFOghzDR4+kHiYN5EcSM=; b=cUsZz3UZaxtkR+BZU/umdeWcOo4wWXVDjPxZnxV4bRiXCvsFa2uHu88g5M9JiJ5Jzf S9GxRyG8AEm+QfEadk5UiCtrWgkPfLPji+9paja0X3M+HiFmoXOVtlHCgtfHX8aTGd0v 6cJf5p4IbkhkhPKIf+ZjW8uZfFlC8okbkIGEJjGEtD9kB6AS957zrI/0k4j1r6456tNY ZOIjw9eCiJ9Ii14RPUepxaGUKN7NfJUkEBsBg9gRKo/Hp7nOe8loICSvVV8RTDesLDRQ VjLXmclxvNEMBQV7OOfFNejnjcqNnFPYbPus/SdaPRSmtaNqp3UC7khzlrdLuq29FOjg lhXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:in-reply-to:references:mime-version:date :message-id:subject:to:cc; bh=6K1kHKtLBxvZRstJAipk9/cbFOghzDR4+kHiYN5EcSM=; b=OTGvSCw1fvcqlQU78QrxHmaZdJCxvJM7byzwHgYa6onEAhay3urJqlVzk+6Y0880WK hqzNcIXUXktUim1wiTSS/C0iMOFoLOze6LPzKyX0S722ulJrR6u5gRt98gWsNq920hYh XNYCZ/Wn9efwLcODKmvX2NLIWrgoangIfGslBT+rk3wRgCcC9GvrJmWkZXZN6RiERdIc O8v71V2num8PsMAwhzTJunHdPG+OqBr1yD6qyhFiRIBsLoA/xMH144OHAli95G6bXBWx nhdNzaAJtOhy7hHVwEp4Qze3xmg2+miwUTso+9CrhQxh578GqwQhuIpsnAu6WWYV2Ruf WG+Q== X-Gm-Message-State: AJIora/Zu7H7juQHfluzQoutZFWYbBgW57VIf+QlSQqQ8+6GqMUQFN+g /LlVqjUiJJw03YfPVByO1Mzr0w+7A558zkDMguc= X-Google-Smtp-Source: AGRyM1sl00Tm2VFWyGvNkQrmn7eahmeSuL+IJJkAhRI6cQHxxSzzT6COqdFZxl0VFJQXPfjDcv87mgQtA07xoFUG3MQ= X-Received: by 2002:a17:90b:4d8d:b0:1ef:e3a1:d1bd with SMTP id oj13-20020a17090b4d8d00b001efe3a1d1bdmr9545907pjb.175.1657711819772; Wed, 13 Jul 2022 04:30:19 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Wed, 13 Jul 2022 04:30:19 -0700 From: Stefan Kangas In-Reply-To: <87wnchl1fm.fsf@gmail.com> References: <3c83c124-95a9-9dc6-a7a6-6e357c7574e4@orange.fr> <877d4hmjdh.fsf@gmail.com> <87lesxtivx.fsf@gnus.org> <87wnchl1fm.fsf@gmail.com> MIME-Version: 1.0 Date: Wed, 13 Jul 2022 04:30:19 -0700 Message-ID: Subject: Re: bug#56530: 29.0.50; mouse-2 cut selected text when cua-mode is enabled To: Visuwesh , Lars Ingebrigtsen Content-Type: text/plain; charset="UTF-8" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 56530 Cc: David Ponce , 56530@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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.0 (-) Visuwesh writes: > AFAICT, the recipe produces what I had in my mind when I proposed. The > behaviour might seems slightly odd since mouse-yank-at-point is set to > nil in OP's case. It shouldn't be hard to take this defcustom into > account tho. I think that neither Emacs nor `cua-mode' should behave differently from other X programs in this regard, certainly not by default. Could we please avoid that? The entire point of `cua-mode' is to be /more/ like other software, not less. From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 13 07:35:35 2022 Received: (at 56530) by debbugs.gnu.org; 13 Jul 2022 11:35:35 +0000 Received: from localhost ([127.0.0.1]:44681 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oBaeV-0001nO-Fm for submit@debbugs.gnu.org; Wed, 13 Jul 2022 07:35:35 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:40640) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oBaeT-0001nC-Eb for 56530@debbugs.gnu.org; Wed, 13 Jul 2022 07:35:34 -0400 Received: by mail-pf1-f195.google.com with SMTP id y141so9989654pfb.7 for <56530@debbugs.gnu.org>; Wed, 13 Jul 2022 04:35:33 -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=MUBa4DKfleg7aoWMHgRa17IkW1nXLn7F9wGxooxH5js=; b=TM73fx4tmhp03gd+dqid7yXLvg+UUpnXTVRNZa6tlQLucgV16nemLk0EYsXTmUH5nT cCp8YUsDB4Qr9MzOrdao+ww5/7+WdfmQCnrjvcnXB81lBFkRiUHcFRC3+od/kWBzR7W/ MbMA3tYNGx4ZJX+luY2f3Z564xpaWK3ADtYQAPIFdk2Wxuhx23eZvuSYKfY+Amqxxz0t tvoCD7NqIUu/TbSwcg9t9TRsJC+hM5Zq4qzx6xCyqWFoOUJ1Kw9rCJfSXtZcET+gpiqZ b7qCuQz+zEaD7lLQnweIZvltVL8sZfUQCT7u9JMxYcU1URAUnZA4oPKpdvGZOIAKlq4j fTOA== 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=MUBa4DKfleg7aoWMHgRa17IkW1nXLn7F9wGxooxH5js=; b=KelccRCrmVvnU4Bzrl38JLcc2vUS7VwKjuBbpYuc3xF0FMGNYvkYmUreUWAQzfc31l 8OD7PmexZi+KLnTWMoyKIErb65ThE0V3CUX+mXhbY8RqxHGdQWWH2Qn6K0km6Bc0ksKs z7EAxLeqz0yS2G82nXrGGNF2chFS6PsoB19CoXIH5iewJd0LPCZxSdKrruohqV9UyR9h 9uFy+tCZHropo9ss2GKp0E8Yg5H23fYWenePmMNLA+0OBwkH/yN1a1I5KaYGJAMc9k/g fTsV5PXx4ybcIddgwtqcastd+ctpv16T372iJ+Do4aKK96oak+cUQsOyFxtQlQVpMFYn Hb3A== X-Gm-Message-State: AJIora/OmfLuJa9buKCGO1ftGr6lvX3U8gZYRPvc8cQ63GBY0uv7U9+Q A6vgZyZi+0kRxfTc3C0SQv4= X-Google-Smtp-Source: AGRyM1vESTUI6GrspmqfBcaHAR+3Kh8BozzEwHTOkZBMMtuGeiTLqMSqsKyfzhIaq/cK+P/LIX1ALQ== X-Received: by 2002:a05:6a00:2347:b0:52a:cf39:59a5 with SMTP id j7-20020a056a00234700b0052acf3959a5mr2658387pfj.28.1657712127656; Wed, 13 Jul 2022 04:35:27 -0700 (PDT) Received: from localhost ([49.204.129.90]) by smtp.gmail.com with ESMTPSA id z66-20020a623345000000b0052af2e8bba3sm2236850pfz.37.2022.07.13.04.35.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Jul 2022 04:35:27 -0700 (PDT) From: Visuwesh To: Stefan Kangas Subject: Re: bug#56530: 29.0.50; mouse-2 cut selected text when cua-mode is enabled In-Reply-To: (Stefan Kangas's message of "Wed, 13 Jul 2022 04:30:19 -0700") References: <3c83c124-95a9-9dc6-a7a6-6e357c7574e4@orange.fr> <877d4hmjdh.fsf@gmail.com> <87lesxtivx.fsf@gnus.org> <87wnchl1fm.fsf@gmail.com> Date: Wed, 13 Jul 2022 17:05:24 +0530 Message-ID: <87bkttkzyb.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 56530 Cc: David Ponce , Lars Ingebrigtsen , 56530@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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.0 (-) [Wednesday July 13, 2022] Stefan Kangas wrote: > Visuwesh writes: > >> AFAICT, the recipe produces what I had in my mind when I proposed. The >> behaviour might seems slightly odd since mouse-yank-at-point is set to >> nil in OP's case. It shouldn't be hard to take this defcustom into >> account tho. > > I think that neither Emacs nor `cua-mode' should behave differently from > other X programs in this regard, certainly not by default. Could we > please avoid that? The entire point of `cua-mode' is to be /more/ like > other software, not less. Like I said in the original bug report, I have no problems if the change was reverted. I would do it myself but I have no push access. From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 13 07:40:55 2022 Received: (at 56530) by debbugs.gnu.org; 13 Jul 2022 11:40:55 +0000 Received: from localhost ([127.0.0.1]:44699 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oBaje-0001wq-OF for submit@debbugs.gnu.org; Wed, 13 Jul 2022 07:40:54 -0400 Received: from quimby.gnus.org ([95.216.78.240]:50478) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oBajd-0001wb-AR for 56530@debbugs.gnu.org; Wed, 13 Jul 2022 07:40:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=oJYKAKy4uMp+v2o/9qHV+sbQjnnhfGgpxwv9XuaQxJc=; b=kYQ04T07qJkzQ74RKrb5rAuK3V v1lVEBiweKyhKtH8gJFTCEnAeEjvH++VBW7bXdISbqqMou1wdVECuE04t5K+R90+wY4zPCgQW4Fy/ gRq8RjqT/hh8ENvK3kZrKnnyBTSh0vNeTACLgVOww1t7BwawJeunpD7WYBfjb99Q6i0g=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oBajU-0005TU-JA; Wed, 13 Jul 2022 13:40:47 +0200 From: Lars Ingebrigtsen To: Visuwesh Subject: Re: bug#56530: 29.0.50; mouse-2 cut selected text when cua-mode is enabled In-Reply-To: <87fsj5l0oz.fsf@gmail.com> (Visuwesh's message of "Wed, 13 Jul 2022 16:49:24 +0530") References: <3c83c124-95a9-9dc6-a7a6-6e357c7574e4@orange.fr> <877d4hmjdh.fsf@gmail.com> <87lesxtivx.fsf@gnus.org> <87wnchl1fm.fsf@gmail.com> <87y1wxs1x5.fsf@gnus.org> <87fsj5l0oz.fsf@gmail.com> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAACVBMVEVmW1CVh3r////N 0ppRAAAAAWJLR0QCZgt8ZAAAAAd0SU1FB+YHDQsnFffO750AAAFHSURBVCjPJVFBqkQxCItQ9xbq fSxM932g97/Kj/0MQ5saY+LD1BirCltDIQdYlpAGiOAlcaqBXeAT0YKTswCXWA8MViWSRwEqANJH gnyRIO+sFIKWg/ka+mvKxeBtvYovQckxBH++EDtmv5NTfLHh3dGuBrsaDMiOIepGcEz29R11iTzo xavmrIDejZ+cqo8gaG/qCZuUCY70A61ipePQsZZ3D+Nov3QSUZiUxx0wXK3rR1I4HWxMqrtQFRrf /N1BHkET6dkYlxE0BxasfbLn68O8S0ru5L49u3LhxctttWWVfinKLIxd3Gf0Bxmdu0piPDVKlOJy u9HbcVP4923rOe1D9xcZ2K0L7EsOwyXdeDBe8fNwllS9TfN/35wmz1gW3lFaR2T3Ocb/1Pn0/muQ FzPXuxcO+yt7WV6yD/eTjp/XFpq1PPoHWL9CD10cUewAAAAldEVYdGRhdGU6Y3JlYXRlADIwMjIt MDctMTNUMTE6Mzk6MjErMDA6MDAHoCJ5AAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIyLTA3LTEzVDEx OjM5OjIxKzAwOjAwdv2axQAAAABJRU5ErkJggg== X-Now-Playing: Dwayne Sodahberk's =?utf-8?Q?=5FFj=C3=A4rilsfalu=5F=3A?= "Why, Oh Why" Date: Wed, 13 Jul 2022 13:40:44 +0200 Message-ID: <87cze9s0jn.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Visuwesh writes: >> I think the patch has to be reverted, because this isn't what I had in >> mind at all. But we can reintroduce the same effect via, for instance, >> a new minor mode that has the same effect (for th [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 56530 Cc: David Ponce , 56530@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -3.3 (---) Visuwesh writes: >> I think the patch has to be reverted, because this isn't what I had in >> mind at all. But we can reintroduce the same effect via, for instance, >> a new minor mode that has the same effect (for those that want this). > > Fine by me. But I'm not sure how many people want this (I count two so > far), so we can just let the users who desire this behaviour add a few > lines to their init.el. I've now reverted the commit and reopened that other bug report. > Or how about the snippet in > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=56530#26 look to you? I think having an explicit minor mode for this would be tidier. It would be trivial -- it'd just `put' on those symbols. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 13 07:41:06 2022 Received: (at control) by debbugs.gnu.org; 13 Jul 2022 11:41:06 +0000 Received: from localhost ([127.0.0.1]:44705 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oBajq-0001y9-0L for submit@debbugs.gnu.org; Wed, 13 Jul 2022 07:41:06 -0400 Received: from quimby.gnus.org ([95.216.78.240]:50494) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oBajo-0001x1-Ke for control@debbugs.gnu.org; Wed, 13 Jul 2022 07:41:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=lm2ncW26m/DjMXQlu7VLN1dJASm34zGbnAL1ai1NpWY=; b=OZtj1nYFBGmYNq9/bC6HxTYmqL StC4IMIK8E9qmn/fiBLhRbraSlKKm8oT7PQ9Xo58Bxk8nFllXE9DDgqw5Bnr7ZSbY6c0pFq2dEZQr oF6E1eu1nhhya+mh3UfxMFY1iViTld1P/02RknKRWSJHiC7uGLpaNaRVD5hbcYTJkzAs=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oBajh-0005Tf-2L for control@debbugs.gnu.org; Wed, 13 Jul 2022 13:40:59 +0200 Date: Wed, 13 Jul 2022 13:40:56 +0200 Message-Id: <87bktts0jb.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #56530 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 56530 29.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -3.3 (---) close 56530 29.1 quit From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 13 15:29:39 2022 Received: (at 56530) by debbugs.gnu.org; 13 Jul 2022 19:29:39 +0000 Received: from localhost ([127.0.0.1]:47769 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oBi3H-0005hC-5W for submit@debbugs.gnu.org; Wed, 13 Jul 2022 15:29:39 -0400 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:46367) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oBi3F-0005gp-3P for 56530@debbugs.gnu.org; Wed, 13 Jul 2022 15:29:37 -0400 Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id B8663240003; Wed, 13 Jul 2022 19:29:28 +0000 (UTC) From: Juri Linkov To: Stefan Kangas Subject: Re: bug#56530: 29.0.50; mouse-2 cut selected text when cua-mode is enabled In-Reply-To: (Stefan Kangas's message of "Wed, 13 Jul 2022 04:30:19 -0700") Organization: LINKOV.NET References: <3c83c124-95a9-9dc6-a7a6-6e357c7574e4@orange.fr> <877d4hmjdh.fsf@gmail.com> <87lesxtivx.fsf@gnus.org> <87wnchl1fm.fsf@gmail.com> Date: Wed, 13 Jul 2022 22:14:44 +0300 Message-ID: <86y1wwg6zf.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 56530 Cc: David Ponce , Lars Ingebrigtsen , 56530@debbugs.gnu.org, Visuwesh X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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.7 (-) >> AFAICT, the recipe produces what I had in my mind when I proposed. The >> behaviour might seems slightly odd since mouse-yank-at-point is set to >> nil in OP's case. It shouldn't be hard to take this defcustom into >> account tho. > > I think that neither Emacs nor `cua-mode' should behave differently from > other X programs in this regard, certainly not by default. Could we > please avoid that? The entire point of `cua-mode' is to be /more/ like > other software, not less. I'd like to know what programs do you mean. In every program I see the same behavior: 1. Select a region 2. Choose "Copy" from the context menu 3. Select another region 4. Choose "Paste" on the region from the context menu It always deletes the region before pasting the text from the clipboard. From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 13 15:29:41 2022 Received: (at 56530) by debbugs.gnu.org; 13 Jul 2022 19:29:41 +0000 Received: from localhost ([127.0.0.1]:47772 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oBi3J-0005hS-Bw for submit@debbugs.gnu.org; Wed, 13 Jul 2022 15:29:41 -0400 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:34265) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oBi3H-0005h0-9D for 56530@debbugs.gnu.org; Wed, 13 Jul 2022 15:29:39 -0400 Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 4B4B4240002; Wed, 13 Jul 2022 19:29:32 +0000 (UTC) From: Juri Linkov To: Visuwesh Subject: Re: bug#56530: 29.0.50; mouse-2 cut selected text when cua-mode is enabled In-Reply-To: <87wnchl1fm.fsf@gmail.com> (Visuwesh's message of "Wed, 13 Jul 2022 16:33:25 +0530") Organization: LINKOV.NET References: <3c83c124-95a9-9dc6-a7a6-6e357c7574e4@orange.fr> <877d4hmjdh.fsf@gmail.com> <87lesxtivx.fsf@gnus.org> <87wnchl1fm.fsf@gmail.com> Date: Wed, 13 Jul 2022 22:19:56 +0300 Message-ID: <86mtdcg6qr.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 56530 Cc: David Ponce , Lars Ingebrigtsen , 56530@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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.7 (-) >> That wasn't really the intention of the change, I think? It was so that >> if you paste text from a different program into a selected area in >> Emacs, then that area would be deleted first, or do I misremember? > > AFAICT, the recipe produces what I had in my mind when I proposed. The > behaviour might seems slightly odd since mouse-yank-at-point is set to > nil in OP's case. It shouldn't be hard to take this defcustom into > account tho. It should delete the region only when clicking on the selected region. Maybe it's possible to add a corresponding function for the 'delete-selection' property? From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 13 20:57:18 2022 Received: (at 56530) by debbugs.gnu.org; 14 Jul 2022 00:57:18 +0000 Received: from localhost ([127.0.0.1]:48014 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oBnAE-0006X6-L6 for submit@debbugs.gnu.org; Wed, 13 Jul 2022 20:57:18 -0400 Received: from sonic302-22.consmr.mail.ne1.yahoo.com ([66.163.186.148]:40800) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oBnAA-0006WZ-3C for 56530@debbugs.gnu.org; Wed, 13 Jul 2022 20:57:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1657760220; bh=7DZgWQTV6q7+wnt57hFtJVLqA+NZxY8/WgVfp7ZZkRA=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=OS5eQcrFVL1YYSFDF3eYir63OGhb+Cnx9kWKQPygcmGdJrW1HbayQAid9rrEzW/LBq2wipQvbDI+Yt2F/bqylSzOMLT5yqfDdYeQGTN83H+OdbRMJy5eMxt4d390tMDEUGT/aOdBIJQ7HDhIUV78TqLKA4tq+aE9cC16w2mZEl1Iq41eThQ4H/OWpe8LJiFsS7mE6VkURVpvzmnCmeisFGn86HGzzhy5DVl9qRQk8InZo1i+F7cHl5zfh01rvRyG6hKnHYm421+ZRozbZeHPAQ4XjFpv0upLyd0uL81U/ydaioqh/3+RzKriQKxXyLVGv7f3rP1VRjkcOm3HGubvqA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1657760220; bh=qKKur2H4sxT16k94vgIFJ+ZQwyoONmQdU3aPc50qe/w=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=Dqjv4dTGeiHkTc5JTfnW+UKszcof+GAGYrdffZLED47v0QyBq8UA2m9ke5EfSxGFUxt2OUt8uwX/GAwhev8QbVzkYun2/VNMZQvT0uJwGzYzQe2muFQIf4MQMZQZW2yy0xVpWAnCPx+utb4vpAMPcepLDLu9I7Aye06bGjSCE2t5v96M0iboPEOld1i+XmdAzQ46WW31XXe6meZzT//6BHNW4qD2eOgysavMu0ZLRybRZD7eO1h83VqF0ClqCNQ+Y28RG9KyQI+20r9jcLyXdKe93BNOdMVwE1WGApHxCJc2QOJJ4K5CBH8bSZ1xpHutyKUjBtsBFq5f63UbYDFnYg== X-YMail-OSG: uRxvyGQVM1lC2GM1hOWjGvVgb0jl5p7ExLgMZ6YbW9yVtEnWkHeY1nYJ3WXLPbO QPX15jGzVqCjV2hxfhm9uJPNmJpcv_bXY.sZfaD5Xll9PCJE2Wdxk3ed5npV_Ya5CmtW9E7wEw1P plRIbLeXvoy6ozzgs_rhc8UysFEBOFfckubYQq6QbDxIJyJQ0CSgGICqf0pyqHfjwmMMtjQKRS0_ Kuqx10G5bEkxYWRUXhIF4S_KqilKkofsnl4vsU7luWE.jjXJGpcZFZ7KFk9Ciix2V5qhoGZa0jjw lG4gLD8EX_nsfP4_qHaREodk6H8GDDQ3V.I_k8JUtt7Kn6yiS18piH7rJ5FMZEgPwX4lDgY8zXmh K5WDXDlm26CW1CL4yjkr9mUs7D6xwLAqjHjCLYRMn7Flrz9HHMDeCFXmHO_erIWZr2a7I2n2PmO7 eLopujbizZPDcnE.oXjqfslP8Vk_sFlwnuTc48D44APHpcIrgdCIPN9762BqVb41OQs86bqP1Yyq eTibC4QmiaX0LwMWZfMDI6wbvjLkMx_4gYXUKZ5amK7AQo3ybbWdGJsf96kE9BEX9Wu6sbEtpVdw AFzasvAmme7e1fPGSANkGqjiPxEAh9iNKxi0WqftdLiRPfCW_hqn82OBYbxx_9Oy8uHTg8I2XaCo oK2dCsPeOaFa6Jnvnfty8rtHZq4uSNaXSqIAcR08p3keXCB8yiQQ6I8au.zcrDHy2PCSQNJvwPei iHLUmbqwuZ.ahBjxd7y.Vyy6Y8nD.CRdp3Woky9T5u1_.IthbdPSkkxDHqLNfC0y30yhg2EcXHMW PFvZtdpdaGaO7Ef5lLxZBqQgDrxJFCsDS4h5_AiMT.RZQjukIq41k0xXd8snlhCQP7Kl8BN.px0z zA0bIoiidsUL094C.pB123L4kEbZlDgm1ggDPkIq53tp2BgAEgDONhRFiBKaiHQOp1ijhBH_a_wd DafMGXQqAgx.fISDCiNCitUqVPUbnTsjvbJeLfwxD9x8jWWSOT9ooOjpMUo3SOGoEzJ.zqK_Japp MIx9dMgLlHouI9UlG8VTA7Wby9eo7IePccD.Ag_hDiiXt6kJ3uT7ZVnnIEYMvDcHVxrTEK8vhZi0 WeE8vVJAIb1NXUWg5tB012gWppZcgPIEVj6OBwA8imEnYsXWjrOh8yPEyPi7N_9Qr9X7P50NzWtf ZcBeW8jBuk4YQo0bg9mbP3gd8rxW7KiUtU2iuLOkjw2a5SmQ26LonFyQceS9MRKERIFWZG4xKpQn gEwfptsH_oOph239sbC5smB.IAyHQI74mamn8yHg_TpvusiJZYvLMGekyWU3lPIZuNKAyfv7zqcO WSHcGr_UMbTgH.lu._QUqNhV8DtHlN3jzTTfrHLUOuHSy0weAmKBVqeFxoYXCTTCpnwh4wd8tY5h S8PuqgmEfTdkRTU5NxpHkkfX8LKFMiqqRH4gTYRbi5.kJROHhEQTf2nPTs.IchuVh20a6GYsrfye 8K7_DGwDQKYzue5z.BPp1s1t9yG.Z0gMqDKCgSfNtP_7ZEtcXcBp9T1AtOw9tr_BQamvTBuPc1tk mdJZIZh4U5iQTBYrLT.1p2NsG1lT_AiSb0_0Ljbcsf2VDUouTNtigtIoaDET2.HhWSUtq.MtoBe1 BP.jDuoF4R4NsTo0p46tuc.mxHD4BABh6V5lnwEXv_x1YVI_WUh2L_xqvAXAdY_LRtBz_vcWQ_yY .T.tF81.NBr1_BvA44a3lQ6DDHlcdEh12j4QhuFHn__KLlZzU0rLfbcl6FRgrX9ul98FW9xrz0_B Xlp9arNGEC1ipNNieWD0AsslRSbb5Irij76zDxviPEiGhLr8N730fwtWsxCowxZtKjuNv0AflCoC n0x4d8bqd5wCGNPT75GQLVPoWh.qOjzBZ4JqT.W97Obh_iyzgmRhfXkOPGkIG_ckzPAZDbzP89Ri GyMdLqJnNZNhPqmODoJuA2kTqjrAqH63dINP7IdV0jgkDwoa.BxqI_D43782NO4SdTl.7LA9cjxB R9wZnsgaqHp8eUEY2UckhSCSmdsDtx0gcJ2Lc7r_out.9qMPAqgqBxAXzHMRiAbs6ZNkYTinDQ7g 2EofDXvxWvfGL6eseVW69Ly2R3BDIonyByIePOS590P0.3j0Ve1nfiRwL1DwJyrw835PCJUmSj34 a8VlrJrFPRnoku2jqGM3QJQnm7pms1lME0.r5XjA5H3VVrWkhm_s2dbZW4pJvU6_Vf1XKxI_vjsk lUaRZTK3GA0d0ISY3PbXkNVqLbSt9Pl7qgxqIB6gqEE14V8zO3TAVJZSzTeJz X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic302.consmr.mail.ne1.yahoo.com with HTTP; Thu, 14 Jul 2022 00:57:00 +0000 Received: by hermes--canary-production-sg3-67975bbd4b-wpvcf (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 487bccccaab5fdac07c98162344aaac2; Thu, 14 Jul 2022 00:56:54 +0000 (UTC) From: Po Lu To: Visuwesh Subject: Re: bug#56530: 29.0.50; mouse-2 cut selected text when cua-mode is enabled References: <3c83c124-95a9-9dc6-a7a6-6e357c7574e4@orange.fr> <877d4hmjdh.fsf@gmail.com> Date: Thu, 14 Jul 2022 08:56:49 +0800 In-Reply-To: <877d4hmjdh.fsf@gmail.com> (Visuwesh's message of "Wed, 13 Jul 2022 15:20:34 +0530") Message-ID: <87edyotstq.fsf@yahoo.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Mailer: WebService/1.1.20407 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Content-Length: 401 X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 56530 Cc: David Ponce , 56530@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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.0 (-) Visuwesh writes: > It is expected. mouse-2 (and other mouse yank commands) were recently > changed to respect delete-selection-mode (which is enabled by cua-mode) > by yours truly. :-) This is very much wrong: programs should never set the clipboard to the contents of the primary selection upon a middle-click paste. That makes inserting the clipboard impossible later on. From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 14 13:20:32 2022 Received: (at 56530) by debbugs.gnu.org; 14 Jul 2022 17:20:32 +0000 Received: from localhost ([127.0.0.1]:38740 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oC2Vk-0001xD-Tq for submit@debbugs.gnu.org; Thu, 14 Jul 2022 13:20:32 -0400 Received: from quimby.gnus.org ([95.216.78.240]:36652) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oC2Vj-0001wl-4C for 56530@debbugs.gnu.org; Thu, 14 Jul 2022 13:20:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=7PiS/Mo+evv0iKJhVzKHOGfRq6onWxcikLZ1b50bGL8=; b=ZSN4f+hUYkFdjKV1jAIeEdqt8P RXNRbRXwAr7rMkuFJ4bvvXDC2Gzxq6Kotiay0oi1D0wR/yAlu871a3LptlxfK66S1AeMlQxzE3vtd aCw9lgE9QgNboBqD/vor3z9QUaObxAqy9Bi/63S2vyRzSLTwcmrUmRYVueev1R7+hXfQ=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oC2Va-0004c2-7G; Thu, 14 Jul 2022 19:20:16 +0200 From: Lars Ingebrigtsen To: Juri Linkov Subject: Re: bug#56530: 29.0.50; mouse-2 cut selected text when cua-mode is enabled In-Reply-To: <86mtdcg6qr.fsf@mail.linkov.net> (Juri Linkov's message of "Wed, 13 Jul 2022 22:19:56 +0300") References: <3c83c124-95a9-9dc6-a7a6-6e357c7574e4@orange.fr> <877d4hmjdh.fsf@gmail.com> <87lesxtivx.fsf@gnus.org> <87wnchl1fm.fsf@gmail.com> <86mtdcg6qr.fsf@mail.linkov.net> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAElBMVEWbclq2i2SNcVVN MSasPzb///9/8nd/AAAAAWJLR0QF+G/pxwAAAAd0SU1FB+YHDhELGl1EEOoAAAGcSURBVDjLdZOL ccMwCEAJ6QBRzwNQ0QES0ABxpP1nKiDLie2ay50lPf4QgAuE5JyZ4tMFUjwj2VmPYL2ZyjjeOlD/ kQNcdUJJ9iZvW+331ZWdIoRK3oi9W0LkKe0AxPM/gCAjWhmCe4DkAVUMRq7cczQQ9SlRpjCyR75b SR6fhQWIwJVZPmKzqDBSNLKXk9FDZ2ZVdSXJutTZi7OrqgCKeIhAi7k9uyqFRhzMguOW1QKFWHQM ZxGgK3qe0XYO0PU0uoh57W4OD2LAIhAT0gAenD0bAB1V9LZjuBcCcj9uNGZp6SO6hZV1eY8WvD3Q AXzOHNiTu5rVADEHXzUDeM1EiwnFPtlsxCtgitkvxUZL0BLybvqeklofrLBYQvbRmDn+YL6M9hjr n1Jafaik1O68Bc+pFn2kNLWdRWtf1UHq0+QAdvytj291gNEtDgtXKXVO2sqrxVw2ruZUq9Zc9lm1 ear6KSuY5smCsA68/P3KPLX28p0ob2ALqgbqbHnJFQ6u2hM50w234CgLGM07NFHlxOLU1U7kDPAJ 8BT+AKy7pC/MFreOAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIyLTA3LTE0VDE3OjExOjI1KzAwOjAw 5UjY9wAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMi0wNy0xNFQxNzoxMToyNSswMDowMJQVYEsAAAAA SUVORK5CYII= X-Now-Playing: Heidi Berry's _Love_: "Great Big Silver Key" Date: Thu, 14 Jul 2022 19:20:13 +0200 Message-ID: <87edyna9wy.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Juri Linkov writes: > It should delete the region only when clicking on the selected region. > Maybe it's possible to add a corresponding function for the > 'delete-selection' property? Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 56530 Cc: David Ponce , 56530@debbugs.gnu.org, Visuwesh X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -3.3 (---) Juri Linkov writes: > It should delete the region only when clicking on the selected region. > Maybe it's possible to add a corresponding function for the > 'delete-selection' property? Shouldn't be too difficult, but it seems like different people have different expectations of what should happen here, so I think having separate minor modes (or some user options) is probably the way to go. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 14 13:29:25 2022 Received: (at 56530) by debbugs.gnu.org; 14 Jul 2022 17:29:25 +0000 Received: from localhost ([127.0.0.1]:38758 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oC2eS-0002CK-Ra for submit@debbugs.gnu.org; Thu, 14 Jul 2022 13:29:25 -0400 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:60395) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oC2eL-0002Bp-DH for 56530@debbugs.gnu.org; Thu, 14 Jul 2022 13:29:17 -0400 Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id E816A1C0002; Thu, 14 Jul 2022 17:29:09 +0000 (UTC) From: Juri Linkov To: Lars Ingebrigtsen Subject: Re: bug#56530: 29.0.50; mouse-2 cut selected text when cua-mode is enabled In-Reply-To: <87edyna9wy.fsf@gnus.org> (Lars Ingebrigtsen's message of "Thu, 14 Jul 2022 19:20:13 +0200") Organization: LINKOV.NET References: <3c83c124-95a9-9dc6-a7a6-6e357c7574e4@orange.fr> <877d4hmjdh.fsf@gmail.com> <87lesxtivx.fsf@gnus.org> <87wnchl1fm.fsf@gmail.com> <86mtdcg6qr.fsf@mail.linkov.net> <87edyna9wy.fsf@gnus.org> Date: Thu, 14 Jul 2022 20:24:52 +0300 Message-ID: <867d4fa9p7.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 56530 Cc: David Ponce , 56530@debbugs.gnu.org, Visuwesh X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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.7 (-) >> It should delete the region only when clicking on the selected region. >> Maybe it's possible to add a corresponding function for the >> 'delete-selection' property? > > Shouldn't be too difficult, but it seems like different people have > different expectations of what should happen here, so I think having > separate minor modes (or some user options) is probably the way to go. There is already the minor mode: delete-selection-mode that is configured by symbol properties. Supporting a descriptive symbol name would allow to easily configure the desired behavior with just: (put 'mouse-yank-at-click 'delete-selection 'yank-on-region) From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 14 14:04:57 2022 Received: (at 56530) by debbugs.gnu.org; 14 Jul 2022 18:04:57 +0000 Received: from localhost ([127.0.0.1]:38842 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oC3Cq-0007XD-Uy for submit@debbugs.gnu.org; Thu, 14 Jul 2022 14:04:57 -0400 Received: from quimby.gnus.org ([95.216.78.240]:37282) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oC3Co-0007Wz-EZ for 56530@debbugs.gnu.org; Thu, 14 Jul 2022 14:04:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=sPdnDZoWvlpW/UxB1UdbFktWte2J8aGgt1Un7CiAG9o=; b=sWtBd9YrEI5xQHMh1LVcbaDy5K KSfPa2Y825lZBcMNx/SrqtNRkXRy4ZyYsyPVr+0a/zyBLUSVQP00pdXUJmZLDm0YIM8Qidv24MCWp 1KwK2aboepeg/6vnFTOG2PLnOJsuaggxmcFXw1nVIc8WLseHv2G3KGtaCpi4ZuBIfCr8=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oC3Cf-00056M-N8; Thu, 14 Jul 2022 20:04:48 +0200 From: Lars Ingebrigtsen To: Juri Linkov Subject: Re: bug#56530: 29.0.50; mouse-2 cut selected text when cua-mode is enabled In-Reply-To: <867d4fa9p7.fsf@mail.linkov.net> (Juri Linkov's message of "Thu, 14 Jul 2022 20:24:52 +0300") References: <3c83c124-95a9-9dc6-a7a6-6e357c7574e4@orange.fr> <877d4hmjdh.fsf@gmail.com> <87lesxtivx.fsf@gnus.org> <87wnchl1fm.fsf@gmail.com> <86mtdcg6qr.fsf@mail.linkov.net> <87edyna9wy.fsf@gnus.org> <867d4fa9p7.fsf@mail.linkov.net> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAFVBMVEXk284dFxavnJOM dm5bQz6Yg3v///+dUZfgAAAAAWJLR0QGYWa4fQAAAAd0SU1FB+YHDhIDOTW8VckAAAGbSURBVDjL lZO7dsIwDIZd2gfAwd1bE+8lUva6FjuHJO//KtXFhgBlqBZz9EW3X8I59+If7MOJfT6Cr2dgqyA/ gvdnIDwDXsEffm1rs3a06K8VyOQ9ARj6ZvAqP3bZw7BQ9oFy6/dNuiAfjjEihRxQQFeBshhhgH6I ErJzJhWFeYBzZFuiglDBSOo1O9RBWKoQ9+MdOJmG5tnYk2u/8sEqUQVbk+pn5d8r2Bk4iqOBpq8+ 7Ei1xtz01WeQiE0SQBWYhpyr/0l0Yn4LgnhISmEDrwYkV5FME1ZgGoYio6RpvBZvYCI2CTzcAK6O BYH9qW63nVuJCUbgdD3dgsA1VDG8A02umcgrcn07vkGFIkJuQsC+nZROgaEAwcizuPlybIMU4MuC 5cw7uaSSWdhfRhmSl2IgtxMiWJZFhTFQO5EAaw7J2s3aCQcUgGk8x4Sgm+WDzcLqbB1vM7qa+yAD lBAEdpLMESDnzv1MPR4LEd/9uwLZMuuNSDOyPzDoGkgmnP01gr+CuAfkgWGcYLrcsLMn3RzpGgxP wKP9H/wCro6L3ezBcMcAAAAldEVYdGRhdGU6Y3JlYXRlADIwMjItMDctMTRUMTg6MDM6NTcrMDA6 MDCaGRoPAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIyLTA3LTE0VDE4OjAzOjU3KzAwOjAw60SiswAA AABJRU5ErkJggg== X-Now-Playing: Heidi Berry's _Miracle_: "Holy Grail" Date: Thu, 14 Jul 2022 20:04:45 +0200 Message-ID: <87h73j7epu.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Juri Linkov writes: > There is already the minor mode: delete-selection-mode > that is configured by symbol properties. > Supporting a descriptive symbol name would allow to easily > configure the desired behavior with j [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 56530 Cc: David Ponce , 56530@debbugs.gnu.org, Visuwesh X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -3.3 (---) Juri Linkov writes: > There is already the minor mode: delete-selection-mode > that is configured by symbol properties. > Supporting a descriptive symbol name would allow to easily > configure the desired behavior with just: > > (put 'mouse-yank-at-click 'delete-selection 'yank-on-region) The problem is that you have to `put' on three symbols, which isn't optimal. (My proposed mode does just that.) -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 15 14:56:45 2022 Received: (at 56530) by debbugs.gnu.org; 15 Jul 2022 18:56:45 +0000 Received: from localhost ([127.0.0.1]:42146 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oCQUX-0003zd-Ft for submit@debbugs.gnu.org; Fri, 15 Jul 2022 14:56:45 -0400 Received: from relay11.mail.gandi.net ([217.70.178.231]:57903) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oCQUU-0003zM-GO for 56530@debbugs.gnu.org; Fri, 15 Jul 2022 14:56:44 -0400 Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 15855100004; Fri, 15 Jul 2022 18:56:31 +0000 (UTC) From: Juri Linkov To: Lars Ingebrigtsen Subject: Re: bug#56530: 29.0.50; mouse-2 cut selected text when cua-mode is enabled In-Reply-To: <87h73j7epu.fsf@gnus.org> (Lars Ingebrigtsen's message of "Thu, 14 Jul 2022 20:04:45 +0200") Organization: LINKOV.NET References: <3c83c124-95a9-9dc6-a7a6-6e357c7574e4@orange.fr> <877d4hmjdh.fsf@gmail.com> <87lesxtivx.fsf@gnus.org> <87wnchl1fm.fsf@gmail.com> <86mtdcg6qr.fsf@mail.linkov.net> <87edyna9wy.fsf@gnus.org> <867d4fa9p7.fsf@mail.linkov.net> <87h73j7epu.fsf@gnus.org> Date: Fri, 15 Jul 2022 21:53:33 +0300 Message-ID: <86edym1a36.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 56530 Cc: David Ponce , 56530@debbugs.gnu.org, Visuwesh X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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.7 (-) --=-=-= Content-Type: text/plain >> There is already the minor mode: delete-selection-mode >> that is configured by symbol properties. >> Supporting a descriptive symbol name would allow to easily >> configure the desired behavior with just: >> >> (put 'mouse-yank-at-click 'delete-selection 'yank-on-region) > > The problem is that you have to `put' on three symbols, which isn't > optimal. (My proposed mode does just that.) The default settings should be suitable for all users, but modes for groups of settings could be added too. This patch works well but only like Visuwesh pointed out when mouse-yank-at-point is set to t. This is because mouse-yank-primary has such line: (or mouse-yank-at-point (mouse-set-point event)) When delete-selection deletes the region where the mouse is clicked, mouse-set-point loses track and sets point to a random position, because the event contains fixed positions, not markers. I wonder why? --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=yank-on-region.patch diff --git a/lisp/delsel.el b/lisp/delsel.el index 5310328e5f..d9e0141d90 100644 --- a/lisp/delsel.el +++ b/lisp/delsel.el @@ -39,6 +39,8 @@ ;; For commands which do a yank; ensures the region about to be ;; deleted isn't immediately yanked back, which would make the ;; command a no-op. +;; `yank-on-region' +;; Like `yank' but applied only when clicked on the region. ;; `supersede' ;; Delete the active region and ignore the current command, ;; i.e. the command will just delete the region. This is for @@ -176,6 +178,8 @@ delete-selection-helper For commands which do a yank; ensures the region about to be deleted isn't immediately yanked back, which would make the command a no-op. + `yank-on-region' + Like `yank' but applied only when clicked on the region. `supersede' Delete the active region and ignore the current command, i.e. the command will just delete the region. This is for @@ -220,6 +224,11 @@ delete-selection-helper ;; If the region was, say, rectangular, make sure we yank ;; from the top, to "replace". (goto-char pos))) + ((eq type 'yank-on-region) + (let ((pos (posn-point (event-end last-nonmenu-event)))) + (when (and (>= pos (region-beginning)) + (<= pos (region-end))) + (delete-selection-helper 'yank)))) ((eq type 'supersede) (let ((empty-region (= (point) (mark)))) (delete-active-region) @@ -300,6 +309,12 @@ delete-selection-uses-region-p (put 'yank-pop 'delete-selection 'yank) (put 'yank-from-kill-ring 'delete-selection 'yank) (put 'clipboard-yank 'delete-selection 'yank) + +(put 'mouse-yank-primary 'delete-selection 'yank-on-region) +(put 'mouse-yank-secondary 'delete-selection 'yank-on-region) +(put 'mouse-yank-at-click 'delete-selection 'yank-on-region) +(put 'menu-bar-select-yank 'delete-selection 'yank-on-region) + (put 'insert-register 'delete-selection t) ;; delete-backward-char and delete-forward-char already delete the selection by ;; default, but not delete-char. --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 16 06:34:51 2022 Received: (at 56530) by debbugs.gnu.org; 16 Jul 2022 10:34:51 +0000 Received: from localhost ([127.0.0.1]:42998 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oCf8M-0000K5-NE for submit@debbugs.gnu.org; Sat, 16 Jul 2022 06:34:51 -0400 Received: from quimby.gnus.org ([95.216.78.240]:56006) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oCf8L-0000Js-BA for 56530@debbugs.gnu.org; Sat, 16 Jul 2022 06:34:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=vzM+hoTjLTE1DRapdPnOQcC8Lhzv+xgfAldKVrE2dmk=; b=HaRcnnCfq+UvSmXweIhygib1VT wyvDP8htKt5uPQ0jyj6cqV48MM/8+cWVeJAk1hHeSz0qztg2b9MJpqCvUHezb+Qb8wPA9xqcXBPXz ZX8BfYMYC9Z5n6ad4Sk5nlSGlEwWuM+fm0fwvRsp91fvPsiI8SRiSDXDk7vq+ev4FMWk=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oCf8B-0000wx-Ms; Sat, 16 Jul 2022 12:34:42 +0200 From: Lars Ingebrigtsen To: Juri Linkov Subject: Re: bug#56530: 29.0.50; mouse-2 cut selected text when cua-mode is enabled In-Reply-To: <86edym1a36.fsf@mail.linkov.net> (Juri Linkov's message of "Fri, 15 Jul 2022 21:53:33 +0300") References: <3c83c124-95a9-9dc6-a7a6-6e357c7574e4@orange.fr> <877d4hmjdh.fsf@gmail.com> <87lesxtivx.fsf@gnus.org> <87wnchl1fm.fsf@gmail.com> <86mtdcg6qr.fsf@mail.linkov.net> <87edyna9wy.fsf@gnus.org> <867d4fa9p7.fsf@mail.linkov.net> <87h73j7epu.fsf@gnus.org> <86edym1a36.fsf@mail.linkov.net> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAFVBMVEVmX11rZWlUU2iD dmZRTlc4O1T///8ttQVxAAAAAWJLR0QGYWa4fQAAAAd0SU1FB+YHEAofMX/jUsIAAAGySURBVDjL bZKJjeAgDEU/VgqATAPGSgfbQBSRBlbQfyvrg1yjtZSE+OHvA5BQptWfVR4DpXBL+SkTkOgKqwNZ yx//PhE5QFV/LuURA5L91pknh1dXIBi4CijhVT+E08vvthZ1QqS+gaxVY4ShIbqeCSx36KgdSfhJ kGJDgUlRvf23IgSHgjpLTW8g975XCZk0goKky4+SM1zK6qszAD7rjLQqYG1yratlmkfgIObMsDa9 7uSgaIQIay6OLrSHQiANbj7OJPKM0pQyjmOeWmYdnfetE1dtDiA6Y9ixke0yEH722siOIOIxwQUp VqsBJ9X3AfO8Be8Iu0syoxT8fRF2l74OLeyg/wCO85C3WXEB+As8EuCP1B28K9h95X0x4b6fQNvp VSuRZVFAOD85GPkCDTewaiskukTHO8IT7WQR+y+gaXkxcA3uaZC23S/vF2zwq2F2Hl8QR6p9tAds cvDS7au9NxWc6TfdxMsYbW9bc7V2+CVqBs7RVaVNsLfbFLSmT+TfsQ21CUY/x9AGsXQs6hqt29us t6F6y5QYbZymcjrBpW0/p337CCnff3YH3QPD/gGqh4uOt56NmgAAACV0RVh0ZGF0ZTpjcmVhdGUA MjAyMi0wNy0xNlQxMDozMTo0OSswMDowMEY4If4AAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjItMDct MTZUMTA6MzE6NDkrMDA6MDA3ZZlCAAAAAElFTkSuQmCC X-Now-Playing: Xeno & Oaklander's _Sentinelle_: "Saracen" Date: Sat, 16 Jul 2022 12:34:37 +0200 Message-ID: <8735f1tkg2.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Juri Linkov writes: > This patch works well Looks good to me. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 56530 Cc: David Ponce , 56530@debbugs.gnu.org, Visuwesh X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -3.3 (---) Juri Linkov writes: > This patch works well Looks good to me. > but only like Visuwesh pointed out > when mouse-yank-at-point is set to t. This is because > mouse-yank-primary has such line: > > (or mouse-yank-at-point (mouse-set-point event)) > > When delete-selection deletes the region where the mouse is clicked, > mouse-set-point loses track and sets point to a random position, > because the event contains fixed positions, not markers. > I wonder why? Sounds like a bug. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 17 15:35:10 2022 Received: (at 56530) by debbugs.gnu.org; 17 Jul 2022 19:35:10 +0000 Received: from localhost ([127.0.0.1]:48598 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oDA2o-0006pk-Fl for submit@debbugs.gnu.org; Sun, 17 Jul 2022 15:35:10 -0400 Received: from relay12.mail.gandi.net ([217.70.178.232]:48389) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oDA2m-0006pG-0X for 56530@debbugs.gnu.org; Sun, 17 Jul 2022 15:35:08 -0400 Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 188FC200004; Sun, 17 Jul 2022 19:34:58 +0000 (UTC) From: Juri Linkov To: Lars Ingebrigtsen Subject: Re: bug#56530: 29.0.50; mouse-2 cut selected text when cua-mode is enabled In-Reply-To: <8735f1tkg2.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sat, 16 Jul 2022 12:34:37 +0200") Organization: LINKOV.NET References: <3c83c124-95a9-9dc6-a7a6-6e357c7574e4@orange.fr> <877d4hmjdh.fsf@gmail.com> <87lesxtivx.fsf@gnus.org> <87wnchl1fm.fsf@gmail.com> <86mtdcg6qr.fsf@mail.linkov.net> <87edyna9wy.fsf@gnus.org> <867d4fa9p7.fsf@mail.linkov.net> <87h73j7epu.fsf@gnus.org> <86edym1a36.fsf@mail.linkov.net> <8735f1tkg2.fsf@gnus.org> Date: Sun, 17 Jul 2022 21:49:41 +0300 Message-ID: <86r12j5yya.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 56530 Cc: David Ponce , 56530@debbugs.gnu.org, Visuwesh X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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.7 (-) >> but only like Visuwesh pointed out >> when mouse-yank-at-point is set to t. This is because >> mouse-yank-primary has such line: >> >> (or mouse-yank-at-point (mouse-set-point event)) >> >> When delete-selection deletes the region where the mouse is clicked, >> mouse-set-point loses track and sets point to a random position, >> because the event contains fixed positions, not markers. >> I wonder why? > > Sounds like a bug. All affected mouse commands mouse-yank-from-menu, mouse-yank-at-click, mouse-yank-primary, mouse-yank-secondary have the same line: (or mouse-yank-at-point (mouse-set-point event)) So when the region is deleted by delete-selection-pre-hook `mouse-set-point' tries to set point using outdated information of the event's position in the deleted region. Maybe delete-selection-pre-hook could directly modify the event? Everything works fine with this: ((eq type 'yank-on-region) (let ((pos (posn-point (event-end last-nonmenu-event)))) (when (and (>= pos (region-beginning)) (<= pos (region-end))) (delete-selection-helper 'yank) (setf (nth 5 (nth 1 last-nonmenu-event)) (region-beginning))))) But is this a good idea? From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 22 11:07:25 2022 Received: (at 56530) by debbugs.gnu.org; 22 Jul 2022 15:07:25 +0000 Received: from localhost ([127.0.0.1]:42147 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oEuFR-0006n0-Dy for submit@debbugs.gnu.org; Fri, 22 Jul 2022 11:07:25 -0400 Received: from quimby.gnus.org ([95.216.78.240]:39746) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oEuFP-0006mi-RA for 56530@debbugs.gnu.org; Fri, 22 Jul 2022 11:07:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=oOYvb8jUj7Gvxkg+Easx2r8accZnh2OP9YmgUlcI844=; b=BIhowOrot104up9dLQ+mMl5WQR gjjRVOkayrJPmD3iNwnWBo6ZaqCYBvZM7IlgB3dBn1HQ2sHEsbvxva3G9yOHDmdMXT+It6TQeH7Hc PjhmfOj7J5zd6tX4O6k6xA8PcPqXFC5tY60I6lMlhL4JJdBOQg1jXzpRlEoHH3KxB3fI=; Received: from 46.156.37.168.tmi.telenormobil.no ([46.156.37.168] helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oEuFG-00007Y-HU; Fri, 22 Jul 2022 17:07:17 +0200 From: Lars Ingebrigtsen To: Juri Linkov Subject: Re: bug#56530: 29.0.50; mouse-2 cut selected text when cua-mode is enabled In-Reply-To: <86r12j5yya.fsf@mail.linkov.net> (Juri Linkov's message of "Sun, 17 Jul 2022 21:49:41 +0300") References: <3c83c124-95a9-9dc6-a7a6-6e357c7574e4@orange.fr> <877d4hmjdh.fsf@gmail.com> <87lesxtivx.fsf@gnus.org> <87wnchl1fm.fsf@gmail.com> <86mtdcg6qr.fsf@mail.linkov.net> <87edyna9wy.fsf@gnus.org> <867d4fa9p7.fsf@mail.linkov.net> <87h73j7epu.fsf@gnus.org> <86edym1a36.fsf@mail.linkov.net> <8735f1tkg2.fsf@gnus.org> <86r12j5yya.fsf@mail.linkov.net> Date: Fri, 22 Jul 2022 17:07:12 +0200 Message-ID: <877d4589un.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Juri Linkov writes: > All affected mouse commands mouse-yank-from-menu, mouse-yank-at-click, > mouse-yank-primary, mouse-yank-secondary have the same line: > > (or mouse-yank-at-point (mouse-set-point event)) > > So when [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP 0.0 TVD_RCVD_IP Message was received from an IP address -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 56530 Cc: David Ponce , 56530@debbugs.gnu.org, Visuwesh X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -3.3 (---) Juri Linkov writes: > All affected mouse commands mouse-yank-from-menu, mouse-yank-at-click, > mouse-yank-primary, mouse-yank-secondary have the same line: > > (or mouse-yank-at-point (mouse-set-point event)) > > So when the region is deleted by delete-selection-pre-hook > `mouse-set-point' tries to set point using outdated information > of the event's position in the deleted region. > > Maybe delete-selection-pre-hook could directly modify the event? > Everything works fine with this: > > ((eq type 'yank-on-region) > (let ((pos (posn-point (event-end last-nonmenu-event)))) > (when (and (>= pos (region-beginning)) > (<= pos (region-end))) > (delete-selection-helper 'yank) > (setf (nth 5 (nth 1 last-nonmenu-event)) (region-beginning))))) > > But is this a good idea? It sounds kinda gross. Would it be possible to rewrite these commands to that point is set before the deletion is done, or is that unfeasible? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 24 13:18:08 2022 Received: (at 56530) by debbugs.gnu.org; 24 Jul 2022 17:18:08 +0000 Received: from localhost ([127.0.0.1]:48593 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oFfF2-0003UM-Ac for submit@debbugs.gnu.org; Sun, 24 Jul 2022 13:18:08 -0400 Received: from relay10.mail.gandi.net ([217.70.178.230]:39995) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oFfF0-0003Tc-A2 for 56530@debbugs.gnu.org; Sun, 24 Jul 2022 13:18:06 -0400 Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 5B20C240002; Sun, 24 Jul 2022 17:17:57 +0000 (UTC) From: Juri Linkov To: Lars Ingebrigtsen Subject: Re: bug#56530: 29.0.50; mouse-2 cut selected text when cua-mode is enabled In-Reply-To: <877d4589un.fsf@gnus.org> (Lars Ingebrigtsen's message of "Fri, 22 Jul 2022 17:07:12 +0200") Organization: LINKOV.NET References: <3c83c124-95a9-9dc6-a7a6-6e357c7574e4@orange.fr> <877d4hmjdh.fsf@gmail.com> <87lesxtivx.fsf@gnus.org> <87wnchl1fm.fsf@gmail.com> <86mtdcg6qr.fsf@mail.linkov.net> <87edyna9wy.fsf@gnus.org> <867d4fa9p7.fsf@mail.linkov.net> <87h73j7epu.fsf@gnus.org> <86edym1a36.fsf@mail.linkov.net> <8735f1tkg2.fsf@gnus.org> <86r12j5yya.fsf@mail.linkov.net> <877d4589un.fsf@gnus.org> Date: Sun, 24 Jul 2022 19:52:19 +0300 Message-ID: <86sfmq78sc.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 56530 Cc: David Ponce , 56530@debbugs.gnu.org, Visuwesh X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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.7 (-) >> All affected mouse commands mouse-yank-from-menu, mouse-yank-at-click, >> mouse-yank-primary, mouse-yank-secondary have the same line: >> >> (or mouse-yank-at-point (mouse-set-point event)) >> >> So when the region is deleted by delete-selection-pre-hook >> `mouse-set-point' tries to set point using outdated information >> of the event's position in the deleted region. >> >> Maybe delete-selection-pre-hook could directly modify the event? >> Everything works fine with this: >> >> ((eq type 'yank-on-region) >> (let ((pos (posn-point (event-end last-nonmenu-event)))) >> (when (and (>= pos (region-beginning)) >> (<= pos (region-end))) >> (delete-selection-helper 'yank) >> (setf (nth 5 (nth 1 last-nonmenu-event)) (region-beginning))))) >> >> But is this a good idea? > > It sounds kinda gross. Would it be possible to rewrite these commands > to that point is set before the deletion is done, or is that unfeasible? delete-selection-mode deletes the region in pre-command-hook before running the command. Maybe then these commands could have special handling of delete-selection-mode? They already contain special handling of select-active-regions: ;; Without this, confusing things happen upon e.g. inserting into ;; the middle of an active region. (when select-active-regions (let (select-active-regions) (deactivate-mark))) From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 26 08:08:48 2022 Received: (at 56530) by debbugs.gnu.org; 26 Jul 2022 12:08:48 +0000 Received: from localhost ([127.0.0.1]:52442 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oGJMm-0000Sl-9u for submit@debbugs.gnu.org; Tue, 26 Jul 2022 08:08:48 -0400 Received: from quimby.gnus.org ([95.216.78.240]:38538) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oGJMl-0000SY-6K for 56530@debbugs.gnu.org; Tue, 26 Jul 2022 08:08:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=O2GDD91Z0v4eQeVkdaOSmnJ9TIIpaItfK4r0a8WC86E=; b=u4//k8p+xUS5i0h5aZgvtfpny0 m3itZ3Zidulbk+Y63j6njnb51D0AV0tv4zQXB5eaV8q/8V6eEtk6s8LoXI7aHp6kvtWHwg0tkYhyT UTAWy48Vrr42natQsKCembhlrqw+dhuLan+bbZVXRQ077cEfDW77I6fe2Br9l/9ASRvQ=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oGJMc-0005vP-9k; Tue, 26 Jul 2022 14:08:40 +0200 From: Lars Ingebrigtsen To: Juri Linkov Subject: Re: bug#56530: 29.0.50; mouse-2 cut selected text when cua-mode is enabled In-Reply-To: <86sfmq78sc.fsf@mail.linkov.net> (Juri Linkov's message of "Sun, 24 Jul 2022 19:52:19 +0300") References: <3c83c124-95a9-9dc6-a7a6-6e357c7574e4@orange.fr> <877d4hmjdh.fsf@gmail.com> <87lesxtivx.fsf@gnus.org> <87wnchl1fm.fsf@gmail.com> <86mtdcg6qr.fsf@mail.linkov.net> <87edyna9wy.fsf@gnus.org> <867d4fa9p7.fsf@mail.linkov.net> <87h73j7epu.fsf@gnus.org> <86edym1a36.fsf@mail.linkov.net> <8735f1tkg2.fsf@gnus.org> <86r12j5yya.fsf@mail.linkov.net> <877d4589un.fsf@gnus.org> <86sfmq78sc.fsf@mail.linkov.net> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAElBMVEVTW2R6foE2P0ic pK4cIyn///9GHbZRAAAAAWJLR0QF+G/pxwAAAAlwSFlzAAAewgAAHsIBbtB1PgAAAAd0SU1FB+YH GgsrF3i7rpsAAAGgSURBVDjLhZQBkqQgDEU/cQ4A7QVSGQ7QjnuAXYr7n2l/Ajh211RNbEvN4/8E lEbK8AMKwLLBlCdQ8BbqWeZ3ICHl8sB2HPtxPktWKSkNQSrlmdN5nkcJ1xWFsR+HX+6mZqIvz3FE PFIRQDRB1WY0siReKrm3KtoklFYT4U8M6iPHScKUcPSopK3ZxPDBIrV3+nhuerVQBLCo3RYBS1DU OiWmNwm6A2uUhH0n8IOgmrcFB+HE4H0n6G5F0KMoc858ZJ2KBYLNhGi+AT8DUKLVgYb/iGXRo1+/ ad/ASR3gVRFkXK78BNU0vNp3kQXqeGwxkR8ASR/kHdhyewM6y7cJ3nqJO/PFBZbC31bzxY+ZcxHn OI13ZXMRf4wJ7DfQ6uvM+5qG3BSlZMZ6TGmLSOjINyD7vu0eJ6JbWRaP+LLZtKKP72tZYWyCmOAd dN+1Y3/4Ct6AJ+vVbrsAv5u6+vNNWVZXf2PzCU3AzhhfE/zjPTeecRelAH+WgptdppXnz49VnAAy /hYCXEtE/f7Ynuc5wPMCm0uAPQ/JBepnFEfJ/wEvdsKLrmplhQAAACV0RVh0ZGF0ZTpjcmVhdGUA MjAyMi0wNy0yNlQxMTo0MzoyMyswMDowMIflMIgAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjItMDct MjZUMTE6NDM6MjMrMDA6MDD2uIg0AAAAAElFTkSuQmCC X-Now-Playing: Neil Young's _After The Gold Rush_: "When You Dance You Can Really Love" Date: Tue, 26 Jul 2022 14:08:37 +0200 Message-ID: <87y1wg2i0q.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Juri Linkov writes: > delete-selection-mode deletes the region in pre-command-hook > before running the command. > > Maybe then these commands could have special handling of delete-selection-mode? > They already contain [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 56530 Cc: David Ponce , 56530@debbugs.gnu.org, Visuwesh X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -3.3 (---) Juri Linkov writes: > delete-selection-mode deletes the region in pre-command-hook > before running the command. > > Maybe then these commands could have special handling of delete-selection-mode? > They already contain special handling of select-active-regions: > > ;; Without this, confusing things happen upon e.g. inserting into > ;; the middle of an active region. > (when select-active-regions > (let (select-active-regions) > (deactivate-mark))) Yes, I think that sounds like the way to go. From unknown Thu Aug 14 18:38:29 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 24 Aug 2022 11:24:03 +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