From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Federico Tedin Newsgroups: gmane.emacs.bugs Subject: bug#31240: 26.1; mouse-save-then-kill does not kill rectangles Date: Sat, 22 Sep 2018 17:05:19 -0300 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="00000000000042817005767b47fd" X-Trace: blaine.gmane.org 1537664294 3001 195.159.176.226 (23 Sep 2018 00:58:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 23 Sep 2018 00:58:14 +0000 (UTC) Cc: 31240@debbugs.gnu.org To: charles@aurox.ch Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Sep 23 02:58:09 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 1g3sir-0000c1-Re for geb-bug-gnu-emacs@m.gmane.org; Sun, 23 Sep 2018 02:58:06 +0200 Original-Received: from localhost ([::1]:37631 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g3sky-0006Zb-G9 for geb-bug-gnu-emacs@m.gmane.org; Sat, 22 Sep 2018 21:00:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35941) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g3sYp-0000iN-1P for bug-gnu-emacs@gnu.org; Sat, 22 Sep 2018 20:47:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g3rhL-0006Ny-47 for bug-gnu-emacs@gnu.org; Sat, 22 Sep 2018 19:52:30 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45793) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g3rhK-0006NU-SI for bug-gnu-emacs@gnu.org; Sat, 22 Sep 2018 19:52:26 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1g3oAD-0003Ff-VM for bug-gnu-emacs@gnu.org; Sat, 22 Sep 2018 16:06:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Federico Tedin Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 22 Sep 2018 20:06:01 +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.153764674012467 (code B ref 31240); Sat, 22 Sep 2018 20:06:01 +0000 Original-Received: (at 31240) by debbugs.gnu.org; 22 Sep 2018 20:05:40 +0000 Original-Received: from localhost ([127.0.0.1]:49916 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g3o9s-0003F1-58 for submit@debbugs.gnu.org; Sat, 22 Sep 2018 16:05:40 -0400 Original-Received: from mail-io1-f46.google.com ([209.85.166.46]:39340) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g3o9p-0003Eo-Q7 for 31240@debbugs.gnu.org; Sat, 22 Sep 2018 16:05:38 -0400 Original-Received: by mail-io1-f46.google.com with SMTP id l7-v6so14940958iok.6 for <31240@debbugs.gnu.org>; Sat, 22 Sep 2018 13:05:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=dqoOR/2sOrkNafQIhuJGUZESbi39OfumppF8vShjuDE=; b=Pad+3ZxytH0nv8mLpip+xln7E7Y4eXYztEdcnzDE1QtLnvhPgb3HdYsKG/0MvEdxFW l/XaOI/V9fnOui7Lkh+2bPjzwONuO686dIXsh7YCsPOOzQZKyrxh3I7phLwc9/7BsIek PDeklwI9tQAesxbap58F5YT5A9e+ubrPSRvnNrmJQzL5R/SLQbW23JLSWekz7dpw3yEa i7OdFEO/V9thli/AOQwG4u0CLXFFMXOyVEo+SaratRGksuNSp5hV5WugJ13V8I2JwALJ 6HiNE2G5tgn9/ucfJNepEuqWbkPikIdquAZS3rhtYdk2rotXx+IBO7SUeXoWFg4KK7vz b8ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=dqoOR/2sOrkNafQIhuJGUZESbi39OfumppF8vShjuDE=; b=I7CGHXcVypUjPBYOxCjqfB47knn98pgFcvXqra6PkwHuNAUBV5pWlelyVo7afOR2iS zmJ1a1VcllzfA19r8ShljdKMLLc4YRYLvXl/DDz2CcDI/EAXZ+b5wmIk4iesPmqpxcgu NC01hhf6o6KsMo9u4qJMqd+KC0aENp+DyuI2vK68M65yCwgNkSv60GtvluRNp01NBgks kRQQUl1R6Zcy+i7bbHKkKW6XBMvWhLxJ8egwfdG5IUOZEQhI7z5I75/5c4rNqLGbSJvB QdTroK8qiHD7WZuBstim+7S5uBZrxbqkyf9VJSleaTY5r6w5f4W/HmCKIJGc4C1mzjV0 hsmQ== X-Gm-Message-State: ABuFfogiANuRkZ0nhVLftbdjnqDAKk5E2/qzv9DX8yScFs41pXrQVnqG YGWYyj3PhHlMF2gaE82pc3F+f+lvl+5gFF1QZyDE4izj X-Google-Smtp-Source: ACcGV60VdFLSSl/xPqq8DPxOUTSzEzAd1tefoN4WHazb6XY1P7j0OESniJFU3tMy/l+STIg/BqDR6Rs6Tbunspx2WzE= X-Received: by 2002:a6b:9ad4:: with SMTP id c203-v6mr2895113ioe.63.1537646732099; Sat, 22 Sep 2018 13:05:32 -0700 (PDT) In-Reply-To: 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:150558 Archived-At: --00000000000042817005767b47fd Content-Type: text/plain; charset="UTF-8" After reading more of the code in mouse.el, I found that mouse-save-then-kill is the only function that allows using the mouse to set/resize rectangular regions. I'm attaching a patch that fixes all three use cases for this function: setting the region initially, resizing the region, and killing the region. I've also made sure it works correctly when mouse-drag-copy-region is set to t. Hope it helps. --00000000000042817005767b47fd Content-Type: text/x-patch; charset="US-ASCII"; name="mouse.patch" Content-Disposition: attachment; filename="mouse.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_jmdv4zo30 RnJvbSAzMTc1OThhNTc5ZDk1Y2EzNGRlZjQ0MGQyYjc3ODlhYmRjZDFhZDQ3IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBGZWRlcmljbyBUZWRpbiA8ZmVkZXJpY290ZWRpbkBnbWFpbC5j b20+CkRhdGU6IFNhdCwgMjIgU2VwIDIwMTggMTY6NTE6NTggLTAzMDAKU3ViamVjdDogW1BBVENI IDEvMV0gTWFrZSBtb3VzZS1zYXZlLXRoZW4ta2lsbCB3b3JrIHdpdGggUmVjdGFuZ2xlIE1hcmsg bW9kZQoKKiBsaXNwL21vdXNlLmVsIChtb3VzZS1zYXZlLXRoZW4ta2lsbCk6IE1ha2UgbW91c2Ut c2F2ZS10aGVuLWtpbGwgd29yawogIHdpdGggcmVjdGFuZ3VsYXIgcmVnaW9ucywgaW5jbHVkaW5n IHdoZW4gbW91c2UtZHJhZy1jb3B5LXJlZ2lvbiBpcwogIHNldCB0byB0LiAoQnVnIz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