From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.devel Subject: Re: master 71ef012: Map redo records for undo in region to 'undo-in-region Date: Fri, 12 Mar 2021 12:24:04 -0500 Message-ID: <6AF21570-1380-41B3-A87A-01276FA92432@gmail.com> References: <20210311223946.8801.94147@vcs0.savannah.gnu.org> <20210311223948.2A4E320B2E@vcs0.savannah.gnu.org> <871rclz07w.fsf@gnus.org> <1328F7D7-74BD-4262-A25E-6A25EDF84D88@gmail.com> <87o8fpxi8f.fsf@gnus.org> <878s6sux2k.fsf@gnus.org> Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.60.0.2.21\)) Content-Type: multipart/mixed; boundary="Apple-Mail=_4F6E7BBA-A8ED-40DA-A6D7-84FEDEA12210" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7692"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Glenn Morris , emacs-devel To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Mar 12 19:04:00 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lKm8l-0001sK-PO for ged-emacs-devel@m.gmane-mx.org; Fri, 12 Mar 2021 19:03:59 +0100 Original-Received: from localhost ([::1]:33498 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lKm8k-0004rV-Pf for ged-emacs-devel@m.gmane-mx.org; Fri, 12 Mar 2021 13:03:58 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58186) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lKlWE-0007Km-31 for emacs-devel@gnu.org; Fri, 12 Mar 2021 12:24:10 -0500 Original-Received: from mail-qk1-x72d.google.com ([2607:f8b0:4864:20::72d]:43209) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lKlWA-0000cu-UK; Fri, 12 Mar 2021 12:24:09 -0500 Original-Received: by mail-qk1-x72d.google.com with SMTP id b130so24999958qkc.10; Fri, 12 Mar 2021 09:24:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=vrZX+gAzsPgdI1qC0K7miZnrvCBVtgnyc445/1YMqI0=; b=i4skOpB1Xj0sCT1R2crPIy/Bs6/7OoMA1myOwFStnJ/MuVHzVgDNWeoXlpE1mnIzdv az64Ubqyg/+Az00Pno6O6FWH/oJ+GA3jfNzOMVKEz/gUgNtaIWerLJUI3PFm90NOw4Qg Z1zno5ORGjl9N5ZuHuCqoJg5q8FXsiHrGa0tX5LV3BwsOt8UjlREfP8aVTn51v3irnbB Hm4LezhFL8p7ynmAlcF1uRnfwVLe0STNaiwBCekc3EPAU+gZwlLsV5S+/ebeAMFYsPXS fMSeDKH6HYUHJFm/3cnGoaoE43JrA//STjjGJeD0Xp+YLHH4VpPk66IE1sHpmIs6COx/ Cb3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=vrZX+gAzsPgdI1qC0K7miZnrvCBVtgnyc445/1YMqI0=; b=Qn87lrregetzBZBGuVibZKqC34JYBCERGwTu2QK2a2mrAGkKovibdQVwKDmHj76urH phn1o4rnLOoeO2ArYaV6G6SYOK0BCoB/m6WAHaTsfi+ar9y2qrDmbuRIXlf+nkQTrC/I qxLOyqjPb4MCGV+5xtHBybHV5rn3I3/j83cHYCMtCIpuUqe4+HJzlOi3iIYOf/TrbIkm oLdl1t6a0K/YG5lql4owN62fO590osMbUCTLAlCqwsWoeQANKJZqTJtjfJsOaZewxEV1 uXqRIsKpyV9JeLF+tWxbG7/hYxwaHRVQef7JEEqKPA86/7x0o/a9NUXFAInfW1fIIb3e 3cgw== X-Gm-Message-State: AOAM530b8NZtRI+KduYccERQQRGmlbJv1YXV8Xi9qwU0LC6vLmHkIRev gHRv7vmdUbhrPDAqmWz3ZLfKWeMtgjc= X-Google-Smtp-Source: ABdhPJyhuCO5FUzACTgKwYS+XTwdB5eD7sBbfY1IU9nk3hc2UZ0YDncuo01iCzl5BX2yv2tD2TJpAA== X-Received: by 2002:ae9:e015:: with SMTP id m21mr12955406qkk.420.1615569845598; Fri, 12 Mar 2021 09:24:05 -0800 (PST) Original-Received: from ?IPv6:2601:98a:4200:9210:cda8:56f3:c992:9849? ([2601:98a:4200:9210:cda8:56f3:c992:9849]) by smtp.gmail.com with ESMTPSA id z89sm4473805qtd.5.2021.03.12.09.24.04 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Mar 2021 09:24:05 -0800 (PST) In-Reply-To: <878s6sux2k.fsf@gnus.org> X-Mailer: Apple Mail (2.3654.60.0.2.21) Received-SPF: pass client-ip=2607:f8b0:4864:20::72d; envelope-from=casouri@gmail.com; helo=mail-qk1-x72d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:266413 Archived-At: --Apple-Mail=_4F6E7BBA-A8ED-40DA-A6D7-84FEDEA12210 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Mar 12, 2021, at 12:00 PM, Lars Ingebrigtsen = wrote: >=20 > Yuan Fu writes: >=20 >> I see. It fails when executing regional undo. Does Emacs not have >> regional undo when running in batch mode? (Maybe push-mark-command >> behaves differently?) >=20 > I'm not sure, but I see that Glenn has disabled the tests for now, so > perhaps he knows more. >=20 > --=20 > (domestic pets only, the antidote for overdose, milk.) > bloggy blog: http://lars.ingebrigtsen.no This patch should fix it for batch mode. I=E2=80=99m not sure if I need = to mention Glenn=E2=80=99s commit in the commit message (like =E2=80=9CRev= ert commit xxx" or something), maybe someone can edit it to the correct = format. Yuan --Apple-Mail=_4F6E7BBA-A8ED-40DA-A6D7-84FEDEA12210 Content-Disposition: attachment; filename=fix-test.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="fix-test.patch" Content-Transfer-Encoding: quoted-printable =46rom=20fd3a6ce674c86af42087c685c514dbd1b9909f81=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Yuan=20Fu=20=0ADate:=20Fri,=20= 12=20Mar=202021=2012:18:22=20-0500=0ASubject:=20[PATCH]=20Fix=20= simple-tests=0A=0A*=20test/lisp/simple-tests.el=20= (simple-tests--undo-in-region,=0Asimple-tests--undo-equiv-table):=20= Re-enable=20in=20batch=20mode.=20Enable=0A'transient-mark-mode'=20in=20= temp=20buffer.=0A---=0A=20test/lisp/simple-tests.el=20|=207=20+++++--=0A=20= 1=20file=20changed,=205=20insertions(+),=202=20deletions(-)=0A=0Adiff=20= --git=20a/test/lisp/simple-tests.el=20b/test/lisp/simple-tests.el=0A= index=208fa8295765..601eca6cd4=20100644=0A---=20= a/test/lisp/simple-tests.el=0A+++=20b/test/lisp/simple-tests.el=0A@@=20= -469,8=20+469,11=20@@=20simple-tests--undo=0A=20=0A=20(ert-deftest=20= simple-tests--undo-in-region=20()=0A=20=20=20;;=20Test=20undo/redo=20in=20= region.=0A-=20=20(skip-unless=20(not=20noninteractive))=0A=20=20=20= (with-temp-buffer=0A+=20=20=20=20;;=20Enable=20`transient-mark-mode'=20= so=20`region-active-p'=20works=20as=0A+=20=20=20=20;;=20expected.=20= `region-active-p'=20is=20used=20to=20determine=20whether=20to=0A+=20=20=20= =20;;=20perform=20regional=20undo=20in=20`undo'.=0A+=20=20=20=20= (transient-mark-mode)=0A=20=20=20=20=20(buffer-enable-undo)=0A=20=20=20=20= =20(dolist=20(x=20'("a"=20"b"=20"c"=20"d"=20"e"))=0A=20=20=20=20=20=20=20= (insert=20x)=0A@@=20-506,9=20+509,9=20@@=20= simple-tests--sans-leading-nil=0A=20=20=20lst)=0A=20=0A=20(ert-deftest=20= simple-tests--undo-equiv-table=20()=0A-=20=20(skip-unless=20(not=20= noninteractive))=0A=20=20=20(with-temp-buffer=0A=20=20=20=20=20= (buffer-enable-undo)=0A+=20=20=20=20(transient-mark-mode)=0A=20=20=20=20=20= (let=20((ul-hash-table=20(make-hash-table=20:test=20#'equal)))=0A=20=20=20= =20=20=20=20(dolist=20(x=20'("a"=20"b"=20"c"))=0A=20=20=20=20=20=20=20=20= =20(insert=20x)=0A--=20=0A2.24.3=20(Apple=20Git-128)=0A=0A= --Apple-Mail=_4F6E7BBA-A8ED-40DA-A6D7-84FEDEA12210--