From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.bugs Subject: bug#37700: 27.0.50; undo mouse-drag-and-drop-region ineffective Date: Fri, 11 Oct 2019 14:51:01 +0200 Message-ID: <94D2DE0C-8BD0-4CCF-B77D-5606A1D227DD@acm.org> References: <3311689D-B1DF-4BAC-86BA-E3D2C6D2ECF1@acm.org> Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Content-Type: multipart/mixed; boundary="Apple-Mail=_EFDC49E4-4BDC-4622-AD19-45FDCE0082AE" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="52316"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 37700@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Oct 11 14:53:28 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iIuQA-000DUe-OR for geb-bug-gnu-emacs@m.gmane.org; Fri, 11 Oct 2019 14:53:27 +0200 Original-Received: from localhost ([::1]:49842 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iIuQ9-0006kU-GT for geb-bug-gnu-emacs@m.gmane.org; Fri, 11 Oct 2019 08:53:25 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58237) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iIuOt-0005Ts-2h for bug-gnu-emacs@gnu.org; Fri, 11 Oct 2019 08:52:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iIuOo-0003H7-Bi for bug-gnu-emacs@gnu.org; Fri, 11 Oct 2019 08:52:07 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49363) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iIuOn-0003Gs-T9 for bug-gnu-emacs@gnu.org; Fri, 11 Oct 2019 08:52:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iIuOn-0008Vk-Oa for bug-gnu-emacs@gnu.org; Fri, 11 Oct 2019 08:52:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 11 Oct 2019 12:52:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37700 X-GNU-PR-Package: emacs Original-Received: via spool by 37700-submit@debbugs.gnu.org id=B37700.157079827132625 (code B ref 37700); Fri, 11 Oct 2019 12:52:01 +0000 Original-Received: (at 37700) by debbugs.gnu.org; 11 Oct 2019 12:51:11 +0000 Original-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 Original-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 Original-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 In-Reply-To: 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-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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:168975 Archived-At: --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--