From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#31240: 26.1; mouse-save-then-kill does not kill rectangles Date: Sat, 06 Oct 2018 19:08:51 +0200 Message-ID: <5BB8EC23.1040303@gmx.at> References: <5BADDC88.7010206@gmx.at> <5BB10CCE.4020503@gmx.at> <5BB1DBF0.5060706@gmx.at> <5BB320CA.5090606@gmx.at> <5BB36FF4.80403@gmx.at> <5BB70B54.5000103@gmx.at> <864le0agjk.fsf@misasa.okayama-u.ac.jp> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1538846397 4074 195.159.176.226 (6 Oct 2018 17:19:57 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 6 Oct 2018 17:19:57 +0000 (UTC) Cc: 31240@debbugs.gnu.org, tkk@misasa.okayama-u.ac.jp, charles@aurox.ch To: Federico Tedin , homeros.misasa@gmail.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Oct 06 19:19:53 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g8qF6-0000vO-1K for geb-bug-gnu-emacs@m.gmane.org; Sat, 06 Oct 2018 19:19:52 +0200 Original-Received: from localhost ([::1]:39918 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g8qHC-0003cC-I2 for geb-bug-gnu-emacs@m.gmane.org; Sat, 06 Oct 2018 13:22:02 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47364) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g8qGu-0003YJ-LJ for bug-gnu-emacs@gnu.org; Sat, 06 Oct 2018 13:21:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g8q5a-0000FU-Ow for bug-gnu-emacs@gnu.org; Sat, 06 Oct 2018 13:10:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:34553) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g8q5a-0000F6-KU for bug-gnu-emacs@gnu.org; Sat, 06 Oct 2018 13:10:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1g8q5a-0008Ve-C8 for bug-gnu-emacs@gnu.org; Sat, 06 Oct 2018 13:10:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 06 Oct 2018 17:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 31240 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 31240-submit@debbugs.gnu.org id=B31240.153884575732649 (code B ref 31240); Sat, 06 Oct 2018 17:10:02 +0000 Original-Received: (at 31240) by debbugs.gnu.org; 6 Oct 2018 17:09:17 +0000 Original-Received: from localhost ([127.0.0.1]:38811 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g8q4q-0008UX-PG for submit@debbugs.gnu.org; Sat, 06 Oct 2018 13:09:16 -0400 Original-Received: from mout.gmx.net ([212.227.15.19]:40735) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g8q4p-0008UJ-2L for 31240@debbugs.gnu.org; Sat, 06 Oct 2018 13:09:15 -0400 Original-Received: from [192.168.1.101] ([46.125.250.121]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0Mgt3g-1gLzF724Ho-00M3U2; Sat, 06 Oct 2018 19:08:53 +0200 Original-Received: from [192.168.1.101] ([46.125.250.121]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0Mgt3g-1gLzF724Ho-00M3U2; Sat, 06 Oct 2018 19:08:53 +0200 In-Reply-To: X-Provags-ID: V03:K1:nNBW692A9PFGsTM22aII5hFeopQzTGQds0IFhdPeZf7Nu76lA1B o2bhliVHAY4XvZAxuXlqiTZf9Ge5wBiMorgO/tPlguzAJ/R0dEFCv1V0xOzfbnPDf/4cOee wmtWoIX5/9P8K8zz4geCFi6gNtQXgTOOd4bEKd0mouB0UNRc+NVlisceqiQ3A3ku04gpt6x kiZPbcgnvMG6GWAsm4FNg== X-UI-Out-Filterresults: notjunk:1;V01:K0:yhfGjmvmVTM=:zAo6u+zxjDm2JkcQc6FrYC oRB1XJmKImk9773FPbH+dBgtdsjtyOjQXgB8Si3bR6nJ0sesyWOednz9pXk+lPQo0X3Ky2YU/ aMmWhirNJIFUQUmrx4n2/l4e7o2/8j76WeZHW4uiR7D7eDT/J8kKqSB8OXhjotlgU/+P/2EFe glgpa+asdS7lAhdx0GF6rFW9nbq2veeUGaUoWrkAGAnmPE6uk63If5UFULEHUT91C/MZ1LJ74 B6xcikSf5ZL/QbWq0oxHmsruVovmlHgHNoHSFdsvQQNvqJWokJtYAqtAsNQ5rymPAjZDJ0wWN SFPXTZ/uORayZYHmMWaRCjKU9LI0ZAzMSLd2WF+nlQhb2u1Tl7YGaLQKfPRnoQqdOSq/7lI+1 yRXZIExmcfnlLNL5+raa/xwb7U3PPZqHARz9nnkZG+CfTe7vInUG+TInSHhdGTEZV7k2ohvk6 6MsevvTX9z+BIet50pOB9ZHhZpuxc+Q4/C4ZvEPvxi5aklgLzIHb8XwdLKnOuCr1UwFmoeJwf I3yUWclhLPb3NC6T/jYva7c7P7ljHIZO4S7F0eKib0pxVByiYJ18E6wAnbyBHEZQgztmmPUeI ff+SeOOlc6j50tm+lxxTDZHDRjg8dZkyROYNyXQ9CpaUeqWCvtpHzzYIAWWo84OYBThta5dIj JJ5bKsQdllsmBYu8yQxZFn1Q/APeoYTT14sUav4zPx+Za7IVySjzxtHkKOGz3IJ+SP0M/AyXK x2v3QouGB7UPTwK/LKO5x4IcKWs6r3o1Xufqk/G+IQZg4qiuaoO/FYrBOKpho80iwTer9wyD X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:150964 Archived-At: > The example Homeros tried to run won't work, because the newly intersected > rectangle would intersect the original rectangle. This behaviour is > intentional, as it > is similar to mouse-drag-and-drop-region's behaviour with non-rectangle regions. > > However, I think an exception could be made for rectangle operations move the > rectangle horizontally to the left, as Tak said. When the rectangle is > dragged to the left, > there's no way its content could be accidentally added to the overlays > tracking the original > rectangle, so it'll always work correctly (even if > rectangle-intersect-p returns t). FWIW I see no problems with the following naive amendment (let ((size (cons region-width region-height))) (and (rectangle-intersect-p (rectangle-position-as-coordinates start) size (rectangle-position-as-coordinates point-to-paste) size) (not (= (line-number-at-pos start) (line-number-at-pos point-to-paste))))) which also allows shifting the rectangle strictly to the left or right. IIUC it's the deletion of the original rectangle after the copy was inserted on a different line that's causing havoc with intersections. But I have not tested all possible variants so please correct me if I'm wrong. martin