From unknown Thu Aug 21 12:10:08 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#37700 <37700@debbugs.gnu.org> To: bug#37700 <37700@debbugs.gnu.org> Subject: Status: 27.0.50; undo mouse-drag-and-drop-region ineffective Reply-To: bug#37700 <37700@debbugs.gnu.org> Date: Thu, 21 Aug 2025 19:10:08 +0000 retitle 37700 27.0.50; undo mouse-drag-and-drop-region ineffective reassign 37700 emacs submitter 37700 Mattias Engdeg=C3=A5rd severity 37700 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 11 07:51:50 2019 Received: (at submit) by debbugs.gnu.org; 11 Oct 2019 11:51:50 +0000 Received: from localhost ([127.0.0.1]:58132 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iItSY-0004L7-C8 for submit@debbugs.gnu.org; Fri, 11 Oct 2019 07:51:50 -0400 Received: from lists.gnu.org ([209.51.188.17]:54830) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iItSW-0004Kv-Rx for submit@debbugs.gnu.org; Fri, 11 Oct 2019 07:51:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47895) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iItSV-0007Vy-Hx for bug-gnu-emacs@gnu.org; Fri, 11 Oct 2019 07:51:48 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_50,RCVD_IN_DNSWL_LOW, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iItSU-0007YU-B9 for bug-gnu-emacs@gnu.org; Fri, 11 Oct 2019 07:51:47 -0400 Received: from mail156c50.megamailservers.eu ([91.136.10.166]:48768 helo=mail51c50.megamailservers.eu) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iItST-0007WU-Q5 for bug-gnu-emacs@gnu.org; Fri, 11 Oct 2019 07:51:46 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1570794701; bh=CKCZf0v47XWexiiFIieqXevJxClRJcKDySeFhpVPasc=; h=From:Subject:Date:To:From; b=LH8kckrQV34WLCi1FVx22jONwORvNpgAUpZbffLDc+rFCgcZqRQR4ma1CZhBpVyIJ H5pF2z6jXP1KEVfXZKzqmN4Z/wXDjGsv6fn1NKul49FH1rh+mNDpL5jf7sD3yOyxpc V8W4HUk2qucJDQzRX6rUsUCnKzAsk8BxUyuIPhBU= Feedback-ID: mattiase@acm.or Received: from [192.168.1.65] (c-e636e253.032-75-73746f71.bbcust.telenor.se [83.226.54.230]) (authenticated bits=0) by mail51c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id x9BBpcQB007958 for ; Fri, 11 Oct 2019 11:51:41 +0000 From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: 27.0.50; undo mouse-drag-and-drop-region ineffective Message-Id: <3311689D-B1DF-4BAC-86BA-E3D2C6D2ECF1@acm.org> Date: Fri, 11 Oct 2019 13:51:38 +0200 To: bug-gnu-emacs@gnu.org X-Mailer: Apple Mail (2.3445.104.11) X-CTCH-RefID: str=0001.0A0B0207.5DA06CCD.0048, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=LO0Yv6e9 c=1 sm=1 tr=0 a=M+GU/qJco4WXjv8D6jB2IA==:117 a=M+GU/qJco4WXjv8D6jB2IA==:17 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=kzaNXlP4viVv_aY9vLAA:9 a=CjuIK1q_8ugA:10 a=pHzHmUro8NiASowvMSCR:22 a=Ew2E2A-JSTLzCXPT_086:22 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] [fuzzy] X-Received-From: 91.136.10.166 X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit 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.3 (--) Undoing mouse-drag-and-drop-region doesn't work: 1. (setq mouse-drag-and-drop-region t) 2. mark a region 3. use the mouse to drag the region elsewhere 4. Undo (twice) Result: the dragged text disappears from its destination, but does not = reappear where it was dragged from. Instead, we get the "No further undo information for region" error. The action can be undone by moving point and backing up a different undo = branch a few steps, but that is hardly ideal. From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 11 08:19:22 2019 Received: (at 37700) by debbugs.gnu.org; 11 Oct 2019 12:19:22 +0000 Received: from localhost ([127.0.0.1]:58164 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iIttC-0005Kc-HD for submit@debbugs.gnu.org; Fri, 11 Oct 2019 08:19:22 -0400 Received: from mout.gmx.net ([212.227.15.19]:56889) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iIttA-0005K9-21 for 37700@debbugs.gnu.org; Fri, 11 Oct 2019 08:19:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1570796347; bh=XPFoWcT53pjsjtsz4CPjzKdVGsZFkX40g9qrGmnuYHk=; h=X-UI-Sender-Class:Subject:To:References:From:Date:In-Reply-To; b=QM6G3ezn0lLWCO8eTlHkELNYzZnDmAZonYPRMU9ZDeX0wDmrMPN+b5LVMMSBw2MI5 3gEnr1hKqbzpYUtAdBYsPMJ+q57yBzZsFOZqb9hiS0EX1+lJ3itWNubWFOXBm40RGn GHq6Ua4T2o9vLhKRPyYA3aUrb/V45x0e6ci2hZB0= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.1.100] ([46.125.249.26]) by mail.gmx.com (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MSKuA-1iTnzH1z68-00SeVh; Fri, 11 Oct 2019 14:19:07 +0200 Subject: Re: bug#37700: 27.0.50; undo mouse-drag-and-drop-region ineffective To: =?UTF-8?Q?Mattias_Engdeg=c3=a5rd?= , 37700@debbugs.gnu.org References: <3311689D-B1DF-4BAC-86BA-E3D2C6D2ECF1@acm.org> From: martin rudalics Message-ID: Date: Fri, 11 Oct 2019 14:19:07 +0200 MIME-Version: 1.0 In-Reply-To: <3311689D-B1DF-4BAC-86BA-E3D2C6D2ECF1@acm.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: de-AT Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:I2sjZqyHkAaUGPo74ca7Flrd17Oo+96/kZHX2MSi8v4dm12Fnng tBCWM1N7ZsfO7ovoMhcphKGVcRG8TKj5SDXQXV24NWHURnQgTcBsfvDLroXxaskyYbgEu5a 5Qn6ww6Hmd6jTU2z15YzqFGBaTyLeLQketC5S6lVd7hTVwubHIlJUSlOwyIJDsQd6rGesBG y6cNnOMSrQ9On3yA9V4Sg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:bMO41RCQ+ag=:8yA4DC7xUlySrmvDS91trs 8kVAy0e/ZvLnjz9ASBcq8d+dDxI2Hb9SGgiwLxBApF0OzxKOOUxXLmCCxkSnynaRZfLvDqqwh wAjoV+xcbFrk4c0CrixmhqTMwE8v76vawvqG8JXndF/aym9rJgKsk8SsZkitlJ2NaiuVSLxiY ohIikPf0U4Pt94cprjZfq1/i2i0Q5f/jqO6NCXwzFXLuXU87Rlf/uOWIx1RVc0Zp42PVe+4OM +rHuMmW52MOoDUxCaoYrSNTygmNbGMwsoKwFbkbdTGNou6Cd9so/EQMzsoObvDR2LebNw1TBd FEI1wZFoqMN2clT6K4XZ9JZQgMpk4/sv6I+bMLP1GASyf56/ETABfdta0P5SILVFDqi5OqFWS dc5dnJUBUzux+OHQJVw2q24Si7InU1QeE8jh6JttIwqrPI85u4aZPoi5MkPJzA3OKFtvsIJ+z +m3TIXdbeTGgwxZu323LrCKFZeGnHns3BLi/61YWFlkij5RSDYqwse2253oJnnK5aqieLvGWQ QpzV6KV2dcEbonXYQ9YwWfpONTxcZdCl0o1dE6YR+KVAz4Gu5v8T52WrE/EZlQzXELfyRRmZE ssROqRXq9Ozcj1OLH4FWZCMflNHjH2SK2qwVX1Y+R/Kx+c4RWtvb+UQTpy/5hihFkHQ9pD3uW SsIg9p/cqcZwhbkp/GSgrbsimTxTYexqrJxuYPoG7FPs8cfXOgmGnsOzN/6s7fHL8k+h56V3X 4fqgJf/MDPzXx0NwTR/pMtYbb4ZnRhRoOo+TVkCV6O6CCUF6HLVOJGvRq30/liSJMLckgwhiM UXA/dRbXqsUeKdEXNQv/YRCj8PYAgJ0kkvJ1WM6hjecBa55vCsZ1C4OyOLbj31M0/jMpwc8xh m/Z6AzkZd/VPB9Yy5fRFwZGplJE3/lpjkBozcSsGm2uCutBOx3l4gZ6prf+1t7HVSDPwO/f55 JEfhPExpb/63013AYYcfwagNfxR+EeABt2znXKJeViXNLqnMHRGMzXueXpBFEqFkSjw9D1IPb 4sBRNsNJKtasqHXVmh6K7F+6pwWpyd0n2C2CQ7nFJ4Zbrv3mLvwSTK+VyWClTRI/9nhoiL4rB MFjeyL8TZizxQgyGg0muF5Cn1YPCOndR1rb0R0e98yvgUd7nF0VKczcCvSr5j+FReeENS8th2 Srzml8YJMPXwPGQX4DVA23+ybN0KGmwsylbbusQfqwxEA0F/NtSrrZo5MpSWVLGZBDNVDGLMa sTlEtHcmvq9nkjAmgGDig6H1H9jcqSEjB+cdxwMQ5kb9ohH/V4vljSu/cgtI= X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 37700 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 (-) > Undoing mouse-drag-and-drop-region doesn't work: > > 1. (setq mouse-drag-and-drop-region t) > 2. mark a region > 3. use the mouse to drag the region elsewhere > 4. Undo (twice) > > Result: the dragged text disappears from its destination, but does not reappear where it was dragged from. > Instead, we get the "No further undo information for region" error. > > The action can be undone by moving point and backing up a different undo branch a few steps, but that is hardly ideal. I suppose this the effect of undo working on the active region only. A very nasty invention. Try deactivating the region right after 3. martin From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 11 08:26:43 2019 Received: (at 37700) by debbugs.gnu.org; 11 Oct 2019 12:26:43 +0000 Received: from localhost ([127.0.0.1]:58176 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iIu0J-0005bX-L8 for submit@debbugs.gnu.org; Fri, 11 Oct 2019 08:26:43 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44704) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iIu0I-0005bH-Nq for 37700@debbugs.gnu.org; Fri, 11 Oct 2019 08:26:43 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:42875) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iIu0C-0005Ih-D9; Fri, 11 Oct 2019 08:26:36 -0400 Received: from [176.228.60.248] (port=3339 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iIu0B-0000es-6l; Fri, 11 Oct 2019 08:26:36 -0400 Date: Fri, 11 Oct 2019 15:26:21 +0300 Message-Id: <83sgnzpixe.fsf@gnu.org> From: Eli Zaretskii To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= In-reply-to: <3311689D-B1DF-4BAC-86BA-E3D2C6D2ECF1@acm.org> (message from Mattias =?utf-8?Q?Engdeg=C3=A5rd?= on Fri, 11 Oct 2019 13:51:38 +0200) Subject: Re: bug#37700: 27.0.50; undo mouse-drag-and-drop-region ineffective References: <3311689D-B1DF-4BAC-86BA-E3D2C6D2ECF1@acm.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 37700 Cc: 37700@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 (---) > From: Mattias Engdegård > Date: Fri, 11 Oct 2019 13:51:38 +0200 > > Undoing mouse-drag-and-drop-region doesn't work: > > 1. (setq mouse-drag-and-drop-region t) > 2. mark a region > 3. use the mouse to drag the region elsewhere > 4. Undo (twice) > > Result: the dragged text disappears from its destination, but does not reappear where it was dragged from. > Instead, we get the "No further undo information for region" error. Why is that a problem? Emacs cannot possibly "un-dnd" text, it can only remove the copy, which AFAIU it does. From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 11 08:51:11 2019 Received: (at 37700) by debbugs.gnu.org; 11 Oct 2019 12:51:11 +0000 Received: from localhost ([127.0.0.1]:58184 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iIuNy-0008U9-W4 for submit@debbugs.gnu.org; Fri, 11 Oct 2019 08:51:11 -0400 Received: from mail239c50.megamailservers.eu ([91.136.10.249]:45822 helo=mail56c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iIuNu-0008Ts-92 for 37700@debbugs.gnu.org; Fri, 11 Oct 2019 08:51:09 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1570798263; bh=KXkcclvRUINw6ijoFISz0CoTvhMNLzTs1bKk2qP/GpQ=; h=From:Subject:Date:In-Reply-To:Cc:To:References:From; b=JKC+rOqfHp8C6ErP7jadQEdm4dQ9n9SU4aIXbYdZVy20Fjrkf0CudZprNZc3lOc2u Ktg38SKe5/5xTfItTrUzMhxBK97bFqdH2CXfI2hK1njYkY9P0ZWyYXoXaWXAr2IWXB kO9Tn7LIvztPsLC1SuE9r3aZKujFX0zQ7Rly+HNs= Feedback-ID: mattiase@acm.or Received: from [192.168.1.65] (c-e636e253.032-75-73746f71.bbcust.telenor.se [83.226.54.230]) (authenticated bits=0) by mail56c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id x9BCp2U4005064; Fri, 11 Oct 2019 12:51:03 +0000 From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= Message-Id: <94D2DE0C-8BD0-4CCF-B77D-5606A1D227DD@acm.org> Content-Type: multipart/mixed; boundary="Apple-Mail=_EFDC49E4-4BDC-4622-AD19-45FDCE0082AE" Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: bug#37700: 27.0.50; undo mouse-drag-and-drop-region ineffective Date: Fri, 11 Oct 2019 14:51:01 +0200 In-Reply-To: To: martin rudalics References: <3311689D-B1DF-4BAC-86BA-E3D2C6D2ECF1@acm.org> X-Mailer: Apple Mail (2.3445.104.11) X-CTCH-RefID: str=0001.0A0B0215.5DA07AB7.0066, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=Hc1qsRM8 c=1 sm=1 tr=0 a=M+GU/qJco4WXjv8D6jB2IA==:117 a=M+GU/qJco4WXjv8D6jB2IA==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=M51BFTxLslgA:10 a=NgM2P65M8qjJv_g3LXgA:9 a=CjuIK1q_8ugA:10 a=-kOMBHUYdHq0OFHj1CgA:9 a=B2y7HmGcmWMA:10 a=pHzHmUro8NiASowvMSCR:22 a=xoEH_sTeL_Rfw54TyV31:22 X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 37700 Cc: 37700@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: -0.7 (/) --Apple-Mail=_EFDC49E4-4BDC-4622-AD19-45FDCE0082AE Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii 11 okt. 2019 kl. 14.19 skrev martin rudalics : >=20 > I suppose this the effect of undo working on the active region only. > A very nasty invention. Try deactivating the region right after 3. Right, thank you. I wonder if anything would break if that were changed. Proof-of-concept patch attached. (Manual and NEWS changes not included.) = It does solve this particular problem. Do you know of any drawbacks for someone whose editing habits are not = dependent on the region confinement of undo? --Apple-Mail=_EFDC49E4-4BDC-4622-AD19-45FDCE0082AE Content-Disposition: attachment; filename=0001-Make-undo-confinement-to-active-region-user-settable.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-Make-undo-confinement-to-active-region-user-settable.patch" Content-Transfer-Encoding: quoted-printable =46rom=20e2e3a60fcc42eea4703c6f7b2877eae7188a73bc=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20=3D?UTF-8?q?Mattias=3D20Engdeg=3DC3=3DA5rd?=3D=20= =0ADate:=20Fri,=2011=20Oct=202019=2014:42:48=20+0200=0A= Subject:=20[PATCH]=20Make=20undo=20confinement=20to=20active=20region=20= user-settable=0A=20(bug#37700)=0A=0A*=20lisp/simple.el=20= (undo-confined-to-active-region,=20undo):=0AAdd=20defcustom=20= `undo-confined-to-active-region'=20that=20controls=20whether=0Athe=20= effects=20of=20`undo'=20are=20confined=20to=20the=20region=20when=20it=20= is=20active.=0AThe=20default=20value=20is=20t.=0A---=0A=20lisp/simple.el=20= |=2015=20+++++++++++++--=0A=201=20file=20changed,=2013=20insertions(+),=20= 2=20deletions(-)=0A=0Adiff=20--git=20a/lisp/simple.el=20b/lisp/simple.el=0A= index=20597278ae2b..10dec26200=20100644=0A---=20a/lisp/simple.el=0A+++=20= b/lisp/simple.el=0A@@=20-2464,6=20+2464,14=20@@=20= minibuffer-error-function=0A=20;Put=20this=20on=20C-x=20u,=20so=20we=20= can=20force=20that=20rather=20than=20C-_=20into=20startup=20msg=0A=20= (define-obsolete-function-alias=20'advertised-undo=20'undo=20"23.2")=0A=20= =0A+(defcustom=20undo-confined-to-active-region=20t=0A+=20=20"If=20= non-nil,=20the=20effects=20of=20`undo'=20without=20argument=20are=20= confined=20to=0A+the=20active=20region=20when=20there=20is=20one.=20=20= If=20nil,=20the=20effects=20of=20`undo'=0A+are=20independent=20of=20the=20= region."=0A+=20=20:type=20'boolean=0A+=20=20:group=20'undo=0A+=20=20= :version=20"27.1")=0A+=0A=20(defconst=20undo-equiv-table=20= (make-hash-table=20:test=20'eq=20:weakness=20t)=0A=20=20=20"Table=20= mapping=20redo=20records=20to=20the=20corresponding=20undo=20one.=0A=20A=20= redo=20record=20for=20undo-in-region=20maps=20to=20t.=0A@@=20-2485,7=20= +2493,9=20@@=20undo=0A=20A=20numeric=20ARG=20serves=20as=20a=20repeat=20= count.=0A=20=0A=20In=20Transient=20Mark=20mode=20when=20the=20mark=20is=20= active,=20only=20undo=20changes=20within=0A-the=20current=20region.=20=20= Similarly,=20when=20not=20in=20Transient=20Mark=20mode,=20just=20= \\[universal-argument]=0A+the=20current=20region;=20this=20behaviour=20= can=20be=20changed=20by=20customizing=0A+the=20variable=20= `undo-confined-to-active-region'.=0A+Similarly,=20when=20not=20in=20= Transient=20Mark=20mode,=20just=20\\[universal-argument]=0A=20as=20an=20= argument=20limits=20undo=20to=20changes=20within=20the=20current=20= region."=0A=20=20=20(interactive=20"*P")=0A=20=20=20;;=20Make=20= last-command=20indicate=20for=20the=20next=20command=20that=20this=20was=20= an=20undo.=0A@@=20-2517,7=20+2527,8=20@@=20undo=0A=20=09=09=20=20=20=20=20= =20=20;;=20it=20shows=20nothing=20else=20happened=20in=20between.=0A=20=09= =09=20=20=20=20=20=20=20(gethash=20list=20undo-equiv-table))))=0A=20=20=20= =20=20=20=20(setq=20undo-in-region=0A-=09=20=20=20=20(or=20= (region-active-p)=20(and=20arg=20(not=20(numberp=20arg)))))=0A+=09=20=20=20= =20(or=20(and=20(region-active-p)=20undo-confined-to-active-region)=0A+=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(and=20arg=20(not=20= (numberp=20arg)))))=0A=20=20=20=20=20=20=20(if=20undo-in-region=0A=20=09=20= =20(undo-start=20(region-beginning)=20(region-end))=0A=20=09= (undo-start))=0A--=20=0A2.21.0=20(Apple=20Git-122)=0A=0A= --Apple-Mail=_EFDC49E4-4BDC-4622-AD19-45FDCE0082AE-- From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 11 08:53:32 2019 Received: (at 37700) by debbugs.gnu.org; 11 Oct 2019 12:53:32 +0000 Received: from localhost ([127.0.0.1]:58195 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iIuQG-00007i-5C for submit@debbugs.gnu.org; Fri, 11 Oct 2019 08:53:32 -0400 Received: from mail226c50.megamailservers.eu ([91.136.10.236]:49376 helo=mail36c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iIuQD-00007V-H3 for 37700@debbugs.gnu.org; Fri, 11 Oct 2019 08:53:30 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1570798407; bh=pvSRmUKQ+BHW/b+dw1odY9FJHjRufD5JmvvT1emETL0=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=Jxpnghk1RXxvsDUgQYoSRqGDiLECg25qncBwS0yAWNVBlFUVU6BGnyNo6U4ELCIRE aJCIQ4JwXvyBIwouIq/x+dpySPxfbAjlA+3BuRkJDMiFf7F6An2LwE9+Sxv+Q3cMVT lCIpK/seseo5+LM6VdQCopkfkd+zAlznU8RqJjk0= Feedback-ID: mattiase@acm.or Received: from [192.168.1.65] (c-e636e253.032-75-73746f71.bbcust.telenor.se [83.226.54.230]) (authenticated bits=0) by mail36c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id x9BCrPdF006363; Fri, 11 Oct 2019 12:53:27 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: bug#37700: 27.0.50; undo mouse-drag-and-drop-region ineffective From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: <83sgnzpixe.fsf@gnu.org> Date: Fri, 11 Oct 2019 14:53:25 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <29639AC2-1D48-43A1-8B86-7ADE8FDBEE62@acm.org> References: <3311689D-B1DF-4BAC-86BA-E3D2C6D2ECF1@acm.org> <83sgnzpixe.fsf@gnu.org> To: Eli Zaretskii X-Mailer: Apple Mail (2.3445.104.11) X-CTCH-RefID: str=0001.0A0B020A.5DA07B47.0046, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=bd8Vr9HB c=1 sm=1 tr=0 a=M+GU/qJco4WXjv8D6jB2IA==:117 a=M+GU/qJco4WXjv8D6jB2IA==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=mDV3o1hIAAAA:8 a=da07dZQvBY3WVGXeJFMA:9 a=CjuIK1q_8ugA:10 a=_FVE-zBwftR9WsbkzFJk:22 a=pHzHmUro8NiASowvMSCR:22 a=xoEH_sTeL_Rfw54TyV31:22 X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 37700 Cc: 37700@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: -0.7 (/) 11 okt. 2019 kl. 14.26 skrev Eli Zaretskii : >=20 > Why is that a problem? Emacs cannot possibly "un-dnd" text, it can > only remove the copy, which AFAIU it does. It does not undo the deletion of the text at its original position, = which is what I believe a user would have expected (at least this user). From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 11 10:44:17 2019 Received: (at 37700) by debbugs.gnu.org; 11 Oct 2019 14:44:17 +0000 Received: from localhost ([127.0.0.1]:60138 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iIw9R-0004b6-0A for submit@debbugs.gnu.org; Fri, 11 Oct 2019 10:44:17 -0400 Received: from eggs.gnu.org ([209.51.188.92]:39541) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iIw9O-0004am-Iq for 37700@debbugs.gnu.org; Fri, 11 Oct 2019 10:44:15 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:44645) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iIw9I-0004C3-SY; Fri, 11 Oct 2019 10:44:08 -0400 Received: from [176.228.60.248] (port=3866 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iIw9H-0001g7-Hh; Fri, 11 Oct 2019 10:44:08 -0400 Date: Fri, 11 Oct 2019 17:43:54 +0300 Message-Id: <83imovpck5.fsf@gnu.org> From: Eli Zaretskii To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= In-reply-to: <94D2DE0C-8BD0-4CCF-B77D-5606A1D227DD@acm.org> (message from Mattias =?utf-8?Q?Engdeg=C3=A5rd?= on Fri, 11 Oct 2019 14:51:01 +0200) Subject: Re: bug#37700: 27.0.50; undo mouse-drag-and-drop-region ineffective References: <3311689D-B1DF-4BAC-86BA-E3D2C6D2ECF1@acm.org> <94D2DE0C-8BD0-4CCF-B77D-5606A1D227DD@acm.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 37700 Cc: rudalics@gmx.at, 37700@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 (---) > From: Mattias Engdegård > Date: Fri, 11 Oct 2019 14:51:01 +0200 > Cc: 37700@debbugs.gnu.org > > 11 okt. 2019 kl. 14.19 skrev martin rudalics : > > > > I suppose this the effect of undo working on the active region only. > > A very nasty invention. Try deactivating the region right after 3. > > Right, thank you. I wonder if anything would break if that were changed. > > Proof-of-concept patch attached. (Manual and NEWS changes not included.) It does solve this particular problem. Given that the region can be easily deactivated, I'm not sure I see the sense in introducing options that selectively disable region-sensitive behavior of specific commands. From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 11 13:18:59 2019 Received: (at 37700) by debbugs.gnu.org; 11 Oct 2019 17:18:59 +0000 Received: from localhost ([127.0.0.1]:60266 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iIyZ9-0003p4-85 for submit@debbugs.gnu.org; Fri, 11 Oct 2019 13:18:59 -0400 Received: from mail82c50.megamailservers.eu ([91.136.10.92]:32810 helo=mail18c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iIyZ5-0003oq-U5 for 37700@debbugs.gnu.org; Fri, 11 Oct 2019 13:18:57 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1570814334; bh=8bFx7UDwuc3TDwUWGtEXLASOi2opCMeoUbI36Sho0O4=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=q8yhXRXWAxHTa15AWl7vMpIm9IoQuUXEHTrKaJLwwOu539Ij19eSZPrqlNEMMM93K uEpjbJIf81IuHpQCnT42eHa8o/bBlwJR6W6XRl7QGAdQJUbg+3uq35BUwJiOfQTKr4 RSjw9fBaiB+ac2nj3EvnLwEUQ6JiDhJWX0tp9lYU= Feedback-ID: mattiase@acm.or Received: from [192.168.1.65] (c-e636e253.032-75-73746f71.bbcust.telenor.se [83.226.54.230]) (authenticated bits=0) by mail18c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id x9BHIpl2002192; Fri, 11 Oct 2019 17:18:53 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: bug#37700: 27.0.50; undo mouse-drag-and-drop-region ineffective From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: <83imovpck5.fsf@gnu.org> Date: Fri, 11 Oct 2019 19:18:51 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <8A69325D-7EC4-4B8D-BAD2-6E3C048E5078@acm.org> References: <3311689D-B1DF-4BAC-86BA-E3D2C6D2ECF1@acm.org> <94D2DE0C-8BD0-4CCF-B77D-5606A1D227DD@acm.org> <83imovpck5.fsf@gnu.org> To: Eli Zaretskii X-Mailer: Apple Mail (2.3445.104.11) X-CTCH-RefID: str=0001.0A0B0206.5DA0B97E.000C, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=dfr+Ikfe c=1 sm=1 tr=0 a=M+GU/qJco4WXjv8D6jB2IA==:117 a=M+GU/qJco4WXjv8D6jB2IA==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=mDV3o1hIAAAA:8 a=KkBn78UHUJ8g-4ptG9EA:9 a=CjuIK1q_8ugA:10 a=_FVE-zBwftR9WsbkzFJk:22 a=pHzHmUro8NiASowvMSCR:22 a=xoEH_sTeL_Rfw54TyV31:22 X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 37700 Cc: martin rudalics , 37700@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: -0.7 (/) 11 okt. 2019 kl. 16.43 skrev Eli Zaretskii : >=20 > Given that the region can be easily deactivated, I'm not sure I see > the sense in introducing options that selectively disable > region-sensitive behavior of specific commands. When the user doesn't like the result of an operation, be it a change of = mind or a mistake, the first logical reaction is to undo. Many users if = not most are unaware that undo in Emacs is restricted to an active = region, and even if they know, they are not likely to think of it before = instinctively pressing the well-learned undo key. One reason is that no other editor works like this; another is that = almost all other operations that can be undone either deactivate the = region or take place wholly inside it, so there is no reason for the = user to care about that quirk. Moreover, users are often aware from experience with other software that = the time to undo an action is immediately afterwards, with no other = potentially inhibiting action in-between. Requiring a specific = undo-enabling action is therefore doubly hostile. From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 11 14:26:48 2019 Received: (at 37700) by debbugs.gnu.org; 11 Oct 2019 18:26:48 +0000 Received: from localhost ([127.0.0.1]:60307 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iIzcm-0006Kr-AH for submit@debbugs.gnu.org; Fri, 11 Oct 2019 14:26:48 -0400 Received: from mout.gmx.net ([212.227.17.20]:57397) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iIzck-0006KY-8G for 37700@debbugs.gnu.org; Fri, 11 Oct 2019 14:26:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1570818393; bh=JzLrK7Do1w3Tb0SoH0NU8evyIfKo25ZXRtP3Hxh4F0Y=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=WhzX9Q6sz7fzDStoxILKRTLbhLVBOBTRea7Y4dp+98KEfbDr/i3wN3D3xp57nPFZZ dMdHmT0ibK99hridHEz2cfL+voDcJykb74WLnIpNF/MwdTa1p6DjU7ZSS62oliqP/f XFxHaIwYStaS4x95ILwL8mYplRR5lT3ofzntTqSE= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.1.100] ([46.125.249.38]) by mail.gmx.com (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1M7b2T-1iQyle15fZ-007zhX; Fri, 11 Oct 2019 20:26:33 +0200 Subject: Re: bug#37700: 27.0.50; undo mouse-drag-and-drop-region ineffective To: =?UTF-8?Q?Mattias_Engdeg=c3=a5rd?= References: <3311689D-B1DF-4BAC-86BA-E3D2C6D2ECF1@acm.org> <94D2DE0C-8BD0-4CCF-B77D-5606A1D227DD@acm.org> From: martin rudalics Message-ID: <5be797bb-9d6b-cebe-edf4-21b4a5944595@gmx.at> Date: Fri, 11 Oct 2019 20:26:23 +0200 MIME-Version: 1.0 In-Reply-To: <94D2DE0C-8BD0-4CCF-B77D-5606A1D227DD@acm.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: de-AT Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:ufXtNVR5Q4O1VW5fmoCaDByVG3u4pE1WPlHTv5i1au69aNmGPxA CjHMhvt1JUQLXq0DoSn7DaNr0APYxNGMPoWFNl1a72JYY5YQrGqLCg2Xz+HHWMwf47cu3tR 3c7sqBoeBFD+ZEoP/Yj+zGot+rpeFstM7B73BauO8idBGBMqxIA6aDtyJ+VFtZuh/3l1JJa UkXs2gt1eFLB3GEAIRbjA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:NGCaBHFcPxo=:hVRIBYtKaXyrE3Pp9gxMvO IBXWvJkKyPaDSz102IXLeCBUTT2BgTIi3M4E74sdkp3DFNxf+j6/V4j/zDxt5EnZKcImAdHaU WYuBoD0ugdmclLp88VN1fzNU3h1zSRiJcw0LFUTF6V+LLY5g/agd4+Af+VY8uKJXJ0LYrYWUV XnQh5xk6MY63LFraVtdPpkLhEXha19qgqGJ0cRh63ao+R1f3Z4c7Nz6R5ZzHE6OJer8eLNhyh vvpBDdoLXbCzL1AzZGnfIt2SSftw4Uau0Deyh4yQTo8vvaItBuSe2h+fpFviuYgUqwHcy2ABR /VdC9oNAjh+3OldIfzJgmRPjx0SWXGkcGH5SFIaPiTBKHdqS3ToPOIMTEg+pkWzR/FOF6t/2/ 0QbSk0qH3hETmR9kArn+zJTiIX2wNGyPlpAl4FhOtgvLDfDaD45G3mqCSEjp05wnoaqzcDcHe DQoz+0WYbPYISe9JDpT9sttaqPbU95FBC1RdxL/04F6ZhwZVhhNGRgibEoujnYpldzA0LVArr xgSOQm6fXoId8nc1iNVoPe7oy5MbuU0poNTnUnKtrT7Tdf8EbldDGBu2PZ85S928eKRfpVeiS 8anbQD74Me1f5WRm/O4b12Brni4f+VVh/I5jWfOp44YOXHW4aMGRjSbgBFyWjjQaNtoLsWJwx UzWWY3DXCMD+Zab21BxRH+KhatvDvSsoyqUw7Paizt8dOZ+zwUgXD2gg4ggmO+I1Os9xpgRxf sL9kK9Z3fq2pc98yo39rCPpX4TyAHoFBgFvFT8g5pHRMRSYy9OIP6Uo6MkOjJQ9AgSavnWxFB 67s/wRhl6hga1So6N0mK5vxbMMJ7X2E2xy/FwZTq2p+JV1d87jlvihUWUdDf3jKvKyU/6cDn3 AB6w0UABYLZXgZKawVd3nWcKiZMCoqVKNalLuvRqqthimGrM0Za0er48/FXbhAC5eZ2Vm8RFH g08U9CbeFW2aMx55VY7bzY3zjq3oKcQxaAhsDfuyAhLVLvgOAZjrAq+SoNuEE2Wvwqc1lQGcK D+Oyhbq3bsAp2wRpbMg3UAtgeTkmG67f2kRi5NR9JTziScPVgaDhSvKbqT/P2K2DpqThnEVJp 7ClgdE4GiKYNZ3L58m44TU9ayx52DDAzXuUUjF4xOoHhawiHbdsHEpUtrqYllp+Fnfhek2VAj NLvHS8oCYOtQapoTbd83rLjlVkBRL/2Utf9Yg7X4lvnZYuhZ5Iby4e7aUEtNfIc2ZZELnZGf/ 7J2ULk6vA6tCuHIqG3nW8PbtS6rSP9kkBXa2Rhx2AIkGniwbV/xyOywbugT0= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 37700 Cc: 37700@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 (-) > Do you know of any drawbacks for someone whose editing habits are > not dependent on the region confinement of undo? Here I once had my own 'undo' function since I disliked the one in simple.el. Eventually I gave up because it was too tedious to keep up with the changes of the original. Nowadays I'm just using (defun my-undo (&optional arg) (interactive) (if mark-active ;; No `undo-in-region'. (let (mark-active) (undo arg) (setq mark-active t) ;; The following might be harmful, let's see. (setq deactivate-mark nil)) (undo arg))) But I also faintly remember a discussion with the author of 'mouse-drag-and-drop-region' on whether it is a good idea to activate the mark after dropping - IIRC he did have some argument in favor of it. Maybe it would be easier to add an option for not activating the region when dropping than adding one for 'undo'. martin From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 11 14:36:27 2019 Received: (at 37700) by debbugs.gnu.org; 11 Oct 2019 18:36:27 +0000 Received: from localhost ([127.0.0.1]:60321 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iIzm6-0006hq-R0 for submit@debbugs.gnu.org; Fri, 11 Oct 2019 14:36:27 -0400 Received: from eggs.gnu.org ([209.51.188.92]:50115) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iIzm4-0006hK-QV for 37700@debbugs.gnu.org; Fri, 11 Oct 2019 14:36:25 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:48078) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iIzlz-0005di-5i; Fri, 11 Oct 2019 14:36:19 -0400 Received: from [176.228.60.248] (port=2711 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iIzly-0000n0-JK; Fri, 11 Oct 2019 14:36:18 -0400 Date: Fri, 11 Oct 2019 21:36:05 +0300 Message-Id: <838sprp1t6.fsf@gnu.org> From: Eli Zaretskii To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= In-reply-to: <8A69325D-7EC4-4B8D-BAD2-6E3C048E5078@acm.org> (message from Mattias =?utf-8?Q?Engdeg=C3=A5rd?= on Fri, 11 Oct 2019 19:18:51 +0200) Subject: Re: bug#37700: 27.0.50; undo mouse-drag-and-drop-region ineffective References: <3311689D-B1DF-4BAC-86BA-E3D2C6D2ECF1@acm.org> <94D2DE0C-8BD0-4CCF-B77D-5606A1D227DD@acm.org> <83imovpck5.fsf@gnu.org> <8A69325D-7EC4-4B8D-BAD2-6E3C048E5078@acm.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 37700 Cc: rudalics@gmx.at, 37700@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 (---) > From: Mattias Engdegård > Date: Fri, 11 Oct 2019 19:18:51 +0200 > Cc: martin rudalics , 37700@debbugs.gnu.org > > 11 okt. 2019 kl. 16.43 skrev Eli Zaretskii : > > > > Given that the region can be easily deactivated, I'm not sure I see > > the sense in introducing options that selectively disable > > region-sensitive behavior of specific commands. > > When the user doesn't like the result of an operation, be it a change of mind or a mistake, the first logical reaction is to undo. Many users if not most are unaware that undo in Emacs is restricted to an active region, and even if they know, they are not likely to think of it before instinctively pressing the well-learned undo key. > > One reason is that no other editor works like this; another is that almost all other operations that can be undone either deactivate the region or take place wholly inside it, so there is no reason for the user to care about that quirk. > > Moreover, users are often aware from experience with other software that the time to undo an action is immediately afterwards, with no other potentially inhibiting action in-between. Requiring a specific undo-enabling action is therefore doubly hostile. You are arguing that 'undo' should never be sensitive to the active region. If that was so, we'd have gobs of bug reports, because this behavior is quite old, since 2007 AFAICT. So evidently this feature is not as hostile as you seem to imply. Moreover, the situation is not irrecoverable, even if the user does make mistakes you describe: one can undo the undo, then disable the region, and undo again. Your change, however, was for an option that would disable this behavior only optionally, not altogether. And my response was to the idea that we should have knobs that selectively disable region-sensitive behavior of specific commands one by one. I still maintain that doing that for individual commands makes little sense to me. From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 11 14:51:29 2019 Received: (at 37700) by debbugs.gnu.org; 11 Oct 2019 18:51:29 +0000 Received: from localhost ([127.0.0.1]:60326 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iJ00f-0007OV-84 for submit@debbugs.gnu.org; Fri, 11 Oct 2019 14:51:29 -0400 Received: from eggs.gnu.org ([209.51.188.92]:52470) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iJ00d-0007OB-8w for 37700@debbugs.gnu.org; Fri, 11 Oct 2019 14:51:27 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:48471) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iJ00X-00088y-UE; Fri, 11 Oct 2019 14:51:21 -0400 Received: from [176.228.60.248] (port=3628 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iJ00X-0006Hl-9C; Fri, 11 Oct 2019 14:51:21 -0400 Date: Fri, 11 Oct 2019 21:51:07 +0300 Message-Id: <834l0fp144.fsf@gnu.org> From: Eli Zaretskii To: mattiase@acm.org In-reply-to: <838sprp1t6.fsf@gnu.org> (message from Eli Zaretskii on Fri, 11 Oct 2019 21:36:05 +0300) Subject: Re: bug#37700: 27.0.50; undo mouse-drag-and-drop-region ineffective References: <3311689D-B1DF-4BAC-86BA-E3D2C6D2ECF1@acm.org> <94D2DE0C-8BD0-4CCF-B77D-5606A1D227DD@acm.org> <83imovpck5.fsf@gnu.org> <8A69325D-7EC4-4B8D-BAD2-6E3C048E5078@acm.org> <838sprp1t6.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 37700 Cc: 37700@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 (---) > Date: Fri, 11 Oct 2019 21:36:05 +0300 > From: Eli Zaretskii > Cc: 37700@debbugs.gnu.org > > You are arguing that 'undo' should never be sensitive to the active > region. If that was so, we'd have gobs of bug reports, because this > behavior is quite old, since 2007 AFAICT. Actually, more like since 1998: it was introduced in Emacs 20.3. From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 11 14:58:19 2019 Received: (at 37700) by debbugs.gnu.org; 11 Oct 2019 18:58:19 +0000 Received: from localhost ([127.0.0.1]:60333 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iJ07H-0007ca-8N for submit@debbugs.gnu.org; Fri, 11 Oct 2019 14:58:19 -0400 Received: from eggs.gnu.org ([209.51.188.92]:53341) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iJ07F-0007cM-QZ for 37700@debbugs.gnu.org; Fri, 11 Oct 2019 14:58:18 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:48607) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iJ079-0006Eh-TO; Fri, 11 Oct 2019 14:58:11 -0400 Received: from [176.228.60.248] (port=4037 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iJ073-0000NB-E9; Fri, 11 Oct 2019 14:58:08 -0400 Date: Fri, 11 Oct 2019 21:57:54 +0300 Message-Id: <8336fzp0st.fsf@gnu.org> From: Eli Zaretskii To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= In-reply-to: <8A69325D-7EC4-4B8D-BAD2-6E3C048E5078@acm.org> (message from Mattias =?utf-8?Q?Engdeg=C3=A5rd?= on Fri, 11 Oct 2019 19:18:51 +0200) Subject: Re: bug#37700: 27.0.50; undo mouse-drag-and-drop-region ineffective References: <3311689D-B1DF-4BAC-86BA-E3D2C6D2ECF1@acm.org> <94D2DE0C-8BD0-4CCF-B77D-5606A1D227DD@acm.org> <83imovpck5.fsf@gnu.org> <8A69325D-7EC4-4B8D-BAD2-6E3C048E5078@acm.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 37700 Cc: rudalics@gmx.at, 37700@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 (---) > From: Mattias Engdegård > Date: Fri, 11 Oct 2019 19:18:51 +0200 > Cc: martin rudalics , 37700@debbugs.gnu.org > > another [reason] is that almost all other operations that can be undone either deactivate the region or take place wholly inside it, so there is no reason for the user to care about that quirk. So perhaps a better way to resolve this situation is to teach 'undo' about drag-and-drop, so that it doesn't undo selectively immediately after drag-and-drop? IOW, the selective undo feature AFAIU assumes that the region is set up by the user before invoking 'undo', and that is not so in this case. From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 11 15:13:16 2019 Received: (at 37700) by debbugs.gnu.org; 11 Oct 2019 19:13:16 +0000 Received: from localhost ([127.0.0.1]:60340 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iJ0Lj-000879-P0 for submit@debbugs.gnu.org; Fri, 11 Oct 2019 15:13:16 -0400 Received: from eggs.gnu.org ([209.51.188.92]:55774) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iJ0Lf-00086q-Df for 37700@debbugs.gnu.org; Fri, 11 Oct 2019 15:13:14 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:49065) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iJ0LZ-0001Nd-1g; Fri, 11 Oct 2019 15:13:05 -0400 Received: from [176.228.60.248] (port=4965 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iJ0LX-00009a-Tk; Fri, 11 Oct 2019 15:13:04 -0400 Date: Fri, 11 Oct 2019 22:12:53 +0300 Message-Id: <83y2xrnlje.fsf@gnu.org> From: Eli Zaretskii To: martin rudalics In-reply-to: <5be797bb-9d6b-cebe-edf4-21b4a5944595@gmx.at> (message from martin rudalics on Fri, 11 Oct 2019 20:26:23 +0200) Subject: Re: bug#37700: 27.0.50; undo mouse-drag-and-drop-region ineffective References: <3311689D-B1DF-4BAC-86BA-E3D2C6D2ECF1@acm.org> <94D2DE0C-8BD0-4CCF-B77D-5606A1D227DD@acm.org> <5be797bb-9d6b-cebe-edf4-21b4a5944595@gmx.at> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 37700 Cc: mattiase@acm.org, 37700@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 (---) > From: martin rudalics > Date: Fri, 11 Oct 2019 20:26:23 +0200 > Cc: 37700@debbugs.gnu.org > > But I also faintly remember a discussion with the author of > 'mouse-drag-and-drop-region' on whether it is a good idea to activate > the mark after dropping - IIRC he did have some argument in favor of > it. Maybe it would be easier to add an option for not activating the > region when dropping than adding one for 'undo'. Yes, that would be a possible solution, I think, since that command is quite new. From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 11 21:55:38 2019 Received: (at 37700) by debbugs.gnu.org; 12 Oct 2019 01:55:38 +0000 Received: from localhost ([127.0.0.1]:60526 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iJ6d8-0001kF-18 for submit@debbugs.gnu.org; Fri, 11 Oct 2019 21:55:38 -0400 Received: from mail-pf1-f181.google.com ([209.85.210.181]:42181) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iJ6d5-0001jz-43 for 37700@debbugs.gnu.org; Fri, 11 Oct 2019 21:55:36 -0400 Received: by mail-pf1-f181.google.com with SMTP id q12so7085488pff.9 for <37700@debbugs.gnu.org>; Fri, 11 Oct 2019 18:55:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=PXCwh38NrxsjszA+djOPW+RmOEGQtzFLR7WjcZWau2I=; b=I2na5x5UeOvqhfomkCrXt0QwsP9yjqApfteK6xg0W401LgsGDP4jpxptvb4/e6J9kR nU8uWYOIQF1KA504vWbvhdPgRoyJXAdbDJZ9Ad3dEYrypkye0gN+6jUA5oXi7Wtp+wr7 MeawU7YlMbedBKYlr1iq1uC4WKdrrkmuUmBDvJLgZEkFs5yapTZjPBEWSfDuxVtIPYPl VSIWneDussxg4rzl9V0WlFOJ4lr5oC3XOUAbVCdCFx0z2iLNDgcEHZofeEgjqG8HzY/Q 4n7UjjRa9zjxLKUt/BO9hoYynuLqnBOJkV5PScQL8hj0LtwwI7wGqVlEIRSTMmC3mlRT dryg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=PXCwh38NrxsjszA+djOPW+RmOEGQtzFLR7WjcZWau2I=; b=Q0rK7xukDtK4cQQaM2AjfTT2aekgUohTFQHvr/9I5MIAG4kkv09I/PEXlrVVwuzd4U 2mANPVWE8sQ2zC373idtZWVRm47NrBh2c0Ym3TnBUNEB/3Zab/A5LUV8VXhPshwpiFRZ VTBm4MPjXBD9gI6OqjVHI+Ox9KBeOj/ORkR47LoLJawmoTX1KBxOw+iJVgFesiE3g5oO /r9tedWuORvsyIkVKkoDTBex4llqUhDfqUW/oLWhN1+BnNtPM65ajeia8CAn48rvc164 FDTxIzgrytxmgvV9wZcVcfm3y94fYqUPwEz+IntyLf2axbcuvL9zxM0I1PkRh7pnoOAI 1vCA== X-Gm-Message-State: APjAAAUT9wWRVPXIE5g1jvB28yZM5SUxo3fzVhj+MCC2HJ5Syl/5Ziva 7U9k/yKtD5k9EXfznnT+n9o= X-Google-Smtp-Source: APXvYqy8nCRzsf1sBD9QAciY5b+myKIXRV/sDbDQtnMDXa26uKrgfmWqJlYh/I5BsNrk9Ia0MlvNwA== X-Received: by 2002:a17:90a:304:: with SMTP id 4mr21903301pje.128.1570845329113; Fri, 11 Oct 2019 18:55:29 -0700 (PDT) Received: from DreamBook2017.local (p280222-ipngn200210tottori.tottori.ocn.ne.jp. [114.151.86.222]) by smtp.gmail.com with ESMTPSA id l21sm10273376pgm.55.2019.10.11.18.55.25 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 11 Oct 2019 18:55:27 -0700 (PDT) From: Tak Kunihiro X-Google-Original-From: Tak Kunihiro To: martin rudalics Subject: Re: bug#37700: 27.0.50; undo mouse-drag-and-drop-region ineffective References: <3311689D-B1DF-4BAC-86BA-E3D2C6D2ECF1@acm.org> <94D2DE0C-8BD0-4CCF-B77D-5606A1D227DD@acm.org> <5be797bb-9d6b-cebe-edf4-21b4a5944595@gmx.at> Date: Sat, 12 Oct 2019 10:55:23 +0900 In-Reply-To: <5be797bb-9d6b-cebe-edf4-21b4a5944595@gmx.at> (martin rudalics's message of "Fri, 11 Oct 2019 20:26:23 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (darwin) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 37700 Cc: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= , 37700@debbugs.gnu.org, tkk@misasa.okayama-u.ac.jp 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 (-) > But I also faintly remember a discussion with the author of > 'mouse-drag-and-drop-region' on whether it is a good idea to activate > the mark after dropping - IIRC he did have some argument in favor of > it. Maybe it would be easier to add an option for not activating the > region when dropping than adding one for 'undo'. On revision of writing, I often want to move a sentence around to fit into right place, without loosing the sentence from sight. Most of the time I cannot relocate the sentence to the best place by single drag-and-drop operation thus I want to maintain region active. I found that I did not notice problem pointed by Mattias because I assign `undo' by `redo+.el' to C-/. I agree that undo behavior by C-/ with Emacs -Q is inconvenient! https://www.emacswiki.org/emacs/redo+.el From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 12 04:24:20 2019 Received: (at 37700) by debbugs.gnu.org; 12 Oct 2019 08:24:20 +0000 Received: from localhost ([127.0.0.1]:60700 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iJChI-0002Ye-4b for submit@debbugs.gnu.org; Sat, 12 Oct 2019 04:24:20 -0400 Received: from mout.gmx.net ([212.227.15.18]:51349) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iJChE-0002YP-6t for 37700@debbugs.gnu.org; Sat, 12 Oct 2019 04:24:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1570868642; bh=Ebh9bFWdlTtt7tvBlWGRN22qi9IXK2HFzWBJ8F5fqIg=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=RJplYdJiSgFvdRLMzK7XK56kaXWNWV8VNRuEa95ewDHEO1PxzbY/25Jzev9y5fSYj zHqHMDPYqGYstTDYb0W23oCtCECEEEi+US972Vd9gtpx+7bb2besP6r7ZbyFuNoI++ agKCpa9KLdzvxu8qEPAQ6epi6XeOytdRlICGRyi4= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.1.101] ([212.95.5.148]) by mail.gmx.com (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MAwbz-1iCLzn2lEP-00BOb3; Sat, 12 Oct 2019 10:24:02 +0200 Subject: Re: bug#37700: 27.0.50; undo mouse-drag-and-drop-region ineffective To: Eli Zaretskii , =?UTF-8?Q?Mattias_Engdeg=c3=a5rd?= References: <3311689D-B1DF-4BAC-86BA-E3D2C6D2ECF1@acm.org> <94D2DE0C-8BD0-4CCF-B77D-5606A1D227DD@acm.org> <83imovpck5.fsf@gnu.org> <8A69325D-7EC4-4B8D-BAD2-6E3C048E5078@acm.org> <838sprp1t6.fsf@gnu.org> From: martin rudalics Message-ID: <0af336d2-8264-7480-c22c-aae14233fd06@gmx.at> Date: Sat, 12 Oct 2019 10:24:00 +0200 MIME-Version: 1.0 In-Reply-To: <838sprp1t6.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: de-AT Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:4mloALzgIo4caqtGyLLoOpQ0s8S0DNkqzuB5FNaNv35A9GZv0Um Uxk3wN5q1vBB+p5lFcHQ+2HD/cJZ/6Z8r3fSauVDbwEz3DFjYTES+P6LlONCQwf7siD95Jk 0ptRbcwoRmhcE8eat/kUnYQ9vFNr+Btne96NToLl05PG/nA0wH3pi4+HcJp0X0lehF/folS XBCF8GUc7cIN5UGxAMqbQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:h+QV2J1lPaI=:5HyQg3zFVuwZOZIcOaCeoN R1O5HQAN8g+GKwyUI5Qhm0LUfaMnPVjhLg3tK49FDCOyl0mR1LJx2TsTgyv9z57Y0i3r1uWRW BMPGsQyR3S4k5bjgT+VGjvMwY4FuLej02sEDsxGyl4Xrsv0yCRzC75RbrtoGEVX2NFxBoAP/0 10397VaSiOn2vPyZXPzCQyDuIvHfDEsHEKUxusmlN1VQAdARDKYzzxpZqkZ/+0kJZszlmgfGR Cr+/lzAE1xpt0521laD19hYM9Wb+bfKn6s99U/DaYs7ipoun4E7jOwzT61CIUmw79DEbEC2/K fJ6dKBXi+BLjYV91hp/pkIwTdYISb21iUJOSixMTBviB76a7dQAnh1+p3C2edH8u96IHYBXbr /X8zrYEQLMyyqWjjTKnlyACAzDJB33TQPlxIeEQ89zhu+GnTJ5lJ305KTj14DFUHrasTh8+ZF mlFXFNJCQwgIIQOcW4VM0F+MlXN7IeIKLfCCsOMePdW8DIobGWYO1tCdsepSNO+y8l5U3D3Ji 3owEw0PYiMfQEvlLliPKAhTggozbEhJqUKZ4mU0gYud5WVoYiHfE+IL4dtlqUk4hAcCcpj41F YLBH8s6P8aexVx8rBNjYT9rePJyO7ZkdA4d9jvvsqzI3LaEYIeOJP5+DGsDld2LpK+eUEmWSW YDlgO7l2hvXRN8WR8H5l/N0AcQ14A1Sey/a+3KkJj22jj5m08DiVyLvSETKE4pkhukp1AduyT SMzOAJO8idu5SxITZ9n8aonqztmOdTjdLCiyCVF2LfgYmunBxD/bPGX/fF3z+UFZWEqngwu12 jHTPW3oULsbLSFnVlS8m8p4b38RjWliWnKHHYE15n0zgdtAJmvBh55gX7BceXj+fo+3KOs7n2 Q7s+jqQ6mwEc5lnL4WeMhVbhFBG8aBlACd2MgSxr7luB5b8VQV7N2jhLm+0QnqvyQuBRV9KVZ V4sf8RurmslgbKQOrHiYwO1HpWaY6Ibu9vwopwhp7Zq9QLz17hdPbea+83vX0g5cBdrKA2Yfq lsPP5V7QsYfTugW9mEq9ZsHoLWCwigRJ603aGKyWjLs32B3ecK0I3qUA9ck3CQ1vX8z8cnjch 2X0D9z0eCDGnmv/ts9Jb5fd70b3Ft1muW2teIJvUoGLyjwasIRJjQVTEBbHpL9XE+ZF7bwUkX 6WPYr4O2R4ZFXCS/1wuBE9Ko+usV3Jmcu7yRlS8cq1eFrfo+WXcKMrSwrrOG5qAcZ9OQy8E69 SaKMKs/eGXQ6vV4Cyaycg4U1mP20cdLTqiJBbhg== X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 37700 Cc: 37700@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 (-) > And my response was to the > idea that we should have knobs that selectively disable > region-sensitive behavior of specific commands one by one. I still > maintain that doing that for individual commands makes little sense to > me. Full agreement here. martin From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 12 04:24:32 2019 Received: (at 37700) by debbugs.gnu.org; 12 Oct 2019 08:24:32 +0000 Received: from localhost ([127.0.0.1]:60703 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iJChU-0002Z3-EI for submit@debbugs.gnu.org; Sat, 12 Oct 2019 04:24:32 -0400 Received: from mout.gmx.net ([212.227.15.18]:41023) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iJChR-0002Yp-HY for 37700@debbugs.gnu.org; Sat, 12 Oct 2019 04:24:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1570868654; bh=ueHsruzyqfPh9Z+puuZ72YM8ZRTLyABpDrIT4wuZk3o=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=OVV97QYLXp6ixCIg6u+NUJzrzHMd+Q21wFagdrVd84/Z2THUMoKgzqShEAQszxZZy B6NNNF37YOOWsuula6OOuG9LbGD7okLZ6WrZcSf5uGNyr7k3JPVscwcD/THB6k04oE QTkxOoHJHTY29ji6u8463VlDvetm5uQ9Zg3JJ+as= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.1.101] ([212.95.5.148]) by mail.gmx.com (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MiJV6-1hpvtD3ovO-00fSh0; Sat, 12 Oct 2019 10:24:14 +0200 Subject: Re: bug#37700: 27.0.50; undo mouse-drag-and-drop-region ineffective To: Tak Kunihiro References: <3311689D-B1DF-4BAC-86BA-E3D2C6D2ECF1@acm.org> <94D2DE0C-8BD0-4CCF-B77D-5606A1D227DD@acm.org> <5be797bb-9d6b-cebe-edf4-21b4a5944595@gmx.at> From: martin rudalics Message-ID: <60b5bfa7-0aaf-40c0-3a1d-d0c0c5c662c6@gmx.at> Date: Sat, 12 Oct 2019 10:24:13 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: de-AT Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:tcOikvYUfRmaRks6gew/fS+wg/v0WmAK40Dk7rlVmWBEA7HKeht MkCB6mH6/dGXPY2fDLgt78xZqma/0ztzCCk1i2mGyWjMPuvSttYDRArZRrn9gxyOWHWL77V ny70WQ9cWCE40nKmQik7vibjbQhEEhfXMG3QLC4mGDGQ0twvF/X3d3XIBxZM5xyGcd25Zmo D4D33Kam+uc4b/6eBMrWQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:95OA5q9eLWE=:7FTD5mjJCmbRsYuQbw/mQX 7tmkaziEk9w3krNpQh1CWil7DsNWtKmWPBkkec/U1u+cjIRyXt+PqjyhTDhG4YYVwbbQwWRSI bTuPQ5PjcvFHECzvIcv9FsuDzI9Xj4BCQVgyRi17AvoGABZqmrm1RDwBTxYVB9yq6/6ZXjRaK bFHspMj6KJBrQhJUau8HC3fcVIW7HRoSxehz8K6UrKxvoumCYFXE0df9IGCkpYmpUntGcLtGx DbTjh1J3PSPhCPhSM8+spVwTFE94k0Xjc6tA9od204IV9BFZEu3nBiun9aN2BR70RQNyZMezC phsDByBxqklRTPO14ZgdbLl1jERlZ1/MzTiqzmP12EDTjzfOwZQ11jPA2/U2thpztfqKFiZXe KXmXnzAUPgXRAB25gnirVt6znBaMg/RZjje7jlrKbmGdKg7Z6g3q3TYYPdIEekeKkvWy4tQwH 594KesJDVMR8MXKXO/pVjAmEMdzJizLmAY2RH/tH62iLCRp+auShfmxrA/L0IjYpCFTkOypRi llG5Q3k4TIRk1ReIyEnk5YqdTb+tcbI4asS5Hdr6L50VgfWN9+gDM/4Qhoc/t+hIFdu64h1vD bk967VaiYSnj0uyZb2HLEit6MjHTryOtirucQVCm4YqyzbPeXQSBjmjYUAnUqRmzDep13h3tE nXalOLaEmHeqMXTL3xYli6urCjt7YqWp3vMQ4elryfq8UQlsRxJOBfmDVe9PjOjxmHqO3KKCM bUPJgBPAadI1ZTdn7zvwivrJe0JNu+WOfHT5W5CHyTfMNGL5Le41nTOmvYAZIWQTnUDfSmSU+ nQF3B1Htn1p3NY8ktWEIG8dhahnrbDbDOm+Jb7lwpHkPiREDckBFxJIIJTh2R9fG9stfHIU3T ytPVyAmib/DblMzfHXYhp43dPP/fjWaE1fy9lfHJxGo0u0BxPXmY/v3pK4lUOdr6U+9u0rq6s mpEuKZVvowQC8G+VjbtkO3pA7Ko6XL2MSL1lrITSDQiMXJDRPHaBZpSQZKcvXR1303co6gNjb u9Xo0kfD0gEUq5PaFuqBjHRt/rptfc4JQO84DdlSUKuPTEnNi2SgqHmfZSgOw3MShUMa5b0dX rZRxQeNoawKVmAy24NYXAuu/09IJPR+SXB+YLuy6jIBGnzq0Q5IwgFUAme981m/Z7tveDTwuo kKJeLfKIPp7nMoagPufGR04Ru8BDW146vOFVFUBSzZnwhKKGQBFtzpzlHIrrNAbzAA32n/wB0 d1FvfPwzIjGm5kT5DWGYshOOf2YrhxLToTlIwCkn7kQc0Mz+fKDEyCxa9vPg= X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 37700 Cc: =?UTF-8?Q?Mattias_Engdeg=c3=a5rd?= , 37700@debbugs.gnu.org, tkk@misasa.okayama-u.ac.jp 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 revision of writing, I often want to move a sentence around to fit > into right place, without loosing the sentence from sight. Most of the > time I cannot relocate the sentence to the best place by single > drag-and-drop operation thus I want to maintain region active. > > I found that I did not notice problem pointed by Mattias because I > assign `undo' by `redo+.el' to C-/. I agree that undo behavior by C-/ > with Emacs -Q is inconvenient! I think that we should provide an option to not enable the region after dropping and maybe even make it the default. martin From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 12 12:42:41 2019 Received: (at 37700) by debbugs.gnu.org; 12 Oct 2019 16:42:41 +0000 Received: from localhost ([127.0.0.1]:34080 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iJKTY-00005M-SJ for submit@debbugs.gnu.org; Sat, 12 Oct 2019 12:42:41 -0400 Received: from mail231c50.megamailservers.eu ([91.136.10.241]:60088 helo=mail37c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iJKTW-00005A-Q8 for 37700@debbugs.gnu.org; Sat, 12 Oct 2019 12:42:40 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1570898554; bh=PCFkDogNmhp6CxbglWZ6MwQcEj/IPtFcPPPHkXq1rSU=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=fGnWT/ILzPa8W6WMKRfnTRJdbx8JXzLZ3FtwK7a2IzZtIQuLGntG4DhTvpRJVAe34 0rWk95bkd2bS2a4gIXgEo6RTdnY+MzBUStjJxKvFyk7mL0HgMdyM6VT+0jNy+o2zH0 H1BqK5DREFh6ZoJdbUnHF5gs+c8jALsky5Y8ewkM= Feedback-ID: mattiase@acm.or Received: from [192.168.1.65] (c-e636e253.032-75-73746f71.bbcust.telenor.se [83.226.54.230]) (authenticated bits=0) by mail37c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id x9CGgUYT017255; Sat, 12 Oct 2019 16:42:32 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: bug#37700: 27.0.50; undo mouse-drag-and-drop-region ineffective From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: <60b5bfa7-0aaf-40c0-3a1d-d0c0c5c662c6@gmx.at> Date: Sat, 12 Oct 2019 18:42:30 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <354ABF35-C5D0-4045-B9F0-5615A64408E6@acm.org> References: <3311689D-B1DF-4BAC-86BA-E3D2C6D2ECF1@acm.org> <94D2DE0C-8BD0-4CCF-B77D-5606A1D227DD@acm.org> <5be797bb-9d6b-cebe-edf4-21b4a5944595@gmx.at> <60b5bfa7-0aaf-40c0-3a1d-d0c0c5c662c6@gmx.at> To: 37700@debbugs.gnu.org X-Mailer: Apple Mail (2.3445.104.11) X-CTCH-RefID: str=0001.0A0B0214.5DA2027A.001A, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=eN1tc0h1 c=1 sm=1 tr=0 a=M+GU/qJco4WXjv8D6jB2IA==:117 a=M+GU/qJco4WXjv8D6jB2IA==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=HG2BcLEIDMiW6S3uTakA:9 a=CjuIK1q_8ugA:10 a=pHzHmUro8NiASowvMSCR:22 a=xoEH_sTeL_Rfw54TyV31:22 X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 37700 Cc: martin rudalics , Tak Kunihiro , tkk@misasa.okayama-u.ac.jp, Eli Zaretskii 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: -0.7 (/) Tak Kunihiro wrote: > On revision of writing, I often want to move a sentence around to fit > into right place, without loosing the sentence from sight. Most of = the > time I cannot relocate the sentence to the best place by single > drag-and-drop operation thus I want to maintain region active. Thank you, very much my experience. > I found that I did not notice problem pointed by Mattias because I > assign `undo' by `redo+.el' to C-/. Ah yes; apparently, region handling is mentioned in a TODO comment in = redo+.el but nobody has bothered to implement it. Looks like the demand = isn't there. Martin Rudalics wrote: > I think that we should provide an option to not enable the region > after dropping and maybe even make it the default. That would seriously degrade usability of the drag-and-drop feature. = Selecting the text at its final position both highlights it, and allows = the user to drag it again or do other region-related operations. (Other = editors work the same way.) This behaviour is definitely more important to the drag-and-drop user = than the region-confinement of undo. Eli Zaretskii wrote: > So perhaps a better way to resolve this situation is to teach 'undo' > about drag-and-drop, so that it doesn't undo selectively immediately > after drag-and-drop? Maybe --- can it be done within the current 'undo' framework, or would = drag-and-drop need to be special-cased? Did you have a particular = approach in mind? From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 12 13:17:25 2019 Received: (at 37700) by debbugs.gnu.org; 12 Oct 2019 17:17:26 +0000 Received: from localhost ([127.0.0.1]:34085 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iJL1B-0000va-LF for submit@debbugs.gnu.org; Sat, 12 Oct 2019 13:17:25 -0400 Received: from eggs.gnu.org ([209.51.188.92]:55428) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iJL19-0000vK-LJ for 37700@debbugs.gnu.org; Sat, 12 Oct 2019 13:17:24 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:43316) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iJL11-0003lf-Ng; Sat, 12 Oct 2019 13:17:15 -0400 Received: from [176.228.60.248] (port=3017 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iJL11-0006Qr-3V; Sat, 12 Oct 2019 13:17:15 -0400 Date: Sat, 12 Oct 2019 20:17:02 +0300 Message-Id: <83k199nasx.fsf@gnu.org> From: Eli Zaretskii To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= In-reply-to: <354ABF35-C5D0-4045-B9F0-5615A64408E6@acm.org> (message from Mattias =?utf-8?Q?Engdeg=C3=A5rd?= on Sat, 12 Oct 2019 18:42:30 +0200) Subject: Re: bug#37700: 27.0.50; undo mouse-drag-and-drop-region ineffective References: <3311689D-B1DF-4BAC-86BA-E3D2C6D2ECF1@acm.org> <94D2DE0C-8BD0-4CCF-B77D-5606A1D227DD@acm.org> <5be797bb-9d6b-cebe-edf4-21b4a5944595@gmx.at> <60b5bfa7-0aaf-40c0-3a1d-d0c0c5c662c6@gmx.at> <354ABF35-C5D0-4045-B9F0-5615A64408E6@acm.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 37700 Cc: rudalics@gmx.at, 37700@debbugs.gnu.org, tkk@misasa.okayama-u.ac.jp, homeros.misasa@gmail.com 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 (---) > From: Mattias Engdegård > Date: Sat, 12 Oct 2019 18:42:30 +0200 > Cc: Tak Kunihiro , tkk@misasa.okayama-u.ac.jp, > Eli Zaretskii , martin rudalics > > > So perhaps a better way to resolve this situation is to teach 'undo' > > about drag-and-drop, so that it doesn't undo selectively immediately > > after drag-and-drop? > > Maybe --- can it be done within the current 'undo' framework, or would drag-and-drop need to be special-cased? Did you have a particular approach in mind? I didn't figure out the details, I only had a general idea. I thought about doing that inside 'undo', perhaps have a list of commands for which an immediate 'undo' will disregard an active region. From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 12 13:53:31 2019 Received: (at 37700) by debbugs.gnu.org; 12 Oct 2019 17:53:31 +0000 Received: from localhost ([127.0.0.1]:34093 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iJLa7-0001og-IX for submit@debbugs.gnu.org; Sat, 12 Oct 2019 13:53:31 -0400 Received: from eggs.gnu.org ([209.51.188.92]:59222) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iJLa5-0001oP-1N for 37700@debbugs.gnu.org; Sat, 12 Oct 2019 13:53:29 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:43994) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iJLZx-0005jh-W1; Sat, 12 Oct 2019 13:53:22 -0400 Received: from [176.228.60.248] (port=1282 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iJLZv-0003ya-OJ; Sat, 12 Oct 2019 13:53:20 -0400 Date: Sat, 12 Oct 2019 20:53:09 +0300 Message-Id: <83ftjxn94q.fsf@gnu.org> From: Eli Zaretskii To: mattiase@acm.org In-reply-to: <83k199nasx.fsf@gnu.org> (message from Eli Zaretskii on Sat, 12 Oct 2019 20:17:02 +0300) Subject: Re: bug#37700: 27.0.50; undo mouse-drag-and-drop-region ineffective References: <3311689D-B1DF-4BAC-86BA-E3D2C6D2ECF1@acm.org> <94D2DE0C-8BD0-4CCF-B77D-5606A1D227DD@acm.org> <5be797bb-9d6b-cebe-edf4-21b4a5944595@gmx.at> <60b5bfa7-0aaf-40c0-3a1d-d0c0c5c662c6@gmx.at> <354ABF35-C5D0-4045-B9F0-5615A64408E6@acm.org> <83k199nasx.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 37700 Cc: 37700@debbugs.gnu.org, tkk@misasa.okayama-u.ac.jp, homeros.misasa@gmail.com 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 (---) > Date: Sat, 12 Oct 2019 20:17:02 +0300 > From: Eli Zaretskii > Cc: 37700@debbugs.gnu.org, tkk@misasa.okayama-u.ac.jp, homeros.misasa@gmail.com > > perhaps have a list of commands for which an immediate 'undo' will > disregard an active region. Or maybe have those commands have an 'undo' property which would tell 'undo' to treat them specially. Like we do with delete-selection. From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 16 11:27:14 2019 Received: (at 37700) by debbugs.gnu.org; 16 Oct 2019 15:27:14 +0000 Received: from localhost ([127.0.0.1]:46378 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iKlCk-00038T-Er for submit@debbugs.gnu.org; Wed, 16 Oct 2019 11:27:14 -0400 Received: from mail173c50.megamailservers.eu ([91.136.10.183]:46510 helo=mail56c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iKlCh-00038J-OC for 37700@debbugs.gnu.org; Wed, 16 Oct 2019 11:27:12 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1571239629; bh=QHid3I5d/BCEiOP9eGhzkRw5bV0qEYW2I49kg0zgFA0=; h=From:Subject:Date:In-Reply-To:Cc:To:References:From; b=qePqaPA9WNE0BDNPhP2s+Ff5aVjkWH/l6/ZIMkjB89NtYRFEb7IeCRxu+MJfWKcqz +F1BxQ8C5k3u6lc1e8AUztO4Oq1FNrPKX/kXsOiRp0XfN+DIowFr0tLRK4/OTJFuDX 7YnRrhYgedn8SsR+D0w6ZJFDID75TXCxX3xpXY5g= Feedback-ID: mattiase@acm.or Received: from [192.168.1.64] (c-e636e253.032-75-73746f71.bbcust.telenor.se [83.226.54.230]) (authenticated bits=0) by mail56c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id x9GFR6YE001634; Wed, 16 Oct 2019 15:27:08 +0000 From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= Message-Id: <37DDF48D-FC37-47A8-8CEC-C6EB66AB2BF7@acm.org> Content-Type: multipart/mixed; boundary="Apple-Mail=_E55E1877-CC02-44CD-A1F1-A7B4AC3D6594" Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: bug#37700: 27.0.50; undo mouse-drag-and-drop-region ineffective Date: Wed, 16 Oct 2019 17:27:05 +0200 In-Reply-To: <83ftjxn94q.fsf@gnu.org> To: Eli Zaretskii References: <3311689D-B1DF-4BAC-86BA-E3D2C6D2ECF1@acm.org> <94D2DE0C-8BD0-4CCF-B77D-5606A1D227DD@acm.org> <5be797bb-9d6b-cebe-edf4-21b4a5944595@gmx.at> <60b5bfa7-0aaf-40c0-3a1d-d0c0c5c662c6@gmx.at> <354ABF35-C5D0-4045-B9F0-5615A64408E6@acm.org> <83k199nasx.fsf@gnu.org> <83ftjxn94q.fsf@gnu.org> X-Mailer: Apple Mail (2.3445.104.11) X-CTCH-RefID: str=0001.0A0B0209.5DA736CD.0065, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=Hc1qsRM8 c=1 sm=1 tr=0 a=M+GU/qJco4WXjv8D6jB2IA==:117 a=M+GU/qJco4WXjv8D6jB2IA==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=M51BFTxLslgA:10 a=mDV3o1hIAAAA:8 a=XwWOB90QfDHLYLrzteQA:9 a=7Zwj6sZBwVKJAoWSPKxL6X1jA+E=:19 a=CjuIK1q_8ugA:10 a=y2fPTyxOXttb7gH-QJsA:9 a=B2y7HmGcmWMA:10 a=_FVE-zBwftR9WsbkzFJk:22 a=pHzHmUro8NiASowvMSCR:22 a=xoEH_sTeL_Rfw54TyV31:22 X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 37700 Cc: 37700@debbugs.gnu.org, tkk@misasa.okayama-u.ac.jp, homeros.misasa@gmail.com 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: -0.7 (/) --Apple-Mail=_E55E1877-CC02-44CD-A1F1-A7B4AC3D6594 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii 12 okt. 2019 kl. 19.53 skrev Eli Zaretskii : >=20 > Or maybe have those commands have an 'undo' property which would tell > 'undo' to treat them specially. Like we do with delete-selection. After trying various approaches, the attached patch looks somewhat = promising. It adds a new element type to buffer-undo-list, `unconfined', = which disables selective undo for one record. Consider it a = proof-of-concept. While it has the advantage of not requiring the user to change any = settings, I still prefer the first approach (an option to disable undo = confinement), as it's less intrusive and more generally useful. However, = this should work as well. --Apple-Mail=_E55E1877-CC02-44CD-A1F1-A7B4AC3D6594 Content-Disposition: attachment; filename=0001-Don-t-confine-undo-of-mouse-drag-and-drop-to-the-reg.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-Don-t-confine-undo-of-mouse-drag-and-drop-to-the-reg.patch" Content-Transfer-Encoding: quoted-printable =46rom=20307e5c6a19eda9d464e75f73b73f57fc1cf9e42e=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20=3D?UTF-8?q?Mattias=3D20Engdeg=3DC3=3DA5rd?=3D=20= =0ADate:=20Wed,=2016=20Oct=202019=2015:32:22=20+0200=0A= Subject:=20[PATCH]=20Don't=20confine=20undo=20of=20mouse-drag-and-drop=20= to=20the=20region=0A=20(bug#37700)=0AMIME-Version:=201.0=0AContent-Type:=20= text/plain;=20charset=3DUTF-8=0AContent-Transfer-Encoding:=208bit=0A=0A= Since=20the=20region=20is=20active=20after=20a=20mouse-drag-and-drop,=20= the=20change=0Acannot=20immediately=20be=20undone.=20=20To=20get=20= around=20this,=20tell=20the=20undo=0Amachinery=20to=20ignore=20the=20= region=20confinement=20for=20this=20operation.=0A=0A*=20lisp/simple.el=20= (primitive-undo,=20undo-make-selective-list):=0A*=20src/buffer.c=20= (buffer-undo-list):=0ANew=20`buffer-undo-list=E2=80=99=20element=20= `unconfined'.=0A*=20lisp/mouse.el=20(mouse-drag-and-drop-region):=0AMark=20= the=20operation=20as=20unconfined=20upon=20undo.=0A---=0A=20= lisp/mouse.el=20=20|=207=20++++++-=0A=20lisp/simple.el=20|=209=20= +++++++--=0A=20src/buffer.c=20=20=20|=203=20+++=0A=203=20files=20= changed,=2016=20insertions(+),=203=20deletions(-)=0A=0Adiff=20--git=20= a/lisp/mouse.el=20b/lisp/mouse.el=0Aindex=2076fec507e7..533ad606fb=20= 100644=0A---=20a/lisp/mouse.el=0A+++=20b/lisp/mouse.el=0A@@=20-2657,7=20= +2657,12=20@@=20mouse-drag-and-drop-region=0A=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20(let=20(deactivate-mark)=0A=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20(dolist=20(overlay=20= mouse-drag-and-drop-overlays)=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20(delete-region=20(overlay-start=20overlay)=0A-=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20(overlay-end=20overlay)))))=0A+=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20(overlay-end=20overlay))))=0A+=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20;;=20Since=20we=20will=20leave=20the=20destination=20text=20= selected,=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20;;=20make=20= sure=20an=20undo=20operation=20disregards=20the=20region=0A+=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20;;=20or=20the=20operation=20will=20only=20= be=20partially=20undone.=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20(when=20(consp=20buffer-undo-list)=0A+=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20(push=20'unconfined=20buffer-undo-list)))=0A=20=20=20= =20=20=20=20=20=20=20=20=20=20;;=20When=20source=20buffer=20and=20= destination=20buffer=20are=20different,=0A=20=20=20=20=20=20=20=20=20=20=20= =20=20;;=20keep=20(set=20back=20the=20original=20text=20as=20region)=20= or=20remove=20the=0A=20=20=20=20=20=20=20=20=20=20=20=20=20;;=20original=20= text.=0Adiff=20--git=20a/lisp/simple.el=20b/lisp/simple.el=0Aindex=20= b733f76ac7..ea580f651d=20100644=0A---=20a/lisp/simple.el=0A+++=20= b/lisp/simple.el=0A@@=20-2748,6=20+2748,7=20@@=20primitive-undo=0A=20=20=20= =20=20=20=20=20=20=20=20=20=20=20(set-marker=20marker=0A=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(-=20marker=20= offset)=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20(marker-buffer=20marker))))=0A+=20=20=20=20=20=20=20=20=20= =20(unconfined)=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20;=20= Ignore=20this=20directive=20here.=0A=20=20=20=20=20=20=20=20=20=20=20(_=20= (error=20"Unrecognized=20entry=20in=20undo=20list=20%S"=20next))))=0A=20=20= =20=20=20=20=20(setq=20arg=20(1-=20arg)))=0A=20=20=20=20=20;;=20Make=20= sure=20an=20apply=20entry=20produces=20at=20least=20one=20undo=20entry,=0A= @@=20-2850,6=20+2851,7=20@@=20undo-make-selective-list=0A=20=20=20(let=20= ((ulist=20buffer-undo-list)=0A=20=20=20=20=20=20=20=20=20;;=20A=20list=20= of=20position=20adjusted=20undo=20elements=20in=20the=20region.=0A=20=20=20= =20=20=20=20=20=20(selective-list=20(list=20nil))=0A+=20=20=20=20=20=20=20= =20(unconfined=20nil)=20=20=20;=20Whether=20to=20include=20whole=20= record=20unconditionally.=0A=20=20=20=20=20=20=20=20=20;;=20A=20list=20= of=20undo-deltas=20for=20out=20of=20region=20undo=20elements.=0A=20=20=20= =20=20=20=20=20=20undo-deltas=0A=20=20=20=20=20=20=20=20=20undo-elt)=0A= @@=20-2862,7=20+2864,10=20@@=20undo-make-selective-list=0A=20=20=20=20=20= =20=20=20((null=20undo-elt)=0A=20=20=20=20=20=20=20=20=20;;=20Don't=20= put=20two=20nils=20together=20in=20the=20list=0A=20=20=20=20=20=20=20=20=20= (when=20(car=20selective-list)=0A-=20=20=20=20=20=20=20=20=20=20(push=20= nil=20selective-list)))=0A+=20=20=20=20=20=20=20=20=20=20(push=20nil=20= selective-list))=0A+=20=20=20=20=20=20=20=20(setq=20unconfined=20nil))=0A= +=20=20=20=20=20=20=20((eq=20undo-elt=20'unconfined)=0A+=20=20=20=20=20=20= =20=20(setq=20unconfined=20t))=0A=20=20=20=20=20=20=20=20((and=20(consp=20= undo-elt)=20(eq=20(car=20undo-elt)=20t))=0A=20=20=20=20=20=20=20=20=20;;=20= This=20is=20a=20"was=20unmodified"=20element.=20=20Keep=20it=0A=20=20=20=20= =20=20=20=20=20;;=20if=20we=20have=20kept=20everything=20thus=20far.=0A= @@=20-2875,7=20+2880,7=20@@=20undo-make-selective-list=0A=20=20=20=20=20=20= =20=20(t=0A=20=20=20=20=20=20=20=20=20(let=20((adjusted-undo-elt=20= (undo-adjust-elt=20undo-elt=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20undo-deltas)))=0A-=20=20=20=20=20=20=20=20= =20=20(if=20(undo-elt-in-region=20adjusted-undo-elt=20start=20end)=0A+=20= =20=20=20=20=20=20=20=20=20(if=20(or=20(undo-elt-in-region=20= adjusted-undo-elt=20start=20end)=20unconfined)=0A=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20(progn=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20(setq=20end=20(+=20end=20(cdr=20(undo-delta=20= adjusted-undo-elt))))=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (push=20adjusted-undo-elt=20selective-list)=0Adiff=20--git=20= a/src/buffer.c=20b/src/buffer.c=0Aindex=208cb28d8aa7..978d4576df=20= 100644=0A---=20a/src/buffer.c=0A+++=20b/src/buffer.c=0A@@=20-6128,6=20= +6128,9=20@@=20from=20(abs=20POSITION).=20=20If=20POSITION=20is=20= positive,=20point=20was=20at=20the=20front=0A=20Entries=20with=20value=20= nil=20mark=20undo=20boundaries.=20=20The=20undo=20command=20treats=0A=20= the=20changes=20between=20two=20undo=20boundaries=20as=20a=20single=20= step=20to=20be=20undone.=0A=20=0A+An=20entry=20with=20the=20value=20= `unconfined'=20disables=20selective=20undo=20until=20the=0A+next=20undo=20= boundary=20even=20if=20the=20region=20is=20active.=0A+=0A=20If=20the=20= value=20of=20the=20variable=20is=20t,=20undo=20information=20is=20not=20= recorded.=20=20*/);=0A=20=0A=20=20=20DEFVAR_PER_BUFFER=20("mark-active",=20= &BVAR=20(current_buffer,=20mark_active),=20Qnil,=0A--=20=0A2.21.0=20= (Apple=20Git-122)=0A=0A= --Apple-Mail=_E55E1877-CC02-44CD-A1F1-A7B4AC3D6594-- From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 26 06:16:23 2019 Received: (at 37700) by debbugs.gnu.org; 26 Oct 2019 10:16:23 +0000 Received: from localhost ([127.0.0.1]:39709 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iOJ7O-0007BU-Bd for submit@debbugs.gnu.org; Sat, 26 Oct 2019 06:16:22 -0400 Received: from eggs.gnu.org ([209.51.188.92]:49745) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iOJ7J-0007BC-23 for 37700@debbugs.gnu.org; Sat, 26 Oct 2019 06:16:17 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:39423) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iOJ79-0007lc-5X; Sat, 26 Oct 2019 06:16:07 -0400 Received: from [176.228.60.248] (port=3647 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iOJ78-0000N1-Fg; Sat, 26 Oct 2019 06:16:06 -0400 Date: Sat, 26 Oct 2019 13:15:55 +0300 Message-Id: <83mudnvmlg.fsf@gnu.org> From: Eli Zaretskii To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= , Stefan Monnier In-reply-to: <37DDF48D-FC37-47A8-8CEC-C6EB66AB2BF7@acm.org> (message from Mattias =?utf-8?Q?Engdeg=C3=A5rd?= on Wed, 16 Oct 2019 17:27:05 +0200) Subject: Re: bug#37700: 27.0.50; undo mouse-drag-and-drop-region ineffective References: <3311689D-B1DF-4BAC-86BA-E3D2C6D2ECF1@acm.org> <94D2DE0C-8BD0-4CCF-B77D-5606A1D227DD@acm.org> <5be797bb-9d6b-cebe-edf4-21b4a5944595@gmx.at> <60b5bfa7-0aaf-40c0-3a1d-d0c0c5c662c6@gmx.at> <354ABF35-C5D0-4045-B9F0-5615A64408E6@acm.org> <83k199nasx.fsf@gnu.org> <83ftjxn94q.fsf@gnu.org> <37DDF48D-FC37-47A8-8CEC-C6EB66AB2BF7@acm.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 37700 Cc: 37700@debbugs.gnu.org, tkk@misasa.okayama-u.ac.jp, homeros.misasa@gmail.com 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 (---) > From: Mattias Engdegård > Date: Wed, 16 Oct 2019 17:27:05 +0200 > Cc: 37700@debbugs.gnu.org, tkk@misasa.okayama-u.ac.jp, > homeros.misasa@gmail.com > > After trying various approaches, the attached patch looks somewhat promising. It adds a new element type to buffer-undo-list, `unconfined', which disables selective undo for one record. Consider it a proof-of-concept. > > While it has the advantage of not requiring the user to change any settings, I still prefer the first approach (an option to disable undo confinement), as it's less intrusive and more generally useful. However, this should work as well. Thanks. I don't consider myself an expert on undo, but the patch looks reasonable to me. I think we should describe this new element in the ELisp manual, but other than that, I think it can go in. Stefan, any comments? From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 28 16:02:05 2019 Received: (at 37700) by debbugs.gnu.org; 28 Oct 2019 20:02:05 +0000 Received: from localhost ([127.0.0.1]:46396 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iPBDJ-0003Mo-1S for submit@debbugs.gnu.org; Mon, 28 Oct 2019 16:02:05 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:53880) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iPBDH-0003MH-9h for 37700@debbugs.gnu.org; Mon, 28 Oct 2019 16:02:03 -0400 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id B8DBD8126E; Mon, 28 Oct 2019 16:01:57 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 5FA84806A2; Mon, 28 Oct 2019 16:01:56 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1572292916; bh=cXw9fPch80zzARCMrw+/7I45N8ODQe2fDzEnINiO91A=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=CMylZ98yv2B9gAQ5rfXCAwUmZcMsItxT0VZUaAX8h6pMy25Z9KzMZbVgNNg9hvWvD iACO/IUgqZalpn4nqIb0tAhxbrTpyBhvnVztp6poarZ+sbgbbe58bomhNBrMItanoU uhw48oE9i9frlPQV9SzHGUFNl1oanEqeNXJHMoC05JbUXU4tvNZl0dw3X42Lr+tQ31 FelyVohW7EWCiq7t771u4X5hBlsea9QpEU6S8SHdwqrunVLXyyLXXFnqupL1wGpLok gan4I/WDvQlzgmU7x0JMmn+I+8EwvdUAr5TXgHyYNFZ9NPGpOknuqaUuL2nGGbUqQ8 oiGAvDr4HcV4A== Received: from lechazo (lechon.iro.umontreal.ca [132.204.27.242]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 14AFD12089A; Mon, 28 Oct 2019 16:01:56 -0400 (EDT) From: Stefan Monnier To: Mattias =?windows-1252?Q?Engdeg=E5rd?= Subject: Re: bug#37700: 27.0.50; undo mouse-drag-and-drop-region ineffective Message-ID: References: <3311689D-B1DF-4BAC-86BA-E3D2C6D2ECF1@acm.org> <94D2DE0C-8BD0-4CCF-B77D-5606A1D227DD@acm.org> <5be797bb-9d6b-cebe-edf4-21b4a5944595@gmx.at> <60b5bfa7-0aaf-40c0-3a1d-d0c0c5c662c6@gmx.at> <354ABF35-C5D0-4045-B9F0-5615A64408E6@acm.org> <83k199nasx.fsf@gnu.org> <83ftjxn94q.fsf@gnu.org> <37DDF48D-FC37-47A8-8CEC-C6EB66AB2BF7@acm.org> Date: Mon, 28 Oct 2019 16:01:54 -0400 In-Reply-To: <37DDF48D-FC37-47A8-8CEC-C6EB66AB2BF7@acm.org> ("Mattias \=\?windows-1252\?Q\?Engdeg\=E5rd\=22's\?\= message of "Wed, 16 Oct 2019 17:27:05 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL 0.040 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 37700 Cc: Eli Zaretskii , tkk@misasa.okayama-u.ac.jp, homeros.misasa@gmail.com, 37700@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 (-) > > On revision of writing, I often want to move a sentence around to fit > > into right place, without loosing the sentence from sight. Most of the > > time I cannot relocate the sentence to the best place by single > > drag-and-drop operation thus I want to maintain region active. > Thank you, very much my experience. Indeed, that's also my experience [ and as a result I stay away from text's drag-and-drop since I find C-w ... C-y to be easier since it avoids this trial-and-error problem ;-) ] > - (overlay-end overlay))))) > + (overlay-end overlay)))) > + ;; Since we will leave the destination text selected, > + ;; make sure an undo operation disregards the region > + ;; or the operation will only be partially undone. > + (when (consp buffer-undo-list) > + (push 'unconfined buffer-undo-list))) Rather than add a special new kind of entry you can use some version of (apply DELTA BEG END FUN-NAME . ARGS), presumably with DELTA=0 and BEG=END, so you don't need to modify the docstring of `buffer-undo-list` nor the implementation of primitive-undo. > @@ -2862,7 +2864,10 @@ undo-make-selective-list > ((null undo-elt) > ;; Don't put two nils together in the list > (when (car selective-list) > - (push nil selective-list))) > + (push nil selective-list)) > + (setq unconfined nil)) > + ((eq undo-elt 'unconfined) > + (setq unconfined t)) > ((and (consp undo-elt) (eq (car undo-elt) t)) > ;; This is a "was unmodified" element. Keep it > ;; if we have kept everything thus far. > @@ -2875,7 +2880,7 @@ undo-make-selective-list > (t > (let ((adjusted-undo-elt (undo-adjust-elt undo-elt > undo-deltas))) > - (if (undo-elt-in-region adjusted-undo-elt start end) > + (if (or (undo-elt-in-region adjusted-undo-elt start end) unconfined) > (progn > (setq end (+ end (cdr (undo-delta adjusted-undo-elt)))) > (push adjusted-undo-elt selective-list) As a user of undo-in-region, I think I'd be surprised if my undo started to modify parts of the buffer outside the region, so I think a better approach would be to only pay attention to the `unconfined' marker when it appears at the top of the `buffer-undo-list` (i.e. only if the drag-and-drop was the very last operation). Also I think it would deserve a message in the minibuffer explaining that the undo is not confined to the region. Stefan From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 30 15:09:53 2019 Received: (at 37700) by debbugs.gnu.org; 30 Oct 2019 19:09:53 +0000 Received: from localhost ([127.0.0.1]:51472 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iPtLq-0004ru-1U for submit@debbugs.gnu.org; Wed, 30 Oct 2019 15:09:50 -0400 Received: from mail203c50.megamailservers.eu ([91.136.10.213]:55262 helo=mail193c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iPtLn-0004rj-6z for 37700@debbugs.gnu.org; Wed, 30 Oct 2019 15:09:48 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1572462585; bh=dmFkd4dK8s6O9jM/FQgkVulKLxuTa+kYvs1EZs4Xibw=; h=From:Subject:Date:In-Reply-To:Cc:To:References:From; b=cmEfNJYKPzyzYw9wGPbNssVIrdhE8nzmGsAJeN9e8UqZDdVvKEUiiaikqsLnNSbu2 Y3qCNeHZy3eVJJ9a4VkUea2XIjnzYkixhrPd/9/witttfEgzlqTodphHr07cjioRRI dIEwmRsfRUEhuHXXNY4tpfxG4Oi9MjLwbqzkZJT8= Feedback-ID: mattiase@acm.or Received: from [192.168.0.4] (c188-150-171-71.bredband.comhem.se [188.150.171.71]) (authenticated bits=0) by mail193c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id x9UJ9eFZ004912; Wed, 30 Oct 2019 19:09:42 +0000 From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= Message-Id: <9FE0E2D6-E4EA-4D7C-871C-3483AC53B295@acm.org> Content-Type: multipart/mixed; boundary="Apple-Mail=_5FCBA9A8-24B8-4303-BF14-1383F574FFC1" Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: bug#37700: 27.0.50; undo mouse-drag-and-drop-region ineffective Date: Wed, 30 Oct 2019 20:09:40 +0100 In-Reply-To: To: Stefan Monnier References: <3311689D-B1DF-4BAC-86BA-E3D2C6D2ECF1@acm.org> <94D2DE0C-8BD0-4CCF-B77D-5606A1D227DD@acm.org> <5be797bb-9d6b-cebe-edf4-21b4a5944595@gmx.at> <60b5bfa7-0aaf-40c0-3a1d-d0c0c5c662c6@gmx.at> <354ABF35-C5D0-4045-B9F0-5615A64408E6@acm.org> <83k199nasx.fsf@gnu.org> <83ftjxn94q.fsf@gnu.org> <37DDF48D-FC37-47A8-8CEC-C6EB66AB2BF7@acm.org> X-Mailer: Apple Mail (2.3445.104.11) X-CTCH-RefID: str=0001.0A0B0202.5DB9DFF9.0005, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=E6OzWpVl c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=M51BFTxLslgA:10 a=iRZporoAAAAA:8 a=mh0XpIdruJMawyzGlmcA:9 a=CjuIK1q_8ugA:10 a=y2fPTyxOXttb7gH-QJsA:9 a=B2y7HmGcmWMA:10 a=m3gybRlJfkf931b4_iEA:9 a=NOBgFS-JBQ2l-kSd6-zu:22 a=pHzHmUro8NiASowvMSCR:22 a=xoEH_sTeL_Rfw54TyV31:22 X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 37700 Cc: Eli Zaretskii , tkk@misasa.okayama-u.ac.jp, homeros.misasa@gmail.com, 37700@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: -0.7 (/) --Apple-Mail=_5FCBA9A8-24B8-4303-BF14-1383F574FFC1 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii 28 okt. 2019 kl. 21.01 skrev Stefan Monnier : > Indeed, that's also my experience [ and as a result I stay away from > text's drag-and-drop since I find C-w ... C-y to be easier since it > avoids this trial-and-error problem ;-) ] Thanks for taking a look. It seems that the only happy users are those = that use redo+.el or similar packages that do not restrict undo to = region. Unfortunately, even with the patch, undoing a drag-and-drop does not = leave the region active the way it was before the undo, so the user has = to reselect the text in order to try again. Reactivating the region = automatically on undo is tempting but incompatible with undo-in-region = (the same problem but in the other direction). Partly because of this, I = believe that providing an option to disable undo-in-region altogether is = a better solution. > Rather than add a special new kind of entry you can use some version = of > (apply DELTA BEG END FUN-NAME . ARGS), presumably with DELTA=3D0 and > BEG=3DEND, so you don't need to modify the docstring of = `buffer-undo-list` > nor the implementation of primitive-undo. I'm not sure how that would be done in practice since = 'undo-elt-in-region' is nil for any (apply ...) element. This could be = remedied, of course, but that would entail undo machinery changes which = we wanted to avoid in the first place. In addition, it is unclear how = the 'apply' mechanism could be used in a way that is sensitive to = whether it's the first record to be undone. > As a user of undo-in-region, I think I'd be surprised if my undo = started > to modify parts of the buffer outside the region, so I think a better > approach would be to only pay attention to the `unconfined' marker = when > it appears at the top of the `buffer-undo-list` (i.e. only if the > drag-and-drop was the very last operation). The patch has now been modified to that effect. (I'm still not sure it's = the right solution.) > Also I think it would > deserve a message in the minibuffer explaining that the undo is not > confined to the region. It was tricky to do that cleanly, given the structure of the undo code, = so it went into a separate patch. --Apple-Mail=_5FCBA9A8-24B8-4303-BF14-1383F574FFC1 Content-Disposition: attachment; filename=0001-Don-t-confine-undo-of-mouse-drag-and-drop-to-the-reg.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-Don-t-confine-undo-of-mouse-drag-and-drop-to-the-reg.patch" Content-Transfer-Encoding: quoted-printable =46rom=20a857757e9f7d92b2acb9817399c9a4af49a4154c=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20=3D?UTF-8?q?Mattias=3D20Engdeg=3DC3=3DA5rd?=3D=20= =0ADate:=20Wed,=2016=20Oct=202019=2015:32:22=20+0200=0A= Subject:=20[PATCH=201/2]=20Don't=20confine=20undo=20of=20= mouse-drag-and-drop=20to=20the=20region=0A=20(bug#37700)=0AMIME-Version:=20= 1.0=0AContent-Type:=20text/plain;=20charset=3DUTF-8=0A= Content-Transfer-Encoding:=208bit=0A=0ASince=20the=20region=20is=20= active=20after=20a=20mouse-drag-and-drop,=20the=20change=0Acannot=20= immediately=20be=20undone.=20=20To=20get=20around=20this,=20tell=20the=20= undo=0Amachinery=20to=20ignore=20the=20region=20confinement=20for=20this=20= operation=20if=0Ait=20is=20undone=20right=20away.=0A=0A*=20= lisp/simple.el=20(primitive-undo,=20undo-make-selective-list):=0A*=20= src/buffer.c=20(buffer-undo-list):=0ANew=20`buffer-undo-list=E2=80=99=20= element=20`unconfined'.=0A*=20lisp/mouse.el=20= (mouse-drag-and-drop-region):=0AMark=20the=20operation=20as=20unconfined=20= upon=20undo.=0A---=0A=20lisp/mouse.el=20=20|=20=207=20++++++-=0A=20= lisp/simple.el=20|=2013=20+++++++++++--=0A=20src/buffer.c=20=20=20|=20=20= 4=20++++=0A=203=20files=20changed,=2021=20insertions(+),=203=20= deletions(-)=0A=0Adiff=20--git=20a/lisp/mouse.el=20b/lisp/mouse.el=0A= index=2076fec507e7..533ad606fb=20100644=0A---=20a/lisp/mouse.el=0A+++=20= b/lisp/mouse.el=0A@@=20-2657,7=20+2657,12=20@@=20= mouse-drag-and-drop-region=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20(let=20(deactivate-mark)=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20(dolist=20(overlay=20mouse-drag-and-drop-overlays)=0A=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(delete-region=20= (overlay-start=20overlay)=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(overlay-end=20= overlay)))))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(overlay-end=20= overlay))))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20;;=20= Since=20we=20will=20leave=20the=20destination=20text=20selected,=0A+=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20;;=20make=20sure=20an=20undo=20= operation=20disregards=20the=20region=0A+=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20;;=20or=20the=20operation=20will=20only=20be=20partially=20= undone.=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(when=20= (consp=20buffer-undo-list)=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20(push=20'unconfined=20buffer-undo-list)))=0A=20=20=20=20=20=20=20= =20=20=20=20=20=20;;=20When=20source=20buffer=20and=20destination=20= buffer=20are=20different,=0A=20=20=20=20=20=20=20=20=20=20=20=20=20;;=20= keep=20(set=20back=20the=20original=20text=20as=20region)=20or=20remove=20= the=0A=20=20=20=20=20=20=20=20=20=20=20=20=20;;=20original=20text.=0A= diff=20--git=20a/lisp/simple.el=20b/lisp/simple.el=0Aindex=20= 29e195bca6..83be410074=20100644=0A---=20a/lisp/simple.el=0A+++=20= b/lisp/simple.el=0A@@=20-2753,6=20+2753,7=20@@=20primitive-undo=0A=20=20=20= =20=20=20=20=20=20=20=20=20=20=20(set-marker=20marker=0A=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(-=20marker=20= offset)=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20(marker-buffer=20marker))))=0A+=20=20=20=20=20=20=20=20=20= =20(unconfined)=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20;=20= Ignore=20this=20directive=20here.=0A=20=20=20=20=20=20=20=20=20=20=20(_=20= (error=20"Unrecognized=20entry=20in=20undo=20list=20%S"=20next))))=0A=20=20= =20=20=20=20=20(setq=20arg=20(1-=20arg)))=0A=20=20=20=20=20;;=20Make=20= sure=20an=20apply=20entry=20produces=20at=20least=20one=20undo=20entry,=0A= @@=20-2855,9=20+2856,15=20@@=20undo-make-selective-list=0A=20=20=20(let=20= ((ulist=20buffer-undo-list)=0A=20=20=20=20=20=20=20=20=20;;=20A=20list=20= of=20position=20adjusted=20undo=20elements=20in=20the=20region.=0A=20=20=20= =20=20=20=20=20=20(selective-list=20(list=20nil))=0A+=20=20=20=20=20=20=20= =20(unconfined=20nil)=20=20=20;=20Whether=20to=20include=20whole=20= record=20unconditionally.=0A=20=20=20=20=20=20=20=20=20;;=20A=20list=20= of=20undo-deltas=20for=20out=20of=20region=20undo=20elements.=0A=20=20=20= =20=20=20=20=20=20undo-deltas=0A=20=20=20=20=20=20=20=20=20undo-elt)=0A+=20= =20=20=20;;=20The=20`unconfined'=20directive=20only=20applies=20to=20the=20= very=20first=20record.=0A+=20=20=20=20(pcase=20ulist=0A+=20=20=20=20=20=20= (`(nil=20unconfined=20.=20,rest)=0A+=20=20=20=20=20=20=20(setq=20= unconfined=20t)=0A+=20=20=20=20=20=20=20(setq=20ulist=20rest)))=0A=20=20=20= =20=20(while=20ulist=0A=20=20=20=20=20=20=20(when=20undo-no-redo=0A=20=20= =20=20=20=20=20=20=20(while=20(gethash=20ulist=20undo-equiv-table)=0A@@=20= -2867,7=20+2874,8=20@@=20undo-make-selective-list=0A=20=20=20=20=20=20=20= =20((null=20undo-elt)=0A=20=20=20=20=20=20=20=20=20;;=20Don't=20put=20= two=20nils=20together=20in=20the=20list=0A=20=20=20=20=20=20=20=20=20= (when=20(car=20selective-list)=0A-=20=20=20=20=20=20=20=20=20=20(push=20= nil=20selective-list)))=0A+=20=20=20=20=20=20=20=20=20=20(push=20nil=20= selective-list))=0A+=20=20=20=20=20=20=20=20(setq=20unconfined=20nil))=0A= =20=20=20=20=20=20=20=20((and=20(consp=20undo-elt)=20(eq=20(car=20= undo-elt)=20t))=0A=20=20=20=20=20=20=20=20=20;;=20This=20is=20a=20"was=20= unmodified"=20element.=20=20Keep=20it=0A=20=20=20=20=20=20=20=20=20;;=20= if=20we=20have=20kept=20everything=20thus=20far.=0A@@=20-2877,10=20= +2885,11=20@@=20undo-make-selective-list=0A=20=20=20=20=20=20=20=20;;=20= on=20finding=20them=20after=20(TEXT=20.=20POS)=20elements=0A=20=20=20=20=20= =20=20=20((markerp=20(car-safe=20undo-elt))=0A=20=20=20=20=20=20=20=20=20= nil)=0A+=20=20=20=20=20=20=20((eq=20undo-elt=20'unconfined))=20=20;=20= This=20directive=20has=20no=20further=20effect.=0A=20=20=20=20=20=20=20=20= (t=0A=20=20=20=20=20=20=20=20=20(let=20((adjusted-undo-elt=20= (undo-adjust-elt=20undo-elt=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20undo-deltas)))=0A-=20=20=20=20=20=20=20=20= =20=20(if=20(undo-elt-in-region=20adjusted-undo-elt=20start=20end)=0A+=20= =20=20=20=20=20=20=20=20=20(if=20(or=20(undo-elt-in-region=20= adjusted-undo-elt=20start=20end)=20unconfined)=0A=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20(progn=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20(setq=20end=20(+=20end=20(cdr=20(undo-delta=20= adjusted-undo-elt))))=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (push=20adjusted-undo-elt=20selective-list)=0Adiff=20--git=20= a/src/buffer.c=20b/src/buffer.c=0Aindex=2080eaa971a3..16012a97a2=20= 100644=0A---=20a/src/buffer.c=0A+++=20b/src/buffer.c=0A@@=20-6128,6=20= +6128,10=20@@=20from=20(abs=20POSITION).=20=20If=20POSITION=20is=20= positive,=20point=20was=20at=20the=20front=0A=20Entries=20with=20value=20= nil=20mark=20undo=20boundaries.=20=20The=20undo=20command=20treats=0A=20= the=20changes=20between=20two=20undo=20boundaries=20as=20a=20single=20= step=20to=20be=20undone.=0A=20=0A+An=20entry=20with=20the=20value=20= `unconfined'=20disables=20selective=20undo=20until=20the=0A+next=20undo=20= boundary=20even=20if=20the=20region=20is=20active.=20=20It=20only=20has=20= effect=0A+on=20the=20first=20record=20to=20be=20undone.=0A+=0A=20If=20= the=20value=20of=20the=20variable=20is=20t,=20undo=20information=20is=20= not=20recorded.=20=20*/);=0A=20=0A=20=20=20DEFVAR_PER_BUFFER=20= ("mark-active",=20&BVAR=20(current_buffer,=20mark_active),=20Qnil,=0A--=20= =0A2.21.0=20(Apple=20Git-122)=0A=0A= --Apple-Mail=_5FCBA9A8-24B8-4303-BF14-1383F574FFC1 Content-Disposition: attachment; filename=0002-Adapt-undo-message-when-undoing-unconfined-actions-i.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0002-Adapt-undo-message-when-undoing-unconfined-actions-i.patch" Content-Transfer-Encoding: quoted-printable =46rom=2071bc4e8352c6662458d5d18f328bd955054a91cc=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20=3D?UTF-8?q?Mattias=3D20Engdeg=3DC3=3DA5rd?=3D=20= =0ADate:=20Wed,=2030=20Oct=202019=2019:13:47=20+0100=0A= Subject:=20[PATCH=202/2]=20Adapt=20undo=20message=20when=20undoing=20= unconfined=20actions=20in=0A=20region=0A=0A*=20lisp/simple.el=20(undo):=20= Don't=20say=20"Undo=20in=20region"=20when=20the=20action=0Aundone=20= explicitly=20ignores=20region=20confinement=20(bug#37700).=0A= (undo--first-record-unconfined):=20New.=0A(undo-make-selective-list):=20= Use=20undo--first-record-unconfined.=0A---=0A=20lisp/simple.el=20|=2037=20= ++++++++++++++++++++++++-------------=0A=201=20file=20changed,=2024=20= insertions(+),=2013=20deletions(-)=0A=0Adiff=20--git=20a/lisp/simple.el=20= b/lisp/simple.el=0Aindex=2083be410074..e08c9b6a89=20100644=0A---=20= a/lisp/simple.el=0A+++=20b/lisp/simple.el=0A@@=20-2508,6=20+2508,8=20@@=20= undo=0A=20=09=20(base-buffer=20(or=20(buffer-base-buffer)=20= (current-buffer)))=0A=20=09=20(recent-save=20(with-current-buffer=20= base-buffer=0A=20=09=09=09(recent-auto-save-p)))=0A+=20=20=20=20=20=20=20= =20=20(unconfined=20nil)=0A+=20=20=20=20=20=20=20=20=20(count=20(if=20= (numberp=20arg)=20(prefix-numeric-value=20arg)=201))=0A=20=09=20message)=0A= =20=20=20=20=20;;=20If=20we=20get=20an=20error=20in=20undo-start,=0A=20=20= =20=20=20;;=20the=20next=20command=20should=20not=20be=20a=20= "consecutive=20undo".=0A@@=20-2527,7=20+2529,9=20@@=20undo=0A=20=20=20=20= =20=20=20(setq=20undo-in-region=0A=20=09=20=20=20=20(or=20= (region-active-p)=20(and=20arg=20(not=20(numberp=20arg)))))=0A=20=20=20=20= =20=20=20(if=20undo-in-region=0A-=09=20=20(undo-start=20= (region-beginning)=20(region-end))=0A+=20=20=20=20=20=20=20=20=20=20= (progn=0A+=20=20=20=20=20=20=20=20=20=20=20=20(setq=20unconfined=20= (undo--first-record-unconfined=20buffer-undo-list))=0A+=20=20=20=20=20=20= =20=20=20=20=20=20(undo-start=20(region-beginning)=20(region-end)))=0A=20= =09(undo-start))=0A=20=20=20=20=20=20=20;;=20get=20rid=20of=20initial=20= undo=20boundary=0A=20=20=20=20=20=20=20(undo-more=201))=0A@@=20-2537,20=20= +2541,20=20@@=20undo=0A=20=20=20=20=20;;=20so,=20ask=20the=20user=20= whether=20she=20wants=20to=20skip=20the=20redo/undo=20pair.=0A=20=20=20=20= =20(let=20((equiv=20(gethash=20pending-undo-list=20undo-equiv-table)))=0A= =20=20=20=20=20=20=20(or=20(eq=20(selected-window)=20= (minibuffer-window))=0A-=09=20=20(setq=20message=20(format=20"%s%s"=0A-=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20(if=20(or=20undo-no-redo=20(not=20equiv))=0A-=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20"Undo"=20"Redo")=0A-=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(if=20= undo-in-region=20"=20in=20region"=20""))))=0A+=09=20=20(setq=20message=20= (concat=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20(if=20(or=20undo-no-redo=20(not=20equiv))=0A+=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= "Undo"=20"Redo")=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20(cond=20((and=20unconfined=20(>=20count=201))=0A+=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20"=20in=20region=20(except=20first=20action)")=0A+=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20((and=20undo-in-region=20(not=20unconfined))=0A+=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20"=20in=20region")))))=0A=20=20=20=20=20=20=20(when=20(and=20(consp=20= equiv)=20undo-no-redo)=0A=20=09;;=20The=20equiv=20entry=20might=20point=20= to=20another=20redo=20record=20if=20we=20have=20done=0A=20=09;;=20= undo-redo-undo-redo-...=20so=20skip=20to=20the=20very=20last=20equiv.=0A=20= =09(while=20(let=20((next=20(gethash=20equiv=20undo-equiv-table)))=0A=20=09= =09=20(if=20next=20(setq=20equiv=20next))))=0A=20=09(setq=20= pending-undo-list=20equiv)))=0A-=20=20=20=20(undo-more=0A-=20=20=20=20=20= (if=20(numberp=20arg)=0A-=09=20(prefix-numeric-value=20arg)=0A-=20=20=20=20= =20=20=201))=0A+=20=20=20=20(undo-more=20count)=0A=20=20=20=20=20;;=20= Record=20the=20fact=20that=20the=20just-generated=20undo=20records=20= come=20from=20an=0A=20=20=20=20=20;;=20undo=20operation--that=20is,=20= they=20are=20redo=20records.=0A=20=20=20=20=20;;=20In=20the=20ordinary=20= case=20(not=20within=20a=20region),=20map=20the=20redo=0A@@=20-2847,6=20= +2851,13=20@@=20undo-start=0A=20;;=20"ccaabad",=20as=20though=20the=20= first=20"d"=20became=20detached=20from=20the=0A=20;;=20original=20"ddd"=20= insertion.=20=20This=20quirk=20is=20a=20FIXME.=0A=20=0A+(defun=20= undo--first-record-unconfined=20(undo-list)=0A+=20=20"If=20the=20first=20= record=20of=20UNDO-LIST=20is=20marked=20unconfined,=20return=20the=20= argument=0A+without=20the=20leading=20`unconfined'=20directive;=20= otherwise=20nil."=0A+=20=20(pcase=20undo-list=0A+=20=20=20=20(`(nil=20= unconfined=20.=20,rest)=0A+=20=20=20=20=20rest)))=0A+=0A=20(defun=20= undo-make-selective-list=20(start=20end)=0A=20=20=20"Return=20a=20list=20= of=20undo=20elements=20for=20the=20region=20START=20to=20END.=0A=20The=20= elements=20come=20from=20`buffer-undo-list',=20but=20we=20keep=20only=20= the=0A@@=20-2861,10=20+2872,10=20@@=20undo-make-selective-list=0A=20=20=20= =20=20=20=20=20=20undo-deltas=0A=20=20=20=20=20=20=20=20=20undo-elt)=0A=20= =20=20=20=20;;=20The=20`unconfined'=20directive=20only=20applies=20to=20= the=20very=20first=20record.=0A-=20=20=20=20(pcase=20ulist=0A-=20=20=20=20= =20=20(`(nil=20unconfined=20.=20,rest)=0A-=20=20=20=20=20=20=20(setq=20= unconfined=20t)=0A-=20=20=20=20=20=20=20(setq=20ulist=20rest)))=0A+=20=20= =20=20(let=20((ul=20(undo--first-record-unconfined=20ulist)))=0A+=20=20=20= =20=20=20(when=20ul=0A+=20=20=20=20=20=20=20=20(setq=20ulist=20ul)=0A+=20= =20=20=20=20=20=20=20(setq=20unconfined=20t)))=0A=20=20=20=20=20(while=20= ulist=0A=20=20=20=20=20=20=20(when=20undo-no-redo=0A=20=20=20=20=20=20=20= =20=20(while=20(gethash=20ulist=20undo-equiv-table)=0A--=20=0A2.21.0=20= (Apple=20Git-122)=0A=0A= --Apple-Mail=_5FCBA9A8-24B8-4303-BF14-1383F574FFC1-- From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 30 15:56:55 2019 Received: (at 37700) by debbugs.gnu.org; 30 Oct 2019 19:56:55 +0000 Received: from localhost ([127.0.0.1]:51535 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iPu5O-00089j-Un for submit@debbugs.gnu.org; Wed, 30 Oct 2019 15:56:55 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:46111) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iPu5N-00089U-4E for 37700@debbugs.gnu.org; Wed, 30 Oct 2019 15:56:53 -0400 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id AFD7044965E; Wed, 30 Oct 2019 15:56:47 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 61520449659; Wed, 30 Oct 2019 15:56:46 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1572465406; bh=iumOh54ClUUlsf5pkFDqNyjNiYUUpnhJGjWqkrjaNG8=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=QY2WUWjeinC2DQqVuYGEAQx93DlH1t13dEItvHX1fI1C0F9x73Jr79qz1fIfynvBR bEx5sJQHXT+QzgOFAhJE77Whv+3Mab7Te4czNuJ5pEmeqdFrLgtSsTB3D0pTWTiQgO sOKsqVe9D0k4uzsIfOGjYWCmvWvvFGOf562PE8XL/aTEK9+zSeW8FYkpO4iP4ugC1E dft6N/piI3AqKmxIcewJ19tNU21uddqQPtdjFbE1qp8TU3Jp8LVY6O9iaS0BpScRG4 KrPmYg8DGDutCbt9l76jqQKUnKZIqoEUK28aFw3HNWnEClqTEcqAOPaY+XFDWejWYK 4ZswTbyznS/JQ== Received: from lechazo (lechon.iro.umontreal.ca [132.204.27.242]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 23DAB12066A; Wed, 30 Oct 2019 15:56:46 -0400 (EDT) From: Stefan Monnier To: Mattias =?windows-1252?Q?Engdeg=E5rd?= Subject: Re: bug#37700: 27.0.50; undo mouse-drag-and-drop-region ineffective Message-ID: References: <3311689D-B1DF-4BAC-86BA-E3D2C6D2ECF1@acm.org> <94D2DE0C-8BD0-4CCF-B77D-5606A1D227DD@acm.org> <5be797bb-9d6b-cebe-edf4-21b4a5944595@gmx.at> <60b5bfa7-0aaf-40c0-3a1d-d0c0c5c662c6@gmx.at> <354ABF35-C5D0-4045-B9F0-5615A64408E6@acm.org> <83k199nasx.fsf@gnu.org> <83ftjxn94q.fsf@gnu.org> <37DDF48D-FC37-47A8-8CEC-C6EB66AB2BF7@acm.org> <9FE0E2D6-E4EA-4D7C-871C-3483AC53B295@acm.org> Date: Wed, 30 Oct 2019 15:56:44 -0400 In-Reply-To: <9FE0E2D6-E4EA-4D7C-871C-3483AC53B295@acm.org> ("Mattias \=\?windows-1252\?Q\?Engdeg\=E5rd\=22's\?\= message of "Wed, 30 Oct 2019 20:09:40 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.090 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 37700 Cc: Eli Zaretskii , tkk@misasa.okayama-u.ac.jp, homeros.misasa@gmail.com, 37700@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 (-) > Unfortunately, even with the patch, undoing a drag-and-drop does not leave > the region active the way it was before the undo, so the user has to > reselect the text in order to try again. If the undo-list is built right, reselecting the text should be just `C-x C-x`, which isn't that bad. > Partly because of this, I believe that providing an option to disable > undo-in-region altogether is a better solution. I agree that disabling it right after a drag-and-drop is a better choice. > I'm not sure how that would be done in practice since 'undo-elt-in-region' > is nil for any (apply ...) element. This could be remedied, of course, but > that would entail undo machinery changes which we wanted to avoid in the > first place. Yes, that's a long-standing missing feature, but I think it's orthogonal to the current problem. > In addition, it is unclear how the 'apply' mechanism could be used in > a way that is sensitive to whether it's the first record to be undone. With ad-hoc code looking for it at the beginning of `undo`. But now that I think about it, maybe a better option would be to check (when (symbolp last-command) (get last-command 'undo-inhibit-region)) and then put the `undo-inhibit-region` property on `mouse-drag-and-drop-region`. Of course, I wouldn't oppose adding (defcustom undo-use-region-when-active t ...) so users can turn it off, but I think it's more important to make sure that users never need to set such a var to nil. Stefan From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 31 07:00:20 2019 Received: (at 37700) by debbugs.gnu.org; 31 Oct 2019 11:00:20 +0000 Received: from localhost ([127.0.0.1]:52174 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iQ8Bf-0002hZ-6X for submit@debbugs.gnu.org; Thu, 31 Oct 2019 07:00:20 -0400 Received: from mail214c50.megamailservers.eu ([91.136.10.224]:35890 helo=mail193c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iQ8Bb-0002hK-Sv for 37700@debbugs.gnu.org; Thu, 31 Oct 2019 07:00:17 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1572519613; bh=X91cLoZYqiYQ5bvb4u2dDwmwrf/2lgG2GCix6Db2cKU=; h=From:Subject:Date:In-Reply-To:Cc:To:References:From; b=UWGMWjItZsC8xoO5rUx8z7eFZfAKrUjZBwCgzrVWf5mn/YgTHk7CLtUt5DDtqBDuE 6USlI1OI8auOQ27BqsTaasDtJM32RIlEMO/C+3YX0tqQERGnHffr5SHXf6+wApj2zd iTYn6P5s3UFMr7GxeIIeLZlpRWdw3TTAEfclfxww= Feedback-ID: mattiase@acm.or Received: from [192.168.0.4] (c188-150-171-71.bredband.comhem.se [188.150.171.71]) (authenticated bits=0) by mail193c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id x9VB09Fw003612; Thu, 31 Oct 2019 11:00:11 +0000 From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= Message-Id: <41286005-259E-4B78-A1FF-746E7A753FB4@acm.org> Content-Type: multipart/mixed; boundary="Apple-Mail=_E8D8FF12-557E-47AB-8541-070984B8223E" Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: bug#37700: 27.0.50; undo mouse-drag-and-drop-region ineffective Date: Thu, 31 Oct 2019 12:00:08 +0100 In-Reply-To: To: Stefan Monnier References: <3311689D-B1DF-4BAC-86BA-E3D2C6D2ECF1@acm.org> <94D2DE0C-8BD0-4CCF-B77D-5606A1D227DD@acm.org> <5be797bb-9d6b-cebe-edf4-21b4a5944595@gmx.at> <60b5bfa7-0aaf-40c0-3a1d-d0c0c5c662c6@gmx.at> <354ABF35-C5D0-4045-B9F0-5615A64408E6@acm.org> <83k199nasx.fsf@gnu.org> <83ftjxn94q.fsf@gnu.org> <37DDF48D-FC37-47A8-8CEC-C6EB66AB2BF7@acm.org> <9FE0E2D6-E4EA-4D7C-871C-3483AC53B295@acm.org> X-Mailer: Apple Mail (2.3445.104.11) X-CTCH-RefID: str=0001.0A0B0203.5DBABEBD.0022, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=E6OzWpVl c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=M51BFTxLslgA:10 a=iRZporoAAAAA:8 a=YmJ1QbaXYM7_DmfyeRkA:9 a=7Zwj6sZBwVKJAoWSPKxL6X1jA+E=:19 a=CjuIK1q_8ugA:10 a=3oNa4d-4bLNXx0iRRUUA:9 a=B2y7HmGcmWMA:10 a=NOBgFS-JBQ2l-kSd6-zu:22 a=pHzHmUro8NiASowvMSCR:22 a=xoEH_sTeL_Rfw54TyV31:22 X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 37700 Cc: Eli Zaretskii , tkk@misasa.okayama-u.ac.jp, homeros.misasa@gmail.com, 37700@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: -0.7 (/) --Apple-Mail=_E8D8FF12-557E-47AB-8541-070984B8223E Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii 30 okt. 2019 kl. 20.56 skrev Stefan Monnier : >=20 >> Unfortunately, even with the patch, undoing a drag-and-drop does not = leave >> the region active the way it was before the undo, so the user has to >> reselect the text in order to try again. >=20 > If the undo-list is built right, reselecting the text should be just > `C-x C-x`, which isn't that bad. Right, second nature to the Emacs user, but it would still be nice not = having to go through that step. kill-region and delete-selection-mode = are similarly affected. > But now that I think about it, maybe a better option would be to check >=20 > (when (symbolp last-command) > (get last-command 'undo-inhibit-region)) >=20 > and then put the `undo-inhibit-region` property on > `mouse-drag-and-drop-region`. Thank you, this looks like the best idea so far. A very simple change, = yet effective in practice. Not perfect --- last-command is not = buffer-local, and even switching to a different frame and back will = change it --- but good enough. Patch attached. --Apple-Mail=_E8D8FF12-557E-47AB-8541-070984B8223E Content-Disposition: attachment; filename=0001-Inhibit-undo-in-region-for-mouse-drag-region-bug-377.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-Inhibit-undo-in-region-for-mouse-drag-region-bug-377.patch" Content-Transfer-Encoding: quoted-printable =46rom=207cf5f680ab1d933fe1cecb862afa3b0976045f1d=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20=3D?UTF-8?q?Mattias=3D20Engdeg=3DC3=3DA5rd?=3D=20= =0ADate:=20Thu,=2031=20Oct=202019=2010:31:27=20+0100=0A= Subject:=20[PATCH]=20Inhibit=20undo-in-region=20for=20mouse-drag-region=20= (bug#37700)=0A=0A'mouse-drag-region'=20leaves=20the=20region=20active=20= around=20the=20dragged=20text,=0Aso=20a=20straight=20undo=20did=20not=20= revert=20the=20entire=20operation.=20=20To=20remedy=0Athis,=20inhibit=20= undo-in-region=20when=20the=20last=20command=20was=0Amouse-drag-region.=20= =20(Method=20suggested=20by=20Stefan=20Monnier.)=0A=0A*=20lisp/mouse.el=20= (undo-drag-region):=20Set=20the=20undo-inhibit-region=20property.=0A*=20= lisp/simple.el=20(undo):=20Inhibit=20undo-in-region=20if=20the=20last=20= command=0Ahad=20the=20undo-inhibit-region=20property=20set.=0A---=0A=20= lisp/mouse.el=20=20|=206=20++++++=0A=20lisp/simple.el=20|=207=20++++++-=0A= =202=20files=20changed,=2012=20insertions(+),=201=20deletion(-)=0A=0A= diff=20--git=20a/lisp/mouse.el=20b/lisp/mouse.el=0Aindex=20= 76fec507e7..4a351f7be2=20100644=0A---=20a/lisp/mouse.el=0A+++=20= b/lisp/mouse.el=0A@@=20-1104,6=20+1104,12=20@@=20mouse-drag-region=0A=20=20= =20=20=20(run-hooks=20'mouse-leave-buffer-hook)=0A=20=20=20=20=20= (mouse-drag-track=20start-event)))=0A=20=0A+;;=20Inhibit=20the=20= region-confinement=20when=20undoing=20mouse-drag-region=0A+;;=20= immediately=20after=20the=20command.=20=20Otherwise,=20the=20selection=20= left=0A+;;=20active=20around=20the=20dragged=20text=20would=20prevent=20= an=20undo=20of=20the=20whole=0A+;;=20operation.=0A+(put=20= 'mouse-drag-region=20'undo-inhibit-region=20t)=0A+=0A=20(defun=20= mouse-posn-property=20(pos=20property)=0A=20=20=20"Look=20for=20a=20= property=20at=20click=20position.=0A=20POS=20may=20be=20either=20a=20= buffer=20position=20or=20a=20click=20position=20like=0Adiff=20--git=20= a/lisp/simple.el=20b/lisp/simple.el=0Aindex=2029e195bca6..10aecd651f=20= 100644=0A---=20a/lisp/simple.el=0A+++=20b/lisp/simple.el=0A@@=20-2508,6=20= +2508,10=20@@=20undo=0A=20=09=20(base-buffer=20(or=20= (buffer-base-buffer)=20(current-buffer)))=0A=20=09=20(recent-save=20= (with-current-buffer=20base-buffer=0A=20=09=09=09(recent-auto-save-p)))=0A= +=20=20=20=20=20=20=20=20=20;;=20Allow=20certain=20commands=20to=20= inhibit=20an=20immediately=20following=0A+=20=20=20=20=20=20=20=20=20;;=20= undo-in-region.=0A+=20=20=20=20=20=20=20=20=20(inhibit-region=20(and=20= (symbolp=20last-command)=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(get=20last-command=20= 'undo-inhibit-region)))=0A=20=09=20message)=0A=20=20=20=20=20;;=20If=20= we=20get=20an=20error=20in=20undo-start,=0A=20=20=20=20=20;;=20the=20= next=20command=20should=20not=20be=20a=20"consecutive=20undo".=0A@@=20= -2525,7=20+2529,8=20@@=20undo=0A=20=09=09=20=20=20=20=20=20=20;;=20it=20= shows=20nothing=20else=20happened=20in=20between.=0A=20=09=09=20=20=20=20= =20=20=20(gethash=20list=20undo-equiv-table))))=0A=20=20=20=20=20=20=20= (setq=20undo-in-region=0A-=09=20=20=20=20(or=20(region-active-p)=20(and=20= arg=20(not=20(numberp=20arg)))))=0A+=09=20=20=20=20(and=20(or=20= (region-active-p)=20(and=20arg=20(not=20(numberp=20arg))))=0A+=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20(not=20inhibit-region)))=0A=20=20=20= =20=20=20=20(if=20undo-in-region=0A=20=09=20=20(undo-start=20= (region-beginning)=20(region-end))=0A=20=09(undo-start))=0A--=20=0A= 2.21.0=20(Apple=20Git-122)=0A=0A= --Apple-Mail=_E8D8FF12-557E-47AB-8541-070984B8223E-- From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 31 10:45:51 2019 Received: (at 37700) by debbugs.gnu.org; 31 Oct 2019 14:45:51 +0000 Received: from localhost ([127.0.0.1]:54023 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iQBhv-000834-5J for submit@debbugs.gnu.org; Thu, 31 Oct 2019 10:45:51 -0400 Received: from eggs.gnu.org ([209.51.188.92]:41666) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iQBhs-00082r-Nr for 37700@debbugs.gnu.org; Thu, 31 Oct 2019 10:45:50 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:54579) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iQBhl-0001RH-I9; Thu, 31 Oct 2019 10:45:41 -0400 Received: from [176.228.60.248] (port=2958 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iQBhk-0007wy-6J; Thu, 31 Oct 2019 10:45:41 -0400 Date: Thu, 31 Oct 2019 16:45:40 +0200 Message-Id: <83d0ednfcb.fsf@gnu.org> From: Eli Zaretskii To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= In-reply-to: <41286005-259E-4B78-A1FF-746E7A753FB4@acm.org> (message from Mattias =?utf-8?Q?Engdeg=C3=A5rd?= on Thu, 31 Oct 2019 12:00:08 +0100) Subject: Re: bug#37700: 27.0.50; undo mouse-drag-and-drop-region ineffective References: <3311689D-B1DF-4BAC-86BA-E3D2C6D2ECF1@acm.org> <94D2DE0C-8BD0-4CCF-B77D-5606A1D227DD@acm.org> <5be797bb-9d6b-cebe-edf4-21b4a5944595@gmx.at> <60b5bfa7-0aaf-40c0-3a1d-d0c0c5c662c6@gmx.at> <354ABF35-C5D0-4045-B9F0-5615A64408E6@acm.org> <83k199nasx.fsf@gnu.org> <83ftjxn94q.fsf@gnu.org> <37DDF48D-FC37-47A8-8CEC-C6EB66AB2BF7@acm.org> <9FE0E2D6-E4EA-4D7C-871C-3483AC53B295@acm.org> <41286005-259E-4B78-A1FF-746E7A753FB4@acm.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 37700 Cc: 37700@debbugs.gnu.org, tkk@misasa.okayama-u.ac.jp, homeros.misasa@gmail.com, monnier@iro.umontreal.ca 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 (---) > From: Mattias Engdegård > Date: Thu, 31 Oct 2019 12:00:08 +0100 > Cc: Eli Zaretskii , 37700@debbugs.gnu.org, > tkk@misasa.okayama-u.ac.jp, homeros.misasa@gmail.com > > > But now that I think about it, maybe a better option would be to check > > > > (when (symbolp last-command) > > (get last-command 'undo-inhibit-region)) > > > > and then put the `undo-inhibit-region` property on > > `mouse-drag-and-drop-region`. > > Thank you, this looks like the best idea so far. A very simple change, yet effective in practice. Not perfect --- last-command is not buffer-local, and even switching to a different frame and back will change it --- but good enough. > > Patch attached. Fine with me (I proposed something like this during the original discussion), but please document this property in the ELisp manual. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 31 12:04:50 2019 Received: (at 37700) by debbugs.gnu.org; 31 Oct 2019 16:04:50 +0000 Received: from localhost ([127.0.0.1]:54108 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iQCwL-0001dv-QU for submit@debbugs.gnu.org; Thu, 31 Oct 2019 12:04:50 -0400 Received: from mail226c50.megamailservers.eu ([91.136.10.236]:45628 helo=mail36c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iQCwJ-0001dj-TP for 37700@debbugs.gnu.org; Thu, 31 Oct 2019 12:04:49 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1572537886; bh=3tEVGKPFdyUj+u5qctW27o2mDH96aCGG5tST5RFXZp4=; h=From:Subject:Date:In-Reply-To:Cc:To:References:From; b=KXVROGKi+W/wde2Mp8Enj57NsF8QXb71lwrjBQY5943L05LkhAMpKOW9XzQgghuUj Avbgkb8q+3xh8uwsWvCD9ptbrMZlLsUhatE8ULXEY9UJgcUw2u5zhkNlso2/kBYCMi Y6HI1ltU6LFAU3U9RuqsGllDnKApAeI9oCZPuegY= Feedback-ID: mattiase@acm.or Received: from [192.168.0.4] (c188-150-171-71.bredband.comhem.se [188.150.171.71]) (authenticated bits=0) by mail36c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id x9VG4fTH001161; Thu, 31 Oct 2019 16:04:43 +0000 From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= Message-Id: <4E95A327-1B10-46FA-B08F-1877417230A8@acm.org> Content-Type: multipart/mixed; boundary="Apple-Mail=_DFBB248B-8B3F-47CE-B1FE-7CECC4C5AE6F" Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: bug#37700: 27.0.50; undo mouse-drag-and-drop-region ineffective Date: Thu, 31 Oct 2019 17:04:41 +0100 In-Reply-To: <83d0ednfcb.fsf@gnu.org> To: Eli Zaretskii References: <3311689D-B1DF-4BAC-86BA-E3D2C6D2ECF1@acm.org> <94D2DE0C-8BD0-4CCF-B77D-5606A1D227DD@acm.org> <5be797bb-9d6b-cebe-edf4-21b4a5944595@gmx.at> <60b5bfa7-0aaf-40c0-3a1d-d0c0c5c662c6@gmx.at> <354ABF35-C5D0-4045-B9F0-5615A64408E6@acm.org> <83k199nasx.fsf@gnu.org> <83ftjxn94q.fsf@gnu.org> <37DDF48D-FC37-47A8-8CEC-C6EB66AB2BF7@acm.org> <9FE0E2D6-E4EA-4D7C-871C-3483AC53B295@acm.org> <41286005-259E-4B78-A1FF-746E7A753FB4@acm.org> <83d0ednfcb.fsf@gnu.org> X-Mailer: Apple Mail (2.3445.104.11) X-CTCH-RefID: str=0001.0A0B0213.5DBB061D.0068, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=bd8Vr9HB c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=M51BFTxLslgA:10 a=mDV3o1hIAAAA:8 a=ZBOFQe2d8nedwhVVqBAA:9 a=CjuIK1q_8ugA:10 a=ncZ9vwaUYPMA:10 a=7FFjzvW99H7Qq_pC1ZMA:9 a=7Zwj6sZBwVKJAoWSPKxL6X1jA+E=:19 a=B2y7HmGcmWMA:10 a=_FVE-zBwftR9WsbkzFJk:22 a=pHzHmUro8NiASowvMSCR:22 a=xoEH_sTeL_Rfw54TyV31:22 X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 37700 Cc: 37700@debbugs.gnu.org, tkk@misasa.okayama-u.ac.jp, homeros.misasa@gmail.com, monnier@iro.umontreal.ca 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: -0.7 (/) --Apple-Mail=_DFBB248B-8B3F-47CE-B1FE-7CECC4C5AE6F Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii 31 okt. 2019 kl. 15.45 skrev Eli Zaretskii : > Fine with me (I proposed something like this during the original > discussion), but please document this property in the ELisp manual. Then I apologise for misunderstanding you! Attached patch amended with changes to the manual and NEWS. --Apple-Mail=_DFBB248B-8B3F-47CE-B1FE-7CECC4C5AE6F Content-Disposition: attachment; filename=0001-Inhibit-undo-in-region-for-mouse-drag-region-bug-377.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-Inhibit-undo-in-region-for-mouse-drag-region-bug-377.patch" Content-Transfer-Encoding: quoted-printable =46rom=20808f466b5f7c779c41a6e03b177906d79a16e66a=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20=3D?UTF-8?q?Mattias=3D20Engdeg=3DC3=3DA5rd?=3D=20= =0ADate:=20Thu,=2031=20Oct=202019=2010:31:27=20+0100=0A= Subject:=20[PATCH]=20Inhibit=20undo-in-region=20for=20mouse-drag-region=20= (bug#37700)=0A=0A'mouse-drag-region'=20leaves=20the=20region=20active=20= around=20the=20dragged=20text,=0Aso=20a=20straight=20undo=20did=20not=20= revert=20the=20entire=20operation.=20=20To=20remedy=0Athis,=20inhibit=20= undo-in-region=20when=20the=20last=20command=20was=0Amouse-drag-region.=20= =20(Method=20suggested=20by=20Stefan=20Monnier.)=0A=0A*=20lisp/mouse.el=20= (undo-drag-region):=20Set=20the=20undo-inhibit-region=20property.=0A*=20= lisp/simple.el=20(undo):=20Inhibit=20undo-in-region=20if=20the=20last=20= command=0Ahad=20the=20undo-inhibit-region=20property=20set.=0A*=20= doc/lispref/symbols.texi=20(Standard=20Properties):=0A*=20= doc/lispref/text.texi=20(Undo):=20Document=20undo-inhibit-region.=0A*=20= etc/NEWS:=20Announce=20the=20property.=0A---=0A=20= doc/lispref/symbols.texi=20|=205=20+++++=0A=20doc/lispref/text.texi=20=20= =20=20|=206=20++++++=0A=20etc/NEWS=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20|=206=20++++++=0A=20lisp/mouse.el=20=20=20=20=20=20=20=20=20=20= =20=20|=206=20++++++=0A=20lisp/simple.el=20=20=20=20=20=20=20=20=20=20=20= |=207=20++++++-=0A=205=20files=20changed,=2029=20insertions(+),=201=20= deletion(-)=0A=0Adiff=20--git=20a/doc/lispref/symbols.texi=20= b/doc/lispref/symbols.texi=0Aindex=205d71fb39a2..6d3a89a54b=20100644=0A= ---=20a/doc/lispref/symbols.texi=0A+++=20b/doc/lispref/symbols.texi=0A@@=20= -594,4=20+594,9=20@@=20Standard=20Properties=0A=20If=20non-@code{nil},=20= this=20specifies=20the=20named=20variable's=20documentation=0A=20string.=20= =20This=20is=20set=20automatically=20by=20@code{defvar}=20and=20related=0A= =20functions.=20=20@xref{Defining=20Faces}.=0A+=0A+@item=20= undo-inhibit-region=0A+If=20non-@code{nil},=20the=20named=20function=20= prevents=20the=20@code{undo}=20operation=0A+from=20being=20restricted=20= to=20the=20active=20region,=20if=20@code{undo}=20is=20invoked=0A= +immediately=20after=20the=20function.=20=20@xref{Undo}.=0A=20@end=20= table=0Adiff=20--git=20a/doc/lispref/text.texi=20b/doc/lispref/text.texi=0A= index=20ac444f6afe..9f3238e8aa=20100644=0A---=20a/doc/lispref/text.texi=0A= +++=20b/doc/lispref/text.texi=0A@@=20-1451,6=20+1451,12=20@@=20Undo=0A=20= This=20function=20does=20not=20bind=20@code{undo-in-progress}.=0A=20@end=20= defun=0A=20=0A+Some=20commands=20leave=20the=20region=20active=20after=20= execution=20in=20such=20a=20way=20that=0A+it=20interferes=20with=20= selective=20undo=20of=20that=20command.=20=20To=20make=20@code{undo}=0A= +ignore=20the=20active=20region=20when=20invoked=20immediately=20after=20= such=20a=20command,=0A+set=20the=20property=20@code{undo-inhibit-region}=20= of=20the=20command's=20function=0A+symbol=20to=20a=20non-nil=20value.=0A= +=0A=20@node=20Maintaining=20Undo=0A=20@section=20Maintaining=20Undo=20= Lists=0A=20=0Adiff=20--git=20a/etc/NEWS=20b/etc/NEWS=0Aindex=20= ee73d2414b..030246db40=20100644=0A---=20a/etc/NEWS=0A+++=20b/etc/NEWS=0A= @@=20-3102,6=20+3102,12=20@@=20in=20other=20packages=20are=20now=20= obsolete=20aliases=20of=20'xor'.=0A=20Setting=20this=20on=20the=20first=20= character=20of=20a=20help=20string=20disables=0A=20conversions=20via=20= 'substitute-command-keys'.=0A=20=0A++++=0A+**=20'undo'=20can=20be=20made=20= to=20ignore=20the=20active=20region=20for=20a=20command=0A+by=20setting=20= its=20'undo-inhibit-region'=20symbol=20property=20to=20non-nil.=0A+This=20= is=20used=20by=20'mouse-drag-region'=20to=20make=20that=20command's=20= effect=0A+easier=20to=20undo=20immediately=20afterwards.=0A+=0A=20=0C=0A=20= *=20Changes=20in=20Emacs=2027.1=20on=20Non-Free=20Operating=20Systems=0A=20= =0Adiff=20--git=20a/lisp/mouse.el=20b/lisp/mouse.el=0Aindex=20= 76fec507e7..4a351f7be2=20100644=0A---=20a/lisp/mouse.el=0A+++=20= b/lisp/mouse.el=0A@@=20-1104,6=20+1104,12=20@@=20mouse-drag-region=0A=20=20= =20=20=20(run-hooks=20'mouse-leave-buffer-hook)=0A=20=20=20=20=20= (mouse-drag-track=20start-event)))=0A=20=0A+;;=20Inhibit=20the=20= region-confinement=20when=20undoing=20mouse-drag-region=0A+;;=20= immediately=20after=20the=20command.=20=20Otherwise,=20the=20selection=20= left=0A+;;=20active=20around=20the=20dragged=20text=20would=20prevent=20= an=20undo=20of=20the=20whole=0A+;;=20operation.=0A+(put=20= 'mouse-drag-region=20'undo-inhibit-region=20t)=0A+=0A=20(defun=20= mouse-posn-property=20(pos=20property)=0A=20=20=20"Look=20for=20a=20= property=20at=20click=20position.=0A=20POS=20may=20be=20either=20a=20= buffer=20position=20or=20a=20click=20position=20like=0Adiff=20--git=20= a/lisp/simple.el=20b/lisp/simple.el=0Aindex=2029e195bca6..10aecd651f=20= 100644=0A---=20a/lisp/simple.el=0A+++=20b/lisp/simple.el=0A@@=20-2508,6=20= +2508,10=20@@=20undo=0A=20=09=20(base-buffer=20(or=20= (buffer-base-buffer)=20(current-buffer)))=0A=20=09=20(recent-save=20= (with-current-buffer=20base-buffer=0A=20=09=09=09(recent-auto-save-p)))=0A= +=20=20=20=20=20=20=20=20=20;;=20Allow=20certain=20commands=20to=20= inhibit=20an=20immediately=20following=0A+=20=20=20=20=20=20=20=20=20;;=20= undo-in-region.=0A+=20=20=20=20=20=20=20=20=20(inhibit-region=20(and=20= (symbolp=20last-command)=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(get=20last-command=20= 'undo-inhibit-region)))=0A=20=09=20message)=0A=20=20=20=20=20;;=20If=20= we=20get=20an=20error=20in=20undo-start,=0A=20=20=20=20=20;;=20the=20= next=20command=20should=20not=20be=20a=20"consecutive=20undo".=0A@@=20= -2525,7=20+2529,8=20@@=20undo=0A=20=09=09=20=20=20=20=20=20=20;;=20it=20= shows=20nothing=20else=20happened=20in=20between.=0A=20=09=09=20=20=20=20= =20=20=20(gethash=20list=20undo-equiv-table))))=0A=20=20=20=20=20=20=20= (setq=20undo-in-region=0A-=09=20=20=20=20(or=20(region-active-p)=20(and=20= arg=20(not=20(numberp=20arg)))))=0A+=09=20=20=20=20(and=20(or=20= (region-active-p)=20(and=20arg=20(not=20(numberp=20arg))))=0A+=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20(not=20inhibit-region)))=0A=20=20=20= =20=20=20=20(if=20undo-in-region=0A=20=09=20=20(undo-start=20= (region-beginning)=20(region-end))=0A=20=09(undo-start))=0A--=20=0A= 2.21.0=20(Apple=20Git-122)=0A=0A= --Apple-Mail=_DFBB248B-8B3F-47CE-B1FE-7CECC4C5AE6F-- From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 31 12:10:23 2019 Received: (at 37700) by debbugs.gnu.org; 31 Oct 2019 16:10:23 +0000 Received: from localhost ([127.0.0.1]:54120 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iQD1j-0001pa-Av for submit@debbugs.gnu.org; Thu, 31 Oct 2019 12:10:23 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54912) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iQD1h-0001pJ-GF for 37700@debbugs.gnu.org; Thu, 31 Oct 2019 12:10:22 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:56059) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iQD1Z-00054W-R5; Thu, 31 Oct 2019 12:10:13 -0400 Received: from [176.228.60.248] (port=4372 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iQD1X-0003GD-LA; Thu, 31 Oct 2019 12:10:13 -0400 Date: Thu, 31 Oct 2019 18:10:12 +0200 Message-Id: <837e4kopzv.fsf@gnu.org> From: Eli Zaretskii To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= In-reply-to: <4E95A327-1B10-46FA-B08F-1877417230A8@acm.org> (message from Mattias =?utf-8?Q?Engdeg=C3=A5rd?= on Thu, 31 Oct 2019 17:04:41 +0100) Subject: Re: bug#37700: 27.0.50; undo mouse-drag-and-drop-region ineffective References: <3311689D-B1DF-4BAC-86BA-E3D2C6D2ECF1@acm.org> <94D2DE0C-8BD0-4CCF-B77D-5606A1D227DD@acm.org> <5be797bb-9d6b-cebe-edf4-21b4a5944595@gmx.at> <60b5bfa7-0aaf-40c0-3a1d-d0c0c5c662c6@gmx.at> <354ABF35-C5D0-4045-B9F0-5615A64408E6@acm.org> <83k199nasx.fsf@gnu.org> <83ftjxn94q.fsf@gnu.org> <37DDF48D-FC37-47A8-8CEC-C6EB66AB2BF7@acm.org> <9FE0E2D6-E4EA-4D7C-871C-3483AC53B295@acm.org> <41286005-259E-4B78-A1FF-746E7A753FB4@acm.org> <83d0ednfcb.fsf@gnu.org> <4E95A327-1B10-46FA-B08F-1877417230A8@acm.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 37700 Cc: 37700@debbugs.gnu.org, tkk@misasa.okayama-u.ac.jp, homeros.misasa@gmail.com, monnier@iro.umontreal.ca 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 (---) > From: Mattias Engdegård > Date: Thu, 31 Oct 2019 17:04:41 +0100 > Cc: monnier@iro.umontreal.ca, 37700@debbugs.gnu.org, > tkk@misasa.okayama-u.ac.jp, homeros.misasa@gmail.com > > > Fine with me (I proposed something like this during the original > > discussion), but please document this property in the ELisp manual. > > Then I apologise for misunderstanding you! No need to apologize; I was just explaining why I like this patch ;-) > Attached patch amended with changes to the manual and NEWS. Thanks. > --- a/doc/lispref/text.texi > +++ b/doc/lispref/text.texi > @@ -1451,6 +1451,12 @@ Undo > This function does not bind @code{undo-in-progress}. > @end defun > > +Some commands leave the region active after execution in such a way that > +it interferes with selective undo of that command. To make @code{undo} > +ignore the active region when invoked immediately after such a command, > +set the property @code{undo-inhibit-region} of the command's function > +symbol to a non-nil value. Please add here a cross-reference to the other place, where this property is described. > +** 'undo' can be made to ignore the active region for a command > +by setting its 'undo-inhibit-region' symbol property to non-nil. Instead of "its" I'd use "that command's", because "its" is a bit ambiguous in this context. From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 31 12:48:06 2019 Received: (at 37700-done) by debbugs.gnu.org; 31 Oct 2019 16:48:06 +0000 Received: from localhost ([127.0.0.1]:54154 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iQDcD-0002q9-KH for submit@debbugs.gnu.org; Thu, 31 Oct 2019 12:48:05 -0400 Received: from mail1430c50.megamailservers.eu ([91.136.14.30]:59964 helo=mail118c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iQDcA-0002pZ-Qy for 37700-done@debbugs.gnu.org; Thu, 31 Oct 2019 12:48:04 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1572540475; bh=Qf+qlryAilg9tKZhSG8EPvFHKTh/Cd2mL6zycHnfMo4=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=duDDf6JqQs3CMiPHFss0SLEN67/eteC0rwME40BfHqTB6cZSrgStJHtFICzvBDS4w t+Lx4lxlJEco/3McNtD4KcGBwRNC9y40B4CjZMqOgR8/Db+fS9xUx76yuxv+exqa1u mLGu8OJHX7QJBF9RraCnYcUU+QBPIbIrKBBovZMM= Feedback-ID: mattiase@acm.or Received: from [192.168.0.4] (c188-150-171-71.bredband.comhem.se [188.150.171.71]) (authenticated bits=0) by mail118c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id x9VGlqqh028519; Thu, 31 Oct 2019 16:47:54 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: bug#37700: 27.0.50; undo mouse-drag-and-drop-region ineffective From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: <837e4kopzv.fsf@gnu.org> Date: Thu, 31 Oct 2019 17:47:51 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <3311689D-B1DF-4BAC-86BA-E3D2C6D2ECF1@acm.org> <94D2DE0C-8BD0-4CCF-B77D-5606A1D227DD@acm.org> <5be797bb-9d6b-cebe-edf4-21b4a5944595@gmx.at> <60b5bfa7-0aaf-40c0-3a1d-d0c0c5c662c6@gmx.at> <354ABF35-C5D0-4045-B9F0-5615A64408E6@acm.org> <83k199nasx.fsf@gnu.org> <83ftjxn94q.fsf@gnu.org> <37DDF48D-FC37-47A8-8CEC-C6EB66AB2BF7@acm.org> <9FE0E2D6-E4EA-4D7C-871C-3483AC53B295@acm.org> <41286005-259E-4B78-A1FF-746E7A753FB4@acm.org> <83d0ednfcb.fsf@gnu.org> <4E95A327-1B10-46FA-B08F-1877417230A8@acm.org> <837e4kopzv.fsf@gnu.org> To: 37700-done@debbugs.gnu.org X-Mailer: Apple Mail (2.3445.104.11) X-CTCH-RefID: str=0001.0A0B0207.5DBB103B.0040, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=DYBpVclW c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=mDV3o1hIAAAA:8 a=EJBq-rAxv9JHMLL9Zi8A:9 a=CjuIK1q_8ugA:10 a=_FVE-zBwftR9WsbkzFJk:22 X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 37700-done Cc: Tak Kunihiro , tkk@misasa.okayama-u.ac.jp, Eli Zaretskii , Stefan Monnier 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: -0.7 (/) 31 okt. 2019 kl. 17.10 skrev Eli Zaretskii : >=20 > Please add here a cross-reference to the other place, where this > property is described. Done. >> +** 'undo' can be made to ignore the active region for a command >> +by setting its 'undo-inhibit-region' symbol property to non-nil. >=20 > Instead of "its" I'd use "that command's", because "its" is a bit > ambiguous in this context. Done. Pushed with those patches (and moved the property description so that = the list follows alphabetical order). From unknown Thu Aug 21 12:10:08 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 29 Nov 2019 12:24:04 +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